I've written a boot loader for the Atmel SAM4E device which is working to a point, it can receive new application code via SPI, erase flash and write to flash, but I don't understand how to execute the new application. I've learned the VTOR can be relocated, but I'm not sure how. (my application sits at address 0x00420000).I'm very new to writing code for ARM, so I'd appreciate any help.
Many thanks
Paul
Hello Yusuhiko, thank for your reply.
no, my boot program is located at the lowest point of flash (0x00400000).
Yes, my stack point after I pause the debugging is showing as - 0x200148FC
it jumped to 0x004220f9
the same as the one it jumped to - 0x004220f9
The disassembly show that I'm stuck in an infinte loop;
0042206C b #-4
I assume this is an error trap to stop the processor just running off and doing crazy things.
I will try your suggested restart code.