Uploading to UNO R3 fails: "exit status 1"

Continuing the discussion from Failed uploading: uploading error: exit status 1:

May I jump on this please, i have an Arduino Uno R3, I am unable to upload any new instructions to my board. I have Arduino Uno selected as the board on IDE, COM 3 is my only option. My board has an active programme on it currently so I do not believe I have busted the board in any way. I am receiving the exit status 1 error message like OP

Hi @danlindsay90.

I'm going to ask you to post the full verbose output from an upload attempt.


:exclamation: This procedure is not intended to solve the problem. The purpose is to gather more information.


Please do this:

  1. Select File > Preferences... (or Arduino IDE > Settings... for macOS users) from the Arduino IDE menus.
    The "Preferences" dialog will open.
  2. Uncheck the box next to Show verbose output during: β˜‘ compilation in the "Preferences" dialog.
  3. Check the box next to Show verbose output during: ☐ upload.
  4. Click the "OK" button.
  5. Attempt an upload, as you did before.
  6. Wait for the upload to fail.
  7. You will see a "Upload error: ..." notification at the bottom right corner of the Arduino IDE window. Click the "COPY ERROR MESSAGES" button on that notification.
  8. Open a forum reply here by clicking the "Reply" button.
  9. Click the <CODE/> icon on the post composer toolbar.
    This will add the forum's code block markup (```) to your reply to make sure the error messages are correctly formatted.
    Code block icon on toolbar
  10. Press the Ctrl+V keyboard shortcut (Command+V for macOS users).
    This will paste the error output from the upload into the code block.
  11. Move the cursor outside of the code block markup before you add any additional text to your reply.
  12. Click the "Reply" button to post the output.

The "exit status 1" error you noticed is only a generic code that tells us something went wrong, but nothing about what went wrong. There are a huge number of possible unrelated different problems that could cause an upload to exit with status code 1.

The cause in the case of the topic you are referencing happened to be very specific to the ESP32-S2 microcontroller on the board they were using. Since your Uno R3 board doesn't use that microcontroller, the cause of the upload failure you are experiencing is something completely different.

Like this?

Sketch uses 924 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.
"C:\Users\lindan\AppData\Local\Arduino15\packages\arduino\tools\avrdude\6.3.0-arduino17/bin/avrdude" "-CC:\Users\lindan\AppData\Local\Arduino15\packages\arduino\tools\avrdude\6.3.0-arduino17/etc/avrdude.conf" -v -V -patmega328p -carduino "-PCOM3" -b115200 -D "-Uflash:w:C:\Users\lindan\AppData\Local\Temp\arduino\sketches\BF4CF3023895639FDC46AE1F8769D679/sketch_feb24a.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 "C:\Users\lindan\AppData\Local\Arduino15\packages\arduino\tools\avrdude\6.3.0-arduino17/etc/avrdude.conf"

         Using Port                    : COM3
         Using Programmer              : arduino
         Overriding Baud Rate          : 115200
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 1 of 10: not in sync: resp=0xff
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 2 of 10: not in sync: resp=0xff
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 3 of 10: not in sync: resp=0xff
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 4 of 10: not in sync: resp=0xff
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 5 of 10: not in sync: resp=0xff
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 6 of 10: not in sync: resp=0xff
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 7 of 10: not in sync: resp=0xff
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 8 of 10: not in sync: resp=0xff
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 9 of 10: not in sync: resp=0xff
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 10 of 10: not in sync: resp=0xff

avrdude done.  Thank you.

Failed uploading: uploading error: exit status 1

Exactly! This information gives us a better idea of the conditions under which the upload failed, but unfortunately there are still multiple possible causes (even though far less than for "exit status 1") of this error output so we will need to perform additional procedures in order to try to find the specific cause.

Please try this experiment and then report back with the results:


:exclamation: This procedure is not intended to solve the problem. The purpose is to gather more information.


  1. Connect the Arduino board to your computer with a USB cable.
  2. Press and release the button on the Arduino board that is marked "RESET".

Now please reply here on the forum thread with the answer to the following question:

  • Did you see the "L" LED blink multiple times quickly immediately after you released the "RESET" button?

I did as instructed and have seen the L LED blink approx 3/4 times rapidly.

OK, that is good. The blink after reset eliminates some possible causes of the upload error. We now know two things:

  • The primary microcontroller on the board is running
  • The bootloader program that handles sketch uploads is present on the microcontroller.

Now we move on to investigating other possible causes of the error.

This error might be caused by having the wrong port selected from the Tools > Port menu in Arduino IDE.

Please perform this experiment to verify that the port you have selected is your Arduino board:

With official boards, the port will be labeled with the board name in the menu (e.g., "COM42 (Arduino Uno)"). In this case, you can be fairly confident that you have identified the port. Select that port from the menu and try uploading again.

With some cheap derivative boards the port will not be labeled. You can positively identify the port using this procedure:

  1. Disconnect the USB cable of the Arduino board from your computer.
  2. Select Tools > Port from the Arduino IDE menus.
  3. Take note of the ports, if any, listed in the menu.
  4. Close the Tools menu.
    :exclamation: The ports list is only updated when the Tools menu is re-opened, so this step is essential.
  5. Connect the Arduino board to your computer with a USB cable.
  6. Select Tools > Port from the Arduino IDE menus. - If a new port is listed in the menu, that is the port of your Arduino board.

Select that port from the menu and try uploading again.

If the upload still fails, or if no new port appeared after you plugged the Arduino board into your computer, add a reply here to let us know and we'll investigate the problem further.

After doing the above test here are some additional points

  1. Do you have anything connected to the pins 0 and 1? This will interfere with the upload. Disconnect it.
  2. Do you have anything else connected to the Uno? This might consume to much power. Disconnect it.
  3. If your Uno does not use the CH340 serial-to-usb converter for communication with the PC, you can run the loopback test: Loop-Back Test Instructions.

I'm seeing one port, COM3

My new uno R3 has arrived today, i have attempted the loop back test with both boards. My OG board does not duplicate the text, the new one does.

Please tell us which USB to serial bridge chip your "OG" board has. This is a black chip near the USB socket.

The chip will usually be identified by writing on the top. This might say something like "Atmel MEGA16U2" or "WCH CH340G" or "SILABS CP2102".

Examples:

Microchip ATmega16U2

ATmega16U2

πŸ“·

MakeMagazinDE - CC BY-SA 4.0 (cropped)

WCH CH340

CH340

πŸ“·

SparkFun - CC BY-SA 4.0 (cropped)


If it isn't clear, alternatively you can provide the link to where you bought the board from and we'll see if we can determine the chip from the product listing.

It’s an Atmel mega16u2

OK. The reason I asked is because the loopback test results are inconclusive when using a cheap derivative board with a WCH CH340 chip (in this case the test can fail even with a perfectly functional board). But since your board has the ATmega16U2 chip, we can trust the result of the loopback test.

The test result indicates there is some problem in the ATmega16U2 chip or in the circuit between the chip and pins 0 and 1 on the board (and thus likely between the chip and the primary ATmega328P microcontroller.

It is possible for a short or external circuitry connected to the Arduino board to interfere with the circuit, causing the problems you are experiencing.

Make sure the board is not sitting on anything conductive that could short the contacts on the bottom of the board. Make sure there isn't any conductive debris (e.g., strands of wire or component leads) on the board or on the surface the board is sitting on.

If you have a shield or any external circuitry or components connected to your Arduino board, try this experiment:

  1. Disconnect the USB cable of the Arduino board from your computer.
  2. Disconnect any shields, modules, external circuitry, etc. from your board.
  3. Connect the Arduino board to your computer with a USB cable.

Now try uploading a sketch to the board again. Does the upload succeed?

This experiment will determine whether the upload error was caused by interference from your external circuitry. If so, you can then focus your attention on identifying the specific problem with the circuit and resolving it.

No success

So my new board is now also experiencing the same problems. I am using a 12v power supply connected to the arduino / breadboard. My code to operate a valve on a delay was working fine, when trying to introduce a push button to activate instead i seem to be having problems.

This is my setup, input power of 12v, a 12v solenoid valve, and a safety relay

Please draw wiring diagram; it's difficult to follow all wiring.

2 posts were split to a new topic: Upload fails: "The semaphore timeout period has expired."