Failure during upload

i keep getting this error on hitting upload:

avrdude: stk500_paged_write(): (a) protocol error, expect=0x14, resp=0x00
avrdude: stk500_cmd(): programmer is out of sync
...
avrdude: stk500_recv(): programmer is not responding
...
avrdude: ser_send(): write error: Device not configured
avrdude: ser_recv(): read error: Device not configured
...
ioctl("TIOCMGET"): Device not configured
avrdude: ser_close(): can't reset attributes for device: Device not configured

using:
Arduino Uno rev 3

on Mac
ArduinoIDE:
Version: 2.3.3
Date: 2024-09-25T09:35:36.798Z (2 months ago)
CLI Version: 1.0.4

Board info:
BN: Arduino Uno
VID: 0x2341
PID: 0x0043
SN: A413237393535111C171

port:
/device/cu/usbmodem11401 (Arduino Uno)

all pins clear, nothing plugged in

on releasing reset button the L light gives 3 fast blinks

please, help

sounds like a boot loader issue but I could be mistaken

You've made > 30 posts in the twelve hours you've been here.

In at least one you cop to being a noob.

At least one was obvsly stupid charGPT generated.

Slow your role. I understand the desire to help but perhaps that will make more sense when you are better able to do.

a7

The "Device not configured" message indicates the problem is on the host side / not the target side. You are mistaken.

Presumably you meant "slow your roll". Though, weirdly, your version also works.

...is equally off-topic. I suggest you both return to the topic at hand. You'll find that in the first post.

Can you provide the history of the board. Is it new and never worked or did you use it in the past with success? If the latter, what was the last project that you worked on when it was still possible to upload; we might be specifically interested in the fact if there were (or now are) voltages involved different from the 5V and if anything related to motors, relays etc. were / are.

Your PC seems to be a Mac; I don't have experience with it.

The first question would be if that device disappears from the IDE when you disconnect the board. As it says Uno at the end and the VID/PID match the VID/PID of a genuine Uno I suspect that it will.

You can try the loopback test. I suspect that it will fail.

The second question is what your Mac thinks of your board. As I do not have experience with a Mac I can't tell you where to start digging but you might know; it would be somewhere in the system logs (under Linux it would be the dmesg command).

You did a bit of research by the looks of it :+1: Lots of useful details. The only thing that you have missed is the avrdude command that is issued by the IDE. If you enable verbose output dutring upload under file/preferences in the IDE and perform an upload the first few lines after the memory report will contain that information.

2 Likes

