Hi.
I used Atmel-ice to upload program on arduino nano for long time without any problems.
Now Atmel_ice is no longer
working. It tried to upload an old program with the result of different errors related to the configuration of USB port.
If USB port is configured as AUTO I have this error:
Building in release mode
Checking size .pio\build\nanoatmega328new\firmware.elf
Advanced Memory Usage is available via “PlatformIO Home > Project Inspect”
RAM: [======= ] 71.8% (*** [upload] could not open port ‘usb’: FileNotFoundError(2, ‘Impossibile trovare il file specificato.’, None, 2)
used 1470 bytes from 2048 bytes)
Flash: [======== ] 83.5% (used 25650 bytes from 30720 bytes)
Configuring upload protocol…
AVAILABLE: atmelice_isp
CURRENT: upload_protocol = atmelice_isp
Looking for upload port…
Using manually specified: usb
If I configure the port es. Com9 this is the error:
Configuring upload protocol…
AVAILABLE: atmelice_isp
CURRENT: upload_protocol = atmelice_isp
Looking for upload port…
Using manually specified: COM9
Uploading .pio\build\nanoatmega328new\firmware.hex
avrdude: jtag3_open_common(): JTAGICE3/EDBG port names must start with “usb”
Same soft amd some Hardware using an old PC with Studio7 is working.
What is the exact platformio.ini
? Most programmer examples use upload_protocol = custom
to have full control.
This is the ini file
[env:nanoatmega328]
platform = atmelavr
board = nanoatmega328
framework = arduino
upload_protocol = atmelice_isp
upload_flags = -e
upload_port = usb
As i said I was in the habit to upload arduino bords since long time with no problems. Now is no working but the only changes are the upgrade of DELL and WIN 11. I have tested the ice connected to the same Nano board with my old PC and Atmel studio7 and they are working OK.
By the way i was remembering i had an ARDUINO IDE installed so i tried to upload using Arduino. It works OK. If of some interest i can send the log.
What happens when instead you use this?
[env:nanoatmega328]
platform = atmelavr
board = nanoatmega328
framework = arduino
upload_port = usb
upload_protocol = custom
upload_flags =
-C
${platformio.packages_dir}/tool-avrdude/avrdude.conf
-p
$BOARD_MCU
-P
$UPLOAD_PORT
-c
atmelice_isp
upload_command = avrdude $UPLOAD_FLAGS -U flash:w:$SOURCE:i
This is the result
Configuring upload protocol...
AVAILABLE: custom
CURRENT: upload_protocol = custom
Uploading .pio\build\nanoatmega328\firmware.hex
avrdude: error at C:\Users\gsrad\.platformio\packages/tool-avrdude/avrdude.conf:402: syntax error
avrdude: error reading system wide configuration file "C:\Users\gsrad\.platformio\packages/tool-avrdude/avrdude.conf"
*** [upload] Error 1
``
Look into that folder. Are there multiple tool-avrdude
with e.g. a @x.y.z
at the end of the folder name? You might be pointing a newer avrdude version to use the config file from an older avrdude version.