I am programming an atmega328P using an arduino nano as ICSP programmer. I do this with the cli tool.
To upload I run this line:
arduino-cli upload -b arduino:avr:uno --programmer arduinoasisp -p COM3 -i ./build/arduino.avr.uno/handController.ino.hex
Every time I do an upload it seems to erase EEPROM. If I just power down my device and turn it on again, I can tell that EEPROM is not affected, so it is not my software that is whiping the EEPROM.
I tried with
arduino-cli board details --fqbn arduino:avr:uno
To see if there is an upload option, I used below lines to find one. But unlike with my attiny cores I am not seeing any reference to retain EEPROM.
$ arduino-cli board details --fqbn arduino:avr:uno
Board name: Arduino Uno
FQBN: arduino:avr:uno
Board version: 1.8.3
Official Arduino board: ←[32m✔←[0m
Identification properties: VID:0x2341 PID:0x0001
VID:0x2A03 PID:0x0043
VID:0x2341 PID:0x0243
VID:0x2341 PID:0x0043
Package name: arduino
Package maintainer: Arduino
Package URL: https://downloads.arduino.cc/packages/package_index.json
Package website: http://www.arduino.cc/
Package online help: http://www.arduino.cc/en/Reference/HomePage
Platform name: Arduino AVR Boards
Platform category: Arduino
Platform architecture: avr
Platform URL: http://downloads.arduino.cc/cores/avr-1.8.3.tar.bz2
Platform file name: avr-1.8.3.tar.bz2
Platform size (bytes): 4941548
Platform checksum: SHA-256:de8a9b982477762d3d3e52fc2b682cdd8ff194dc3f1d46f4debdea6a01b33c14
Required tool: arduino:avr-gcc 7.3.0-atmel3.6.1-arduino7
Required tool: arduino:avrdude 6.3.0-arduino17
Required tool: arduino:arduinoOTA 1.3.0
Programmers: Id Name
parallel Parallel Programmer
jtag3isp Atmel JTAGICE3 (ISP mode)
jtag3 Atmel JTAGICE3 (JTAG mode)
buspirate BusPirate as ISP
usbasp USBasp
arduinoasispatmega32u4 Arduino as ISP (ATmega32U4)
usbGemma Arduino Gemma
stk500 Atmel STK500 development board
atmel_ice Atmel-ICE (AVR)
arduinoisp ArduinoISP
arduinoasisp Arduino as ISP
avrisp AVR ISP
usbtinyisp USBtinyISP
arduinoisporg ArduinoISP.org
avrispmkii AVRISP mkII
Then there are the two hex files with or without bootloader. I am using the one without the bootloader. Does this matter?
It is not a huge dealbreaker just slightly annoying. How can I solve this?
Kind regards,
Bas