Bootloader in S32K358

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

Bootloader in S32K358

1,805 Views
CaoRq
Contributor II

Hi, NXP

 I am doing bootloader in s32k358, but now I face a problem

 the boot software is using linker_flash_c0_s32k358.ld , if the app is  using linker_flash_c0_s32k358.ld , boot can jump to app successfully , but if the app uses linker_flash_s32k358.ld, it can't jump successfully and enter hardfault.

  Can you tell me the reason and how to solve it

  Thank you in advance.

0 Kudos
Reply
2 Replies

1,775 Views
VaneB
NXP TechSupport
NXP TechSupport

Hi @CaoRq 

In S32DS, when you create a project for multicore devices using RTDs, a project is created for each core with its own Linker file, except core 0, where two Linker files are created.

VaneB_0-1713983884870.png

In each Linker file, you will find the default definition of the memory regions of the cores, each one is independent.

Concerning the Linker file that was additionally generated, it is not usually used and can be verified in the project properties. So for greater ease, I recommend not using it.

VaneB_2-1713984027895.png

 

B.R.

VaneB

0 Kudos
Reply

1,752 Views
CaoRq
Contributor II

Hi VaneB

    Thank you for reply

     I am using core0 for booloader, so I use linker_flash_c0_s32k358.ld for bootloader.  Although I am using core0 app now, I need to download core0 and core2 app in 1 hex in future, so I choose linker_flash_s32k358.ld for app,  boot can't jump to app successfully and enter hard fault , when I choose  linker_flash_c0_s32k358.ld for test , boot jump successfully. I think it means jump process has no problem.

    linker_flash_c0_s32k358.ld in bootloader has no change, the ld file in app only choose it's  start address like this:

RunqiangCao_0-1714024196583.png

RunqiangCao_1-1714024225305.png

   Before jumping , I  deinit the peripheral , disable the systick, disable interrupts,set MSP and PSP to the top of the stack ,set S32_SCB->VTOR = 0x20000000u and set control register to 0,then jump,it enter hard fault.

   I have no idea  to solve it and expect your reply.

   Thank you in advance.

 

0 Kudos
Reply