Ext. Programmer: Atmel ICE
Board: Arduino Uno
Arduino IDE version: 1.8.19
System: MacOS ventura
What am I trying to do?
Upload using Programmer
What's the issue?
Compiled Hex uploads, but fails to Verify and throws error in the verbose output of IDE.
Same issue for IDE 2x
It get's written, I know, as my program (blink.ino) makes the built in led blink and even if I change the duration, it get's changed.
How am I uploading the program?
Well you know, Select the programmer as Atmel Ice (AVR) , then select the board as Arduino Uno, then Hit Upload Using Programmer
What's the error?
Here's the dump:
Arduino: 1.8.19 (Mac OS X), Board: "Arduino Uno"
/Applications/Arduino.app/Contents/Java/arduino-builder -dump-prefs -logger=machine -hardware /Applications/Arduino.app/Contents/Java/hardware -hardware /Users/sdatta/Library/Arduino15/packages -tools /Applications/Arduino.app/Contents/Java/tools-builder -tools /Applications/Arduino.app/Contents/Java/hardware/tools/avr -tools /Users/sdatta/Library/Arduino15/packages -built-in-libraries /Applications/Arduino.app/Contents/Java/libraries -libraries /Users/sdatta/Documents/Arduino/libraries -fqbn=arduino:avr:uno -vid-pid=0000_0000 -ide-version=10819 -build-path /var/folders/1n/b1z5c12n5xv_w78jc8xnqt186nc7wn/T/arduino_build_564701 -warnings=all -build-cache /var/folders/1n/b1z5c12n5xv_w78jc8xnqt186nc7wn/T/arduino_cache_560161 -prefs=build.warn_data_percentage=75 -prefs=runtime.tools.avr-gcc.path=/Users/sdatta/Library/Arduino15/packages/arduino/tools/avr-gcc/7.3.0-atmel3.6.1-arduino7 -prefs=runtime.tools.avr-gcc-7.3.0-atmel3.6.1-arduino7.path=/Users/sdatta/Library/Arduino15/packages/arduino/tools/avr-gcc/7.3.0-atmel3.6.1-arduino7 -prefs=runtime.tools.avrdude.path=/Users/sdatta/Library/Arduino15/packages/arduino/tools/avrdude/6.3.0-arduino17 -prefs=runtime.tools.avrdude-6.3.0-arduino17.path=/Users/sdatta/Library/Arduino15/packages/arduino/tools/avrdude/6.3.0-arduino17 -prefs=runtime.tools.arduinoOTA.path=/Users/sdatta/Library/Arduino15/packages/arduino/tools/arduinoOTA/1.3.0 -prefs=runtime.tools.arduinoOTA-1.3.0.path=/Users/sdatta/Library/Arduino15/packages/arduino/tools/arduinoOTA/1.3.0 -verbose /var/folders/1n/b1z5c12n5xv_w78jc8xnqt186nc7wn/T/arduino_modified_sketch_741793/Blink.ino
/Applications/Arduino.app/Contents/Java/arduino-builder -compile -logger=machine -hardware /Applications/Arduino.app/Contents/Java/hardware -hardware /Users/sdatta/Library/Arduino15/packages -tools /Applications/Arduino.app/Contents/Java/tools-builder -tools /Applications/Arduino.app/Contents/Java/hardware/tools/avr -tools /Users/sdatta/Library/Arduino15/packages -built-in-libraries /Applications/Arduino.app/Contents/Java/libraries -libraries /Users/sdatta/Documents/Arduino/libraries -fqbn=arduino:avr:uno -vid-pid=0000_0000 -ide-version=10819 -build-path /var/folders/1n/b1z5c12n5xv_w78jc8xnqt186nc7wn/T/arduino_build_564701 -warnings=all -build-cache /var/folders/1n/b1z5c12n5xv_w78jc8xnqt186nc7wn/T/arduino_cache_560161 -prefs=build.warn_data_percentage=75 -prefs=runtime.tools.avr-gcc.path=/Users/sdatta/Library/Arduino15/packages/arduino/tools/avr-gcc/7.3.0-atmel3.6.1-arduino7 -prefs=runtime.tools.avr-gcc-7.3.0-atmel3.6.1-arduino7.path=/Users/sdatta/Library/Arduino15/packages/arduino/tools/avr-gcc/7.3.0-atmel3.6.1-arduino7 -prefs=runtime.tools.avrdude.path=/Users/sdatta/Library/Arduino15/packages/arduino/tools/avrdude/6.3.0-arduino17 -prefs=runtime.tools.avrdude-6.3.0-arduino17.path=/Users/sdatta/Library/Arduino15/packages/arduino/tools/avrdude/6.3.0-arduino17 -prefs=runtime.tools.arduinoOTA.path=/Users/sdatta/Library/Arduino15/packages/arduino/tools/arduinoOTA/1.3.0 -prefs=runtime.tools.arduinoOTA-1.3.0.path=/Users/sdatta/Library/Arduino15/packages/arduino/tools/arduinoOTA/1.3.0 -verbose /var/folders/1n/b1z5c12n5xv_w78jc8xnqt186nc7wn/T/arduino_modified_sketch_741793/Blink.ino
Using board 'uno' from platform in folder: /Users/sdatta/Library/Arduino15/packages/arduino/hardware/avr/1.8.6
Using core 'arduino' from platform in folder: /Users/sdatta/Library/Arduino15/packages/arduino/hardware/avr/1.8.6
Detecting libraries used...
/Users/sdatta/Library/Arduino15/packages/arduino/tools/avr-gcc/7.3.0-atmel3.6.1-arduino7/bin/avr-g++ -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -Wno-error=narrowing -flto -w -x c++ -E -CC -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10819 -DARDUINO_AVR_UNO -DARDUINO_ARCH_AVR -I/Users/sdatta/Library/Arduino15/packages/arduino/hardware/avr/1.8.6/cores/arduino -I/Users/sdatta/Library/Arduino15/packages/arduino/hardware/avr/1.8.6/variants/standard /var/folders/1n/b1z5c12n5xv_w78jc8xnqt186nc7wn/T/arduino_build_564701/sketch/Blink.ino.cpp -o /dev/null
Generating function prototypes...
/Users/sdatta/Library/Arduino15/packages/arduino/tools/avr-gcc/7.3.0-atmel3.6.1-arduino7/bin/avr-g++ -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -Wno-error=narrowing -flto -w -x c++ -E -CC -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10819 -DARDUINO_AVR_UNO -DARDUINO_ARCH_AVR -I/Users/sdatta/Library/Arduino15/packages/arduino/hardware/avr/1.8.6/cores/arduino -I/Users/sdatta/Library/Arduino15/packages/arduino/hardware/avr/1.8.6/variants/standard /var/folders/1n/b1z5c12n5xv_w78jc8xnqt186nc7wn/T/arduino_build_564701/sketch/Blink.ino.cpp -o /var/folders/1n/b1z5c12n5xv_w78jc8xnqt186nc7wn/T/arduino_build_564701/preproc/ctags_target_for_gcc_minus_e.cpp
/Applications/Arduino.app/Contents/Java/tools-builder/ctags/5.8-arduino11/ctags -u --language-force=c++ -f - --c++-kinds=svpf --fields=KSTtzns --line-directives /var/folders/1n/b1z5c12n5xv_w78jc8xnqt186nc7wn/T/arduino_build_564701/preproc/ctags_target_for_gcc_minus_e.cpp
Compiling sketch...
/Users/sdatta/Library/Arduino15/packages/arduino/tools/avr-gcc/7.3.0-atmel3.6.1-arduino7/bin/avr-g++ -c -g -Os -Wall -Wextra -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -Wno-error=narrowing -MMD -flto -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10819 -DARDUINO_AVR_UNO -DARDUINO_ARCH_AVR -I/Users/sdatta/Library/Arduino15/packages/arduino/hardware/avr/1.8.6/cores/arduino -I/Users/sdatta/Library/Arduino15/packages/arduino/hardware/avr/1.8.6/variants/standard /var/folders/1n/b1z5c12n5xv_w78jc8xnqt186nc7wn/T/arduino_build_564701/sketch/Blink.ino.cpp -o /var/folders/1n/b1z5c12n5xv_w78jc8xnqt186nc7wn/T/arduino_build_564701/sketch/Blink.ino.cpp.o
Compiling libraries...
Compiling core...
Using precompiled core: /var/folders/1n/b1z5c12n5xv_w78jc8xnqt186nc7wn/T/arduino_cache_560161/core/core_arduino_avr_uno_984314b70533ddd2c38421e3ac39c7ba.a
Linking everything together...
/Users/sdatta/Library/Arduino15/packages/arduino/tools/avr-gcc/7.3.0-atmel3.6.1-arduino7/bin/avr-gcc -Wall -Wextra -Os -g -flto -fuse-linker-plugin -Wl,--gc-sections -mmcu=atmega328p -o /var/folders/1n/b1z5c12n5xv_w78jc8xnqt186nc7wn/T/arduino_build_564701/Blink.ino.elf /var/folders/1n/b1z5c12n5xv_w78jc8xnqt186nc7wn/T/arduino_build_564701/sketch/Blink.ino.cpp.o /var/folders/1n/b1z5c12n5xv_w78jc8xnqt186nc7wn/T/arduino_build_564701/../arduino_cache_560161/core/core_arduino_avr_uno_984314b70533ddd2c38421e3ac39c7ba.a -L/var/folders/1n/b1z5c12n5xv_w78jc8xnqt186nc7wn/T/arduino_build_564701 -lm
/Users/sdatta/Library/Arduino15/packages/arduino/tools/avr-gcc/7.3.0-atmel3.6.1-arduino7/bin/avr-objcopy -O ihex -j .eeprom --set-section-flags=.eeprom=alloc,load --no-change-warnings --change-section-lma .eeprom=0 /var/folders/1n/b1z5c12n5xv_w78jc8xnqt186nc7wn/T/arduino_build_564701/Blink.ino.elf /var/folders/1n/b1z5c12n5xv_w78jc8xnqt186nc7wn/T/arduino_build_564701/Blink.ino.eep
/Users/sdatta/Library/Arduino15/packages/arduino/tools/avr-gcc/7.3.0-atmel3.6.1-arduino7/bin/avr-objcopy -O ihex -R .eeprom /var/folders/1n/b1z5c12n5xv_w78jc8xnqt186nc7wn/T/arduino_build_564701/Blink.ino.elf /var/folders/1n/b1z5c12n5xv_w78jc8xnqt186nc7wn/T/arduino_build_564701/Blink.ino.hex
/Users/sdatta/Library/Arduino15/packages/arduino/tools/avr-gcc/7.3.0-atmel3.6.1-arduino7/bin/avr-size -A /var/folders/1n/b1z5c12n5xv_w78jc8xnqt186nc7wn/T/arduino_build_564701/Blink.ino.elf
Sketch uses 922 bytes (2%) of program storage space. Maximum is 32256 bytes.
Global variables use 9 bytes (0%) of dynamic memory, leaving 2039 bytes for local variables. Maximum is 2048 bytes.
/Users/sdatta/Library/Arduino15/packages/arduino/tools/avrdude/6.3.0-arduino17/bin/avrdude -C/Users/sdatta/Library/Arduino15/packages/arduino/tools/avrdude/6.3.0-arduino17/etc/avrdude.conf -v -patmega328p -catmelice_isp -Pusb -Uflash:w:/var/folders/1n/b1z5c12n5xv_w78jc8xnqt186nc7wn/T/arduino_build_564701/Blink.ino.hex:i
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 "/Users/sdatta/Library/Arduino15/packages/arduino/tools/avrdude/6.3.0-arduino17/etc/avrdude.conf"
User configuration file is "/Users/sdatta/.avrduderc"
User configuration file does not exist or is not a regular file, skipping
Using Port : usb
Using Programmer : atmelice_isp
avrdude: Found CMSIS-DAP compliant device, using EDBG protocol
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 : JTAG3_ISP
Description : Atmel-ICE (ARM/AVR) in ISP mode
Vtarget : 4.6 V
SCK period : 125.00 us
avrdude: AVR device initialized and ready to accept instructions
Reading | ################################################## | 100% 0.02s
avrdude: Device signature = 0x1e950f (probably m328p)
avrdude: NOTE: "flash" memory has been specified, an erase cycle will be performed
To disable this feature, specify the -D option.
avrdude: erasing chip
avrdude: reading input file "/var/folders/1n/b1z5c12n5xv_w78jc8xnqt186nc7wn/T/arduino_build_564701/Blink.ino.hex"
avrdude: writing flash (922 bytes):
Writing | avrdude: Short read, read only 0 out of 512 bytes
avrdude: jtag3_edbg_recv(): Unexpected response 0x00
avrdude: stk500v2_jtag3_recv(): error in jtagmkII_recv()
######avrdude: jtag3_edbg_send(): Unexpected response 0x81, 0x11
avrdude: jtag3_edbg_recv(): Unexpected response 0x80
avrdude: stk500v2_jtag3_recv(): error in jtagmkII_recv()
avrdude: jtag3_edbg_send(): Unexpected response 0x81, 0x11
avrdude: jtag3_edbg_recv(): Unexpected response 0x80
avrdude: stk500v2_jtag3_recv(): error in jtagmkII_recv()
######avrdude: Short read, read only 0 out of 512 bytes
avrdude: jtag3_edbg_send(): Unexpected response 0x00, 0x55
avrdude: jtag3_edbg_recv(): Inconsistent fragment number; expect 1, got 0
avrdude: stk500v2_jtag3_recv(): error in jtagmkII_recv()
######avrdude: Short read, read only 0 out of 512 bytes
avrdude: jtag3_edbg_recv(): Unexpected response 0x00
avrdude: stk500v2_jtag3_recv(): error in jtagmkII_recv()
avrdude: jtag3_edbg_send(): Unexpected response 0x81, 0x11
avrdude: jtag3_edbg_recv(): Unexpected response 0x80
avrdude: stk500v2_jtag3_recv(): error in jtagmkII_recv()
#######avrdude: jtag3_edbg_send(): Unexpected response 0x81, 0x00
avrdude: jtag3_edbg_recv(): Unexpected response 0x80
avrdude: stk500v2_jtag3_recv(): error in jtagmkII_recv()
avrdude: Short read, read only 0 out of 512 bytes
avrdude: jtag3_edbg_send(): Unexpected response 0x00, 0x55
######avrdude: jtag3_edbg_recv(): Inconsistent fragment number; expect 1, got 0
avrdude: stk500v2_jtag3_recv(): error in jtagmkII_recv()
avrdude: Short read, read only 0 out of 512 bytes
avrdude: jtag3_edbg_recv(): Unexpected response 0x00
avrdude: stk500v2_jtag3_recv(): error in jtagmkII_recv()
######avrdude: jtag3_edbg_recv(): Unexpected response 0x80
avrdude: stk500v2_jtag3_recv(): error in jtagmkII_recv()
avrdude: jtag3_edbg_send(): Unexpected response 0x81, 0x00
avrdude: Short read, read only 0 out of 512 bytes
avrdude: jtag3_edbg_recv(): Unexpected response 0x00
avrdude: stk500v2_jtag3_recv(): error in jtagmkII_recv()
######avrdude: jtag3_edbg_send(): Unexpected response 0x81, 0x11
avrdude: jtag3_edbg_recv(): Inconsistent fragment number; expect 1, got 0
avrdude: stk500v2_jtag3_recv(): error in jtagmkII_recv()
avrdude: jtag3_edbg_recv(): Inconsistent fragment number; expect 1, got 0
avrdude: stk500v2_jtag3_recv(): error in jtagmkII_recv()
####### | 100% 3.13s
avrdude: 922 bytes of flash written
avrdude: verifying flash memory against /var/folders/1n/b1z5c12n5xv_w78jc8xnqt186nc7wn/T/arduino_build_564701/Blink.ino.hex:
avrdude: load data flash data from input file /var/folders/1n/b1z5c12n5xv_w78jc8xnqt186nc7wn/T/arduino_build_564701/Blink.ino.hex:
avrdude: input file /var/folders/1n/b1z5c12n5xv_w78jc8xnqt186nc7wn/T/arduino_build_564701/Blink.ino.hex contains 922 bytes
avrdude: reading on-chip flash data:
Reading | avrdude: Short read, read only 0 out of 512 bytes
avrdude: jtag3_edbg_send(): Unexpected response 0x32, 0x00
avrdude: jtag3_edbg_recv(): Inconsistent fragment number; expect 1, got 0
avrdude: stk500v2_jtag3_recv(): error in jtagmkII_recv()
######avrdude: jtag3_edbg_recv(): Unexpected response 0x80
avrdude: stk500v2_jtag3_recv(): error in jtagmkII_recv()
avrdude: jtag3_edbg_send(): Unexpected response 0x81, 0x11
avrdude: jtag3_edbg_recv(): Unexpected response 0x80
avrdude: stk500v2_jtag3_recv(): error in jtagmkII_recv()
######avrdude: jtag3_edbg_send(): Unexpected response 0x81, 0x00
avrdude: Short read, read only 0 out of 512 bytes
avrdude: jtag3_edbg_recv(): Unexpected response 0x00
avrdude: stk500v2_jtag3_recv(): error in jtagmkII_recv()
######avrdude: jtag3_edbg_recv(): Inconsistent fragment number; expect 1, got 0
avrdude: stk500v2_jtag3_recv(): error in jtagmkII_recv()
avrdude: Short read, read only 0 out of 512 bytes
avrdude: jtag3_edbg_send(): Unexpected response 0x10, 0x55
avrdude: jtag3_edbg_recv(): Unexpected response 0x80
avrdude: stk500v2_jtag3_recv(): error in jtagmkII_recv()
#######avrdude: jtag3_edbg_send(): Unexpected response 0x81, 0x00
avrdude: jtag3_edbg_recv(): Unexpected response 0x80
avrdude: stk500v2_jtag3_recv(): error in jtagmkII_recv()
avrdude: jtag3_edbg_send(): Unexpected response 0x81, 0x11
avrdude: jtag3_edbg_recv(): Unexpected response 0x80
avrdude: stk500v2_jtag3_recv(): error in jtagmkII_recv()
######avrdude: jtag3_edbg_send(): Unexpected response 0x81, 0x11
avrdude: jtag3_edbg_recv(): Unexpected response 0x80
avrdude: stk500v2_jtag3_recv(): error in jtagmkII_recv()
avrdude: Short read, read only 0 out of 512 bytes
avrdude: jtag3_edbg_send(): Unexpected response 0x10, 0x55
######avrdude: jtag3_edbg_recv(): Inconsistent fragment number; expect 1, got 0
avrdude: stk500v2_jtag3_recv(): error in jtagmkII_recv()
avrdude: Short read, read only 0 out of 512 bytes
avrdude: jtag3_edbg_recv(): Unexpected response 0x00
avrdude: stk500v2_jtag3_recv(): error in jtagmkII_recv()
######avrdude: jtag3_edbg_recv(): Unexpected response 0x80
avrdude: stk500v2_jtag3_recv(): error in jtagmkII_recv()
avrdude: jtag3_edbg_send(): Unexpected response 0x81, 0x00
avrdude: Short read, read only 0 out of 512 bytes
avrdude: jtag3_edbg_recv(): Unexpected response 0x00
avrdude: stk500v2_jtag3_recv(): error in jtagmkII_recv()
####### | 100% 3.04s
avrdude: verifying ...
avrdude: verification error, first mismatch at byte 0x0000
0x80 != 0x0c
avrdude: verification error; content mismatch
avrdude: jtag3_edbg_send(): Unexpected response 0x81, 0x11
avrdude: jtag3_edbg_recv(): Inconsistent fragment number; expect 1, got 0
avrdude: stk500v2_jtag3_recv(): error in jtagmkII_recv()
avrdude: jtag3_edbg_recv(): Inconsistent fragment number; expect 1, got 0
avrdude: Short read, read only 0 out of 512 bytes
avrdude: jtag3_edbg_send(): Unexpected response 0x60, 0x55
avrdude: bad response to sign-off command: 0x14
avrdude: jtag3_edbg_signoff(): unexpected response 0x80, 0x01
avrdude: jtag3_edbg_signoff(): unexpected response 0x81, 0x00
avrdude done. Thank you.
the selected serial port
does not exist or your board is not connected
Hardware connection to ISP header:
Correct Orientation as seen in the picture (The tab on the programming 6 pin conn is facing inwards).
What did I try next?
- Installed
avrdude(using homebrew). It's version 7.2 - I compiled and exported the hex using
arduino-cli:
arduino-cli compile -b arduino:avr:uno --build-path $(pwd)/build
- Then Uploaded using the system's
avrdude:
avrdude -catmelice_isp -pm328p -v -Uflash:w:build/blink.ino.hex:i
Result: No error, clean build and upload.
What I noticed is: avrdude bundled in Arduino IDE's is 6.something.
Also I get error to burn bootloader using ATMEL-ICE, from IDE.
Any pointers, how to update the avrdude, if that's causing the issue.
Before I go down the rabbit-hole, I thought of asking here first.
Thank you for all your help in advance.
