This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

Execute program in absolute address

Hi,

If I want compiler my project at specified locate, the only thing tat I need to do is following image?  Is it right?

 

After I program this program into address 0x0001D000 of flash memory, If I want use other program (which locate at address 0x00000000) to execute above program, who can I do?

Thank you,

Chianglin

Parents
  • Yes, you are right. By setting the iROM1 start address, the linker will generate the hex file with the absolute address to start at the address you configured. 

    If you want to make a program that run at 0x0000000 (I assume you don't use a softdevice) and switch to another program in different place in flash you are creating a bootloader. 

    We have a bootloader without softdevice example here.

    It's from a very old post but the principle should be the same. You forward the vector table and then you jump the pc to the reset handler of the new application. 

Reply
  • Yes, you are right. By setting the iROM1 start address, the linker will generate the hex file with the absolute address to start at the address you configured. 

    If you want to make a program that run at 0x0000000 (I assume you don't use a softdevice) and switch to another program in different place in flash you are creating a bootloader. 

    We have a bootloader without softdevice example here.

    It's from a very old post but the principle should be the same. You forward the vector table and then you jump the pc to the reset handler of the new application. 

Children
Related