Writing EEPROM with AVRDude

As I understand it, in addition to uploading code to the chip, I can write the EEPROM from a file with AVRDude. I'd like to be able to reprogram the EEPROM in one of my projects without loading new code. Is that possible? How is that done? What sort of file do I need to start with? Can it be done from the IDE or is this a command line issue?

Delta_G:
Is that possible?

Yes.

How is that done?

The process is almost identical to the one used to upload a program / write to Flash.

What sort of file do I need to start with?

dot-eep file. The format is identical to the one used for Flash images (Intel HEX file format).

As luck would have it, the Arduino IDE creates the image for all EEMEM variables. For example, this…

uint16_t Count EEMEM = 0x42;

…creates a dot-eep file containing this (the 0x42 is easy to spot)…

:020000004200BC
:00000001FF

Can it be done from the IDE or is this a command line issue?

It may be possible to get it working from the IDE but, were I in your shoes, I would start with the command line.

Bear in mind that Optiboot does not support writing to EEPROM.

If the board has ISP header, it's a breeze to edit the EEPROM using USBAsp + ExtremeBurner AVR (assuming you're on windows). That's what I usually do.

Arduino IDE has no feature for EEPROM programming. Optiboot can support EEPROM write. There is a code for it or was there (I don't know about the newest version), but e.g. optiboot for Arduino UNO doesn't contains this because of the size is keeping in 512B boundaries. I think that it couldn't be a problem to switch on this functionality but in case of UNO it surely exceeds 512B so the bootloader partition have to be increased to 1kB.