Is it possible to use ISP to read and write parts of (or whole of) EEPROM, without touching the program stored in flash, or any of the fuse-bits etc. ?Yes, AVRDUDE has that capablity, however such AVRDUDE commands are not supported via the arduino IDE but rather using command line instructions.Should one use avrdude for this ? If so, are there any special precautions ? Or, if there is/are specific s/w tools ?AVRDUDE in the guy to use.Is this the right way to store device specific configuration and other field-debugging data ? And ISP the right (or at least, acceptable) way to access this data ?Well EEPROM is avalible for such uses, it's totally under user control. There are other ways to read and write to EEPROM memory within a sketch and then send or recieve the values to or from the USB serial port, or I2C bus or SPI bus.thanks,F
If so, are there any special precautions ?
@CodingBadly, when you say "328 family bootloaders... do not support accessing the EEPROM", do you mean to highlight that as a current limitation of those bootloaders, and something to keep in mind if I plan to do anything with the bootloader code ?
Does it mean that if a Duemilanove or Uno is used as the target (not as the "Arduino-as-ISP board"), directly connected to PC via Serial-over-USB, I can't directly write to EEPROM ?
1. Use Arduino-as-ISP (or even willing to invest in that nice Pololu USB ISP), to program the target ATtiny85, and also write/read information on it's EEPROM from the PC. a. Is this possible ?
b. Can I use avrdude command-line version using Arduino-as-ISP to read / write EEPROM ? Or I need a dedicated ISP ?
2. Somehow (not sure how), target Arduino board (Uno / Duemilanove)'s EEPROM, to be read / written from PC. a. Is this possible ?
b. Can I use avrdude command-line version for this ?
I guess not, because bootloader doesn't support it ?
Hopefully, I could reset the fuse-bits (if set) that erase EEPROM when programming the flash, using avrdude commandline, and either a standalone ISP or Arduino-as-ISP.
1. Some boards have the fuses set so the EEPROM is erased when programming the Flash.
2. The 328 family bootloaders (Uno / optiboot, Duemilanove) do not support accessing the EEPROM. If you are using an ISP (like an Uno runing the ArduinoISP sketch) then you will not be affected.
The 168/328 bootloader supplied with 022 supports reading/writing EEPROM...
A note of interest: The toolset is capable of automatically generating an EEPROM image. The Arduino IDE does not support the feature so you will have to perform the last two steps from the command-line.
What is automatically generated by the toolset and where does it get its input and in what format?
QuoteWhat is automatically generated by the toolset and where does it get its input and in what format?An EEP file. It has the same format as a HEX file but is intended to be uploaded to EEPROM instead of Flash. The "input" is from all variables marked with "EEMEM".