Thanks for the reply.
So if I understand you right, then you imply that I cannot directly write to the EEPROM via Serial.
(Though I thought I saw also some examples doing that. But can't find it anymore.)
Anyhow. So take your hint, I also tried writing to the EEPROM using a USBtiny ISP programmer:
OUT_FNAME=EEPROM_h.hex
AVR_CHIP=atmega328p
PROGRAMMER=usbtiny
avrdude -v -c $PROGRAMMER -p $AVR_CHIP -U eeprom:w:$OUT_FNAME:h
And I even tried using the avrdude from the Arduino IDE with its avrdude.conf file using the -C flag.
But also via ISP I get the same error (used the -v verbose flag here):
hostname:shell_scripts$ ./AVRdude_Write_EEPROM_ISP.sh
============ My AVR-EEPROM Reader ============
avrdude: Version 6.3-20190619
Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/
Copyright (c) 2007-2014 Joerg Wunsch
System wide configuration file is "avrdude.conf"
User configuration file is "<local path>/.avrduderc"
User configuration file does not exist or is not a regular file, skipping
Using Port : usb
Using Programmer : usbtiny
avrdude: usbdev_open(): Found USBtinyISP, bus:device: 020:006
AVR Part : ATmega328P
Chip Erase delay : 9000 us
PAGEL : PD7
BS2 : PC2
RESET disposition : dedicated
RETRY pulse : SCK
serial program mode : yes
parallel program mode : yes
Timeout : 200
StabDelay : 100
CmdexeDelay : 25
SyncLoops : 32
ByteDelay : 0
PollIndex : 3
PollValue : 0x53
Memory Detail :
Block Poll Page Polled
Memory Type Mode Delay Size Indx Paged Size Size #Pages MinW MaxW ReadBack
----------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ----- ---------
eeprom 65 20 4 0 no 1024 4 0 3600 3600 0xff 0xff
flash 65 6 128 0 yes 32768 128 256 4500 4500 0xff 0xff
lfuse 0 0 0 0 no 1 0 0 4500 4500 0x00 0x00
hfuse 0 0 0 0 no 1 0 0 4500 4500 0x00 0x00
efuse 0 0 0 0 no 1 0 0 4500 4500 0x00 0x00
lock 0 0 0 0 no 1 0 0 4500 4500 0x00 0x00
calibration 0 0 0 0 no 1 0 0 0 0 0x00 0x00
signature 0 0 0 0 no 3 0 0 0 0 0x00 0x00
Programmer Type : USBtiny
Description : USBtiny simple USB programmer, https://learn.adafruit.com/usbtinyisp
avrdude: programmer operation not supported
avrdude: Using SCK period of 10 usec
avrdude: AVR device initialized and ready to accept instructions
Reading | ################################################## | 100% 0.01s
avrdude: Device signature = 0x1e950f (probably m328p)
avrdude: safemode: lfuse reads as FF
avrdude: safemode: hfuse reads as DE
avrdude: safemode: efuse reads as FD
avrdude: reading input file "EEPROM_h.hex"
avrdude: fileio: invalid operation=0
avrdude: read from file 'EEPROM_h.hex' failed
avrdude: safemode: lfuse reads as FF
avrdude: safemode: hfuse reads as DE
avrdude: safemode: efuse reads as FD
avrdude: safemode: Fuses OK (E:FD, H:DE, L:FF)
avrdude done. Thank you.
Is 'funny', coz it complains for the .conf file, but it cant find the USBtiny with the .conf file. (Perhaps the avrdude from the Arduino IDE is slightly different?)
However, the questions are problably, what the following Errors mean exactly:
avrdude: programmer operation not supported
and
avrdude: fileio: invalid operation=0
I am pretty sure there is a way to write directly to the EEPROM using avrdude, but I am still not sure what the problem is.
My Arduino Mini Hardware?
The avrdude command?
The fileformat of the .hex file (there is the :i and :h option when reading/writing a hex file).
Again... any advice and/or a working example command for reading and writing back the EEPROM to the AVR chip would be very much appreciated.