yes. The board is old. Last time i used it was something like 2013. Since then it sat on the shelf. It had been used (back in 2013) to drive a stepper motor to control focus on a video camera. ( i was working on this short: https://vimeo.com/manage/videos/100793579) I had two shields mounted on her: a ProtoShield housing an Easydriver v4.4 (Easy Driver stepper motor driver) and a Unified Microsystems ATS-1 terminal shield. When these are connected today, the code that i wrote (and is apparently still uploaded) starts running (and it seems to run fine, although i coded it fairly clumsily, so i can't report it with absolute certainty).

It's been over 10 years, so it's somewhat difficult to remember everything, but I believe that it was 5v -- and it wasn't powerful enough, so I switched to bigger motors, higher voltage, and a different controller (an app written in Object-C on mac). But that's a different story--nothing to do with this board.

So to sum up: motors -- yes, voltages different from 5V -- no.

Yes it does.

thank you. did that now. here's the output:

FQBN: arduino:avr:uno
Using board 'uno' from platform in folder: /Users/denis/Library/Arduino15/packages/arduino/hardware/avr/1.8.6
Using core 'arduino' from platform in folder: /Users/denis/Library/Arduino15/packages/arduino/hardware/avr/1.8.6

Detecting libraries used...
/Users/denis/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=10607 -DARDUINO_AVR_UNO -DARDUINO_ARCH_AVR -I/Users/denis/Library/Arduino15/packages/arduino/hardware/avr/1.8.6/cores/arduino -I/Users/denis/Library/Arduino15/packages/arduino/hardware/avr/1.8.6/variants/standard /private/var/folders/jv/4xyx5mcs327c7dxd82kp8b100000gq/T/arduino/sketches/DA453682888A0868704F1FA18D81167B/sketch/sketch_nov30a.ino.cpp -o /dev/null
Generating function prototypes...
/Users/denis/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=10607 -DARDUINO_AVR_UNO -DARDUINO_ARCH_AVR -I/Users/denis/Library/Arduino15/packages/arduino/hardware/avr/1.8.6/cores/arduino -I/Users/denis/Library/Arduino15/packages/arduino/hardware/avr/1.8.6/variants/standard /private/var/folders/jv/4xyx5mcs327c7dxd82kp8b100000gq/T/arduino/sketches/DA453682888A0868704F1FA18D81167B/sketch/sketch_nov30a.ino.cpp -o /private/var/folders/jv/4xyx5mcs327c7dxd82kp8b100000gq/T/4114196987/sketch_merged.cpp
/Users/denis/Library/Arduino15/packages/builtin/tools/ctags/5.8-arduino11/ctags -u --language-force=c++ -f - --c++-kinds=svpf --fields=KSTtzns --line-directives /private/var/folders/jv/4xyx5mcs327c7dxd82kp8b100000gq/T/4114196987/sketch_merged.cpp
Compiling sketch...
/Users/denis/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 -MMD -flto -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10607 -DARDUINO_AVR_UNO -DARDUINO_ARCH_AVR -I/Users/denis/Library/Arduino15/packages/arduino/hardware/avr/1.8.6/cores/arduino -I/Users/denis/Library/Arduino15/packages/arduino/hardware/avr/1.8.6/variants/standard /private/var/folders/jv/4xyx5mcs327c7dxd82kp8b100000gq/T/arduino/sketches/DA453682888A0868704F1FA18D81167B/sketch/sketch_nov30a.ino.cpp -o /private/var/folders/jv/4xyx5mcs327c7dxd82kp8b100000gq/T/arduino/sketches/DA453682888A0868704F1FA18D81167B/sketch/sketch_nov30a.ino.cpp.o
Compiling libraries...
Compiling core...
Using precompiled core: /private/var/folders/jv/4xyx5mcs327c7dxd82kp8b100000gq/T/arduino/cores/arduino_avr_uno_73ceff661468fb901b04107ff6c25785/core.a
Linking everything together...
/Users/denis/Library/Arduino15/packages/arduino/tools/avr-gcc/7.3.0-atmel3.6.1-arduino7/bin/avr-gcc -w -Os -g -flto -fuse-linker-plugin -Wl,--gc-sections -mmcu=atmega328p -o /private/var/folders/jv/4xyx5mcs327c7dxd82kp8b100000gq/T/arduino/sketches/DA453682888A0868704F1FA18D81167B/sketch_nov30a.ino.elf /private/var/folders/jv/4xyx5mcs327c7dxd82kp8b100000gq/T/arduino/sketches/DA453682888A0868704F1FA18D81167B/sketch/sketch_nov30a.ino.cpp.o /private/var/folders/jv/4xyx5mcs327c7dxd82kp8b100000gq/T/arduino/sketches/DA453682888A0868704F1FA18D81167B/../../cores/arduino_avr_uno_73ceff661468fb901b04107ff6c25785/core.a -L/private/var/folders/jv/4xyx5mcs327c7dxd82kp8b100000gq/T/arduino/sketches/DA453682888A0868704F1FA18D81167B -lm
/Users/denis/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 /private/var/folders/jv/4xyx5mcs327c7dxd82kp8b100000gq/T/arduino/sketches/DA453682888A0868704F1FA18D81167B/sketch_nov30a.ino.elf /private/var/folders/jv/4xyx5mcs327c7dxd82kp8b100000gq/T/arduino/sketches/DA453682888A0868704F1FA18D81167B/sketch_nov30a.ino.eep
/Users/denis/Library/Arduino15/packages/arduino/tools/avr-gcc/7.3.0-atmel3.6.1-arduino7/bin/avr-objcopy -O ihex -R .eeprom /private/var/folders/jv/4xyx5mcs327c7dxd82kp8b100000gq/T/arduino/sketches/DA453682888A0868704F1FA18D81167B/sketch_nov30a.ino.elf /private/var/folders/jv/4xyx5mcs327c7dxd82kp8b100000gq/T/arduino/sketches/DA453682888A0868704F1FA18D81167B/sketch_nov30a.ino.hex

/Users/denis/Library/Arduino15/packages/arduino/tools/avr-gcc/7.3.0-atmel3.6.1-arduino7/bin/avr-size -A /private/var/folders/jv/4xyx5mcs327c7dxd82kp8b100000gq/T/arduino/sketches/DA453682888A0868704F1FA18D81167B/sketch_nov30a.ino.elf
Sketch uses 444 bytes (1%) 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/denis/Library/Arduino15/packages/arduino/tools/avrdude/6.3.0-arduino17/bin/avrdude" "-C/Users/denis/Library/Arduino15/packages/arduino/tools/avrdude/6.3.0-arduino17/etc/avrdude.conf" -v -V -patmega328p -carduino "-P/dev/cu.usbmodem11101" -b115200 -D "-Uflash:w:/private/var/folders/jv/4xyx5mcs327c7dxd82kp8b100000gq/T/arduino/sketches/DA453682888A0868704F1FA18D81167B/sketch_nov30a.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/denis/Library/Arduino15/packages/arduino/tools/avrdude/6.3.0-arduino17/etc/avrdude.conf"
         User configuration file is "/Users/denis/.avrduderc"
         User configuration file does not exist or is not a regular file, skipping

         Using Port                    : /dev/cu.usbmodem11101
         Using Programmer              : arduino
         Overriding Baud Rate          : 115200
         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 : Arduino
         Description     : Arduino
         Hardware Version: 3
         Firmware Version: 4.4
         Vtarget         : 0.3 V
         Varef           : 0.3 V
         Oscillator      : 28.800 kHz
         SCK period      : 3.3 us

avrdude: AVR device initialized and ready to accept instructions

Reading | ################################################## | 100% 0.00s

avrdude: Device signature = 0x1e950f (probably m328p)
avrdude: reading input file "/private/var/folders/jv/4xyx5mcs327c7dxd82kp8b100000gq/T/arduino/sketches/DA453682888A0868704F1FA18D81167B/sketch_nov30a.ino.hex"
avrdude: writing flash (444 bytes):

Writing | 
avrdude: stk500_paged_write(): (a) protocol error, expect=0x14, resp=0x00
############avrdude: stk500_cmd(): programmer is out of sync
avrdude: stk500_cmd(): programmer is out of sync

numerous repeating lines, which i skip
then this:

avrdude: ser_recv(): read error: Device not configured
avrdude: stk500_recv(): programmer is not responding
# | 100% 1225.67s

avrdude: 444 bytes of flash written
avrdude: ser_send(): write error: Device not configured
avrdude: ser_recv(): read error: Device not configured
avrdude: stk500_recv(): programmer is not responding
ioctl("TIOCMGET"): Device not configured
avrdude: ser_close(): can't reset attributes for device: Device not configured

avrdude done.  Thank you.

i'll try this tomorrow (it's 3:48AM EST now, so late)

