Thanks, that is a good solution.

I have solved my problem by simply disabling the chip erase for eeprom (program the EESAVE fuse byte and suppress any download to eeprom), compiling object-code for eeprom into a template in flash and than initialising EEPROM - when and where needed - by programmed transfer from this template.

I create the eeprom address space by allocating non-initialised variables as target for receiving the copy from the flash template - may sound complicated but is very easy to realize (attention is only needed where the template needs to contain eeprom addresses). The intialisation of the flash-to-eeprom transfer is triggered at boot when key-bytes in eeprom contain 0xFF (hence if the eeprom is void). In case re-initialisation of eeprom becomes necessary, that can be triggered by forcing these bytes to 0xFF.

That works out nicely for my application (I have much more flash capacity than I need, and timewise there does not appear to be a penality).


_______________________________________________
AVR-chat mailing list
[email protected]
http://lists.nongnu.org/mailman/listinfo/avr-chat

Reply via email to