Hello,
Please refer to serial bootloader for the S32K1xx devices. The software is for the S32K148EVB, However, it can be migrated to S32K144.
Application note:
https://www.nxp.com/docs/en/application-note/AN12218.pdf
SW:
https://www.nxp.com/docs/en/application-note-software/AN12218SW.zip
I hope it helps.
Best Regards,
Diana
Hello,
I have checked your linker files and the bootloader address space and the application address space overlaps.
For example, if you want to start of the application at address 0x0001_0000, the bootloader address space starts at address 0x0000_0000 and the end address can be 0x0000_FBF0.
Also, after you loaded the application into memory, please, check the application in the memory window in the S32DS.
Window -> Show View -> Memory (if it is programmed correctly)
Do you program the application using Srecord?
I hope it helps.
Best Regards,
Diana
Thanks.But now I have a new problem, I can't run the app normally when I jump to the app, which makes me have no clue.
void JumpToUserApplication( unsigned int userSP, unsigned int userStartup)
{
/* Check if Entry address is erased and return if erased */
if(userSP == 0xFFFFFFFF){
return;
}
/* Set up stack pointer */
__asm("msr msp, r0");
__asm("msr psp, r0");
/* Relocate vector table */
S32_SCB->VTOR = (uint32)P_FLASH_APP;
/* Jump to application PC (r1) */
__asm("mov pc, r1");
}
void jump_app_fuc(void)
{
EDMA_DRV_Deinit();
LPUART_DRV_Deinit(INST_LPUART1);
FLEXCAN_DRV_Deinit(INST_CANCOM1);
INT_SYS_DisableIRQGlobal();
JumpToUserApplication(*((uint32*)P_FLASH_APP), *((uint32*)(P_FLASH_APP + 4)));
while(1)
{}
}