Update sketch from SD, flash, EEPROM ...?!


my zero is connected via an UART to a kind of bus system. The protocol on the bus system allows me to transfer from a PC - which is also connected to the bus - any kind of data to my zero. The idea came to, to provide a "firmware update via bus feature"...

I can implement a mechanism that receives a new binary or hex file (any anything that is required) via the bus, store it to an SD card, external flash or eeprom.

But how can I apply the new firmware (=sketch) to the zero? I guess this is only possible via bootloader? If yes: Do you know of a bootloader that allows that kind of update-source (sd, [external] eeprom/flash) for sketch-upload? If no: How else can I apply the new sketch to the zero?

br, Alex

You'll either need to use a bootloader or execute the code from RAM. Using a bootloader is easier though. There is a good ASF example to use a binary stored on an SD/MMC : ASF documentation :)