S32K1xx bootloader

cancel
Showing results for 
Search instead for 
Did you mean: 

S32K1xx bootloader

388 Views
Contributor IV

Dear NXP officer,

1) I try to follow the link to try on the S32K1xx bootloader

S32k144 boot loader 

after download the code, I notice:

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_t)APP_START_ADDRESS;

/* Jump to application PC (r1) */
__asm("mov pc, r1");
}

So variable userSP and userStartup is not used inside this function? then what is the purpose to declare them?

2. Is there a example on bootloader on LIN bus?

3. Is there source code for interface software too?

Thanks and best regards

He Wei

0 Kudos
3 Replies

245 Views
NXP TechSupport
NXP TechSupport

Hello,

1. 

Actually, it is not true, the values of userSP and userStartup are used in the function. Their value is stored in the r0 and r1 registers.

Also, userSP is used for checking if the memory is erased at the address where you want to jump.

pastedImage_1.png

2.

Yes, you can refer to the unified bootloader framework:

https://www.nxp.com/webapp/Download?colCode=UBLUG  

https://www.nxp.com/downloads/en/snippets-boot-code-headers-monitors/unified_bootloader_framework.zi... 

This package does not include the NxpOpenBus.exe tool. Please, create a support ticket mentioned in point 3.

3.

If you are searching for any source code which is not available on the NXP site or application notes, please, create a support ticket.

Support | NXP 

In most cases, it cannot be shared publicly in the community or it is not available.

Thank you for your understanding.

I hope it helps.

Best regards,

Diana

0 Kudos

245 Views
Contributor III

program from unified_bootloader_framework.zipcannot build successfully ,pls give some tips,thanks.

0 Kudos

245 Views
NXP TechSupport
NXP TechSupport

Hello,

If you have any difficulties with the unified bootloader framework I suggest creating your own support ticket (link mentioned above in point 3) with a description/screenshot/errors of your issue.

Thank you for your understanding.

Best regards,

Diana

0 Kudos