# Is there a way to preserve EEPROM contents in AVR Atmega when burning a new firmware to flash with avrdude?

I'm finishing an application which will use some non-volatile parameters stored on an AVR Atmega644P EEPROM. The initial EEPROM values were generated using the EEMEM attribute (like described on this tutorial) and burned to the AVR using avrdude like this:

avrdude -c usbasp -p atmega644p -u -U eeprom:w:application.eep

The application runs and retrieves the correct EEPROM values, but if I upgrade just the firmware with avrdude -c usbasp -p atmega644p -u -U flash:w:application.hex the EEPROM seems to be erased too, for the values read are "all ones" instead of the previously loaded ones. So I ask, is there any way to burn the firmware to flash but avoid the EEPROM to be erased (using avrdude)?

• So if I ever have to update the eeprom values from the running application using, say, the eeprom_update_byte function, I can't have the EESAVE fuse set? – Claudio Feb 6 '14 at 14:12