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?
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?
Look at the description of the vector table for your specific processor. But if the processor can map the vectors to RAM (which I believe it can) then the two applications can copy the vector table from their flash region and into this RAM region.
If you get a watchdog reset (provided you let your boot loader activate the boot loader and configured it for resetting the processor), you will arrive back into your boot loader again and the boot loader may then decide to start the other application.
Thank's I will give it a try!!