Wie kann ich verhindern, daß AVRdude (winavr) den eeprom beim Flashen überschreibt?
Gast
#311071
mit irgendeinem Flag, das in der Kommanando-Zeile (nicht) angegeben wird. Siehe AVRdude-Doku.
Neee, das war's nicht: vor dem Flashen wird immer ein Chip-Erase durchgeführt, und da löscht's auch den eeprom. Es gibt aber eine Fuse (EESAVE), die den eeprom davor schützt. Zumindest beim tiny2313.
Gast
#311073
(entfernt)
So macht's WinAVR avrdude -p attiny2313 -P com3 -c avrispv2 -U flash:w:main.hex . . avrdude: NOTE: FLASH memory has been specified, an erase cycle will be performed To disable this feature, specify the -D option. Und das sagt das avrdude manual: -e Causes a chip erase to be executed. This will reset the contents of the flash ROM and EEPROM to the value0xff, and is basically a prerequisite command before the flash ROM can be reprogrammed again. The only exception would be if the new contents would exclusively cause bits to be programmed from the value 1 to 0. Note that in order to reprogram EERPOM cells, no explicit prior chip erase is required since the MCU provides an auto-erase cycle in that case before programming the cell.
also grundsätzlich zur funktion des flash's: - du kannst nur bits mit dem wert 0 reinschreiben - darausfolgt du kannst kein 0xff rein schreiben - alles auf 0xff stellen geht nur mit löschen befehl - deshalb gibt es auch fehler wenn du nur ne neue datei flasht und nicht davor löscht lösung: setze das fuse das das löschen verhindert
Gast
#311076
Unabhängig vom Programmer und dem Programmertool muss in diesem Falle das entsprechende Fuse Bit EESAVE im Fuse High Byte gesetzt werden. Achtung gesetzt bedeutet "0".