modify program start address during run-time

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

modify program start address during run-time

616 Views
naderkhamess
Contributor III

Hello there,

 

I would like to update my bootloader with a new bootloader via CAN. The old bootloader starts from 0 --> 0x3000,  new bootloader 0 -->0x10000. 


My plan is to update via CAN with special firmware which erase the memory and flash ( 0-->0x10000) the new bootloader. 

 

Old bootloader expect user program start address at 0x3000. Therefore user program "special" linker script starts at 0x3000. 

My question is, how to change my program start address while running to 0x10000 instead?  

So I was wondering if there is a Jump functions that I can use?

@lukaszadrapa 

Thanks!

 

Cheers

Nader

 

old bootloader linkerscript --> start address: 0x0 end: 0x3000

new bootloader --> start address: 0x0 end:0x10000

user program special to erase and flash new bootloader start: 0x3000 

 

0 Kudos
1 Reply

606 Views
danielmartynek
NXP TechSupport
NXP TechSupport

Hello Nader,

You didn't specify the MCU.

But the S32K1xx execution always starts at 0x0, this cannot be changed to 0x3000.

At least the stack top address and the reset vector must be at 0x0 - 0x4 and the flash configuration field at 0x400.

 

Regards,

Daniel