I've been involved in a project recently that needed to write to FLASH memory at runtime. This made me think about OTA updates of MySensor nodes. As I understand it, MySensors uses an external EEPROM to store the update in then rewrites the FLASH from this EEPROM. I'm thinking, would it be possible to do this without the EEPROM?
This is what I'm thinking... Let's say your sketch takes up 55% of atmega328 FLASH (based on a recent sketch of mine). You can write an independent sketch that could handle comms, downloading and flashing that can sit at top of memory. Assuming it is small enough to fit in with your existing sketch and any replacement sketch you may upload. It would obviously have to be a little more intelligent than a dumb flash bootloader. For instance, it would need to know if a download has failed or is partial and be able to communicate this back to the controller and only reboot when the entire new sketch is flashed.
I think it would be a pain to write and be very limited in flexibility regarding the size of the sketches you can upload, but it would mean you could make nodes without having custom boards with EEPROM built-in or adding EEPROMs to your simple designs.
Am I crazy, or is this something that would be useful to some? I'd certainly find it useful.