thank you

i do unplug all shields before uploading (just to preempt possible question)

For when you wake up :sleeping:

Can you remember if there is any serial communication implemented in the sketch that is still loaded? If yes, do you still see output (if applicable) in e.g. serial monitor or can you control the sketch from serial monitor (if applicable)?

The three quick flashes after releasing the reset button indicate that the boot loader is still function. Combined with the fact that the sketch still seems to be running the 328P processor should be OK.

Arduino talks to ATS-1 via serial

#define BELL       0x07  //Character to send to the ATS-1 to generate a beep
#define CLS        0x01  //Character to send to the ATS-1 to clear the LCD and home the cursor
#define LED_ON     0x11  //Character to send to the ATS-1 to turn LED on
#define LED_OFF    0x12  //Character to send to the ATS-1 to turn LED off
#define GOTOXY     0x14  //Move cursor to XY position 
#define CUR_LEFT   0x16  //Move cursor left 1 char (arrow key)
#define CUR_CR     0x0D  //Carriage Return – moves cursor to first 
#define CUR_LF     0x0A  //Line Feed – moves cursor to other line, same horizontal position

i found a version of the old code. it's most likely not the code presently uploaded onto the UNO, but an another version. still now i have some idea. And i'm starting to think that maybe it is not running fine. I can't tell for sure because i don't know what is loaded -- it might be the case that i loaded some incomplete sketch onto the UNO, and left it. So it's one of the two: either an incomplete sketch is loaded, or the unit is not operating properly.

i opened the Serial Monitor on Arduino IDE. On the reset, it shows:

13:41:47.239 -> ����������������������������������������������������������������``�����fx���f~`~�����``f�~ff���f`��f~�

which i understand corresponds to
<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< Choose a Button! Setup Time Focus
which is what the display shows

How do I find out for sure?

Try different baud rates.

switched to 4800. now the serial monitor displays same messages as ATS-1
thank you

1 Like