Mohamed NASSAR
Mohamed NASSAR

Reputation: 1

Changing program flash memory address for S32K312 target

We had the application up and running fine on NXP S32K312 target when the program flash address was 0x00400000.

When we needed to change the program flash address to start at 0x00440000 in the linker file, the application was running for the first time, but then when we tried to do a reset, it showed the below message: "Break at address "0xfffffffe" with no debug information available, or outside of program code."

Have anyone faced this issue before? and if so, what was missing?

Upvotes: 0

Views: 288

Answers (1)

gulpr
gulpr

Reputation: 4608

You can't simply change the address in the linker script. It will not work.

Cortex-M7 uCs require a vector table at the beginning of the memory chosen for boot (using pins or OTP registers). The first position is an initial value of the SP register, the second one is the reset handler (+many other).

enter image description here

If you want to move your code to another address in the memory you still need to have the vector table at the beginning of the boot memory.

You need to write the bootloader which will be placed at the beginning of the flash and it will set the new vector table address and jump to your app.

Upvotes: 2

Related Questions