S32K14x: jump from boot loader to application not working

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

S32K14x: jump from boot loader to application not working

1,339 Views
PranjalGupta
Contributor I

Hi,

I have created a custom boot loader for my project. The boot loader is located at address 0x00 and the application is located at address 0x00023000. My problem is that the program control is not jumping from boot loader to application.

I know this problem has been discussed multiple times but none of the solutions have worked for me. I have done this multiple times with other NXP & STM controllers but for some reason I am not able to figure out for NXP S32K14x.

If someone can give pointers then it will be very helpful.

 

My boot loader code for jumping to application:

bootloader jump codebootloader jump code

Boot loader Linker file:

boot loader linker fileboot loader linker file

Application Linker file:

Application Linker fileApplication Linker file

 

I have debugged the above using both PE Micro Debugger and Segger JLink Debuggers. We have added the symbol file and attempted to debug dual projects but none of the approaches have given us any useful results / hints to the problem.

 

Some things that we have tried so far:

1) Disable and clear all interrupts before jumping.
2) Defined all interrupt handlers in the application code (originally they are pointing to the same location).
3) Ensuring that all peripherals are deinit (except on board flash).
4) Before jumping to the application, we can see in the debug Registers window that the SP is updated.
5) Ensuring that all clocks except FIRC is disabled before jumping to application.

No matter what we try, the debugger does not jump to application.

 

Any inputs will be of great help.

 

 

0 Kudos
Reply
1 Reply

1,317 Views
lukaszadrapa
NXP TechSupport
NXP TechSupport

Hi Pranjal,

well, you already tried all typical things which I'm used to recommend.

If you step the asm instructions, where does it crash exactly?

Is it possible to send me binary image (elf, s-record...), so I can check it on my side? It could be faster. I just need image of both bootloader+application and an address where application(); is called. I guess that you don't want to share it as is, so you can comment out a lot of code and create just a "demo" application which shows the problem.

Regards,

Lukas

0 Kudos
Reply