I have a project that is using BootDrive to upload .hex files from an SD card on one Atmega328P to another Atmega328P's flashmem. It is working perfectly.
(BootDrive is a project that is basically a hack of AVRDUDE, that reads the SD card and mimics AVRDUDE's upload procedure via Arduino bootloader over serial).
However I now have a project that needs to upload 2 different .hex files to 2 different areas of flash memory. One .hex file stores a large array and the other .hex file contains the program to read and use the large array. The area of memory with the array .hex file will be rewritten on demand, but the area of memory for the program needs to remain untouched.
When compiling a hex, is it possible to instruct the compiler to force the code to a certain area of memory and force the code to avoid a certain area of memory?
If I can do this, I need to then make sure that BootDrive isn't wiping the entire flash before uploading. I just want it to write to the addresses in the hex file (I'm not sure if it does this at the mo).