Two independent programs in program memory ?

here is what i need . i have an SD card connected to an Arduino uno and i am modifying the bootloader , so that when the chip resets it checks the EEPROM for an activation flag then a file name , then it loads the contents of a HEX file (in the right way) starting from a certain program memory address . the thing is , i want that space of program memory to be fully reserved for the program to be uploaded by the SD card . and i want to be able to execute from that address at any point (and that must be triggered by the main program) so it's like having two independent programs in program memory .

can this be done correctly ?

As far as I know this is how all bootloaders work. It sounds like you want to modify the bootloader to load from SD card and not the serial connection. This should work exactly as you have described. The standard Arduino bootloader fits in the first 2k and loads programs into the remaining 30k. Your bootloader is doing the same thing almost but just from a different place.

tripphippie:
As far as I know this is how all bootloaders work. It sounds like you want to modify the bootloader to load from SD card and not the serial connection. This should work exactly as you have described. The standard Arduino bootloader fits in the first 2k and loads programs into the remaining 30k. Your bootloader is doing the same thing almost but just from a different place.

thank you . i found this online "If a Boot Loader is implemented, it can be called either directly from the Application code
using calls or jumps," so can i access the bootloader after the main boot process is over ? can i call the bootloader whenever i want to ?

Just reset the processor with the wdt - or some other method.

KeithRB:
Just reset the processor with the wdt - or some other method.

yes that’s possible but what’s the “jump to the bootloader address” thing all about ? that would be better than a full reset .