MPC5777M S32DS-2017R1
I make a bootloader for MPC5777M, which can recv hex file and upgrade code to flash.
But the bootloader can't jump to app.
#define APP_StartAddr (*(uint32_t*)0x00fc4004)
void Prepare_Before_Jump(void)
{
// flexcan_0_deinit_fnc(); /*shutdown the MSCAN module*/
uart_disableInterrupt();
systick_PIT_deinit();
PPCASM (" wrteei 0 "); /*disable the CPU interrupt*/
CleanRAM(); /*clean the bootloader used RAM for NVM driver*/
}
void app_entry(void)
{
Prepare_Before_Jump();
(*(void (*)(void))(APP_StartAddr))(); /*run the function via function pointer convert with a certain address*/
while(1);/*stop here for anyhow*/
}
I tried like this, but it doesn't work:
#define APP_StartAddr (*(uint32_t*)0x1500000)
void Prepare_Before_Jump(void)
{
// flexcan_0_deinit_fnc(); /*shutdown the MSCAN module*/
uart_disableInterrupt();
systick_PIT_deinit();
PPCASM (" wrteei 0 "); /*disable the CPU interrupt*/
CleanRAM(); /*clean the bootloader used RAM for NVM driver*/
}
void app_entry(void)
{
Prepare_Before_Jump();
asm("e_lis %r12,0x0150");
asm("e_or2i %r12,0x0000");
asm("mtlr %r12");
asm("se_blrl");
while(1);/*stop here for anyhow*/
}
the bootloader link file:

the app code link file:

when i debug it, the debug info is as follow:
