AnsweredAssumed Answered

S32R274,bootloader jump to app project

Question asked by chen min on Jul 13, 2020
Latest reply on Jul 19, 2020 by chen min

I wrote a bootloader for S32R274,it can download app project files to flash, but when I jump to the app, it seems that only Z7 works,Z4_0 does not have any log output。Is there a problem with my method of jumping to the app?who can help me?thanks..

 

#define APP_StartAddr (*(uint32_t*)0x01000004)
void app_entry(void)
{
UART_Deinit(&uart_pal1_instance);
INT_SYS_DisableIRQGlobal();
(*(void (*)(void))(APP_StartAddr))();

while(1);
}

 

the flash allocation is as follows:

bootloader linker_flash.ld:

MEMORY
{
flash_rchw : org = 0x00F98000, len = 0x4
cpu0_reset_vec : org = 0x00F98000+0x04, len = 0x4

m_text : org = 0x00F99000, len = 92K
m_data : org = 0x40000000, len = 426K
local_dmem : org = 0x50800000, len = 64K
}

 

app linker_flash.ld

MEMORY
{

/*Boot flash areas*/
flash_rchw : org = 0x01000000, len = 0x4
cpu0_reset_vec : org = 0x01000004, len = 0x4
/*...it could go all the way up to 0x00FFFFFF*/

/* Flash memory areas for each core */
c0_flash : org = 0x01001000, len = 508K
c1_flash : org = 0x01001000+ LENGTH(c0_flash), len = 512K
c2_flash : org = 0x01001000+ LENGTH(c0_flash)+LENGTH(c1_flash), len = 1K
common_flash : org = 0x01001000+ LENGTH(c0_flash)+LENGTH(c1_flash)+LENGTH(c2_flash), len = 256K

...
}

Outcomes