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 Paul,
I don't know the meaning of ":10000000" but it seems that the SP and PC initial values are respectively 0x200045A0 and 0x004220f9 from the code.What is the meaning of "when the next line - ((start_fn *) *((uint32_t *) 0x00420004))();"?I think the next step of the line would be 0x004220f9.Can you show us the dis-assembly code around 0x0040660A?
Best regards,Yasuhiko Koumoto.