platformio / platform-atmelavr

Atmel AVR: development platform for PlatformIO
https://registry.platformio.org/platforms/platformio/atmelavr
Apache License 2.0
136 stars 104 forks source link

uploading with external programmer erases EEPROM #195

Closed airiclenz closed 4 years ago

airiclenz commented 4 years ago

Uploading to a Atmel-Avr chip with an external programmer using the command:

pio run -t program

...erases the EEPROM as well.

airiclenz commented 4 years ago

See here as well: https://community.platformio.org/t/why-target-program-erases-eeprom/803

airiclenz commented 4 years ago

The additional upload_flags definition on the platformio.ini file :

upload_flags = 
     -D

...to prevent avrdude from performing a chip erase seemed to have solved the issue. Maybe an update of the documentation would be helpful.