I don't know the proper name for this task, or if it even has a name.
Essentially I would like use a atmega32 to take compiled hex off an SD card, put that in the program space, and then call functions from that newly placed program from my main routine.
I have started with the SD card interface, there are a lot of existing libraries for this and have chosen the suitable one. It doesn't look to difficult.
Next was burning code to the flash memory during run-time. I'm going to take a read through this later, it looks like it should work:
And then finally I have to dynamically link the new functions, during runtime, with my existing code. for this I think I should be able to use function pointers, return the starting address of the new function and then call it. Should I need to worry about returning to the main? I read about that here:
I was just wondering if this is the best way to go about this task or if I'm completely mental.