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

Updating start address to nrf52840 dk via code

Hello to everyone, I have a nrf52840 dk device running Zephyr RTOS. I have flash an app to the start address 0x00 and a second app to 0x2000 address. While I am pressing a button from the first app I can jump to second app which runs ok. My question is how to update the start address to the address of the second firmware (0x2000)? Thus the second app will start on the reset. At this time the on reset the first app is booting.

Parents
  • EDIT: Added strikethrough on an incorrect statement. See the other replies for more clarification.

    The code execution will always start at address 0, this is hardcoded and you can not change this. You would need a custom bootloader at address 0x00 to boot into your desired address and update VTOR to point to the associated Vector Table. You could look at MCUBoot and see how it's done there.

    Best regards,

    Simon

Reply
  • EDIT: Added strikethrough on an incorrect statement. See the other replies for more clarification.

    The code execution will always start at address 0, this is hardcoded and you can not change this. You would need a custom bootloader at address 0x00 to boot into your desired address and update VTOR to point to the associated Vector Table. You could look at MCUBoot and see how it's done there.

    Best regards,

    Simon

Children
Related