Greetings!
Probably an old issue that has come up prior, but my research hasn't yet yielded a resolution. Here's is a description of what I wish to do, what I have tried, and what I have encountered along the way.
OBJECTIVE: I have a measurement device I've designed using a NANO clone that contains a calibration record. Currently, this record is hard coded in progmem as a const array. What I want to do is move this record out of progmem and into EEPROM. To work with this, I then will have a stand alone application that I can distribute to users in the field so that they may simply plug a USB cable into the device and update their calibration records as desired (update record in EEROM only). I'd see the app likely calling AVRDUDE to port over the user updated record, if possible.
PROBLEMS: Though the r/w to EEPROM seems to work fine from WITHIN a sketch (includes EEPROM.H lib), my attempts at writing directly through AVRDUDE have failed. Using the "-U" parameter, I have tried "-U eeprom:w:blank.hex:i" (where blank.hex is a 1Kbyte "FF" record in Intel hex) and "-U eeprom:r:readback.hex:i" (readback the results of the dump). I get gibberish back when I examine the readback.hex file. Also, a verification error when writing to eeprom. In addition, when I read the eeprom from within a sketch, it looks like the data I wrote WITHIN the sketch is retained, even after subsequently writing al FF's to EEPROM through AVRDUDE. This suggests to me that if anything is getting written through this AVRDUDE command, it is PROGMEM space! I have reloaded a "new" bootloader through the Arduino IDE written via spi. Optiboot? Don't know, though I've read rumblings in the forum about OPTIBOOT's questioned compatibility with eeprom writes. I don't know if this indictment is confirmed. AVRDUDE clearly claims the ability to write EEPROM, but also supports may programmer platforms, so bootloader could be involved.
Does this ring any bells with anyone? Anything else I could try to clarify my problem? Cheers!
..Mark