This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Can I relocate code

I'm designing a application downloader that can be run from the main application. The mechanism I want to employ would be to load a replacement application into a secondary "bank" of flash and then do a soft reboot into that region without having to copy it into the normal running location. Does this chip have a mechanism that would allow me to do this, I'm assuming that the Interupt vector table would have to move also. Also would the compiler produce relocatable code using relative instead of fixed location jumps?

Parents
  • could I change the interrupt vectors to secondary loads ISRs. I assume the vectors are at the top of the code, I could back them up, copy them from the secondary top to the primary with an added offset then just jump to the new image? If it fails then here would be a reboot and I could get the boot loader to re-configure the vectors back. How does that sound?

Reply
  • could I change the interrupt vectors to secondary loads ISRs. I assume the vectors are at the top of the code, I could back them up, copy them from the secondary top to the primary with an added offset then just jump to the new image? If it fails then here would be a reboot and I could get the boot loader to re-configure the vectors back. How does that sound?

Children