I need to be able to choose between two Arduino apps running on an atmega 1280 (megaavr) at boot time. Therefore I need to move one of those apps to a different location in program memory, and I need to move the interrupts to that location as well.
I already have a method of executing the correct interrupts (with the help of the bootloader) in any location in memory.
However, I don't understand the build process enough to see where the linker decides where to place things and how to move both the program and interrupt sections to new memory locations.
- Where is the location of the interrupt vector defined?
- Where is the location of the program defined?
The current builds are performed using Arduino 22. While I'd prefer to modify build scripts or files in that environment, if needed I would consider moving it all over to a makefile build process and out of the Arduino environment.