Avrdude: stk500_recv(): programmer is not responding avrdude: stk500_getsync() attempt 10 of 10: not in sync: resp=0x00

Dears all,

About a month ago some of you helped me figure out a piece of code that fortunately ended up working properly.
Project consisting in a copule of switches operating a pair of relays and communicating through serial port to Pure Data environment.

LINK : Push button controlling optocoupler weird behavior

I’ve used the board and the circuit project for a few days and then left it alone for a few weeks.
A few days ago I picked it up again and realized my project stopped working.

First thing done was to to try uploading my sketch to the board (Arduino Uno).
But it keeps failing.
Tried on a Mac Pro (OS 10.13.6) with IDE 1.8.18 and on a Windows (W10 Pro) with the latest available IDE (2.3.1 I guess).
Getting the same error which I include below.

I’ve searched for similar issues on the forum I believe - prior to buying a new board - I’ll have to burn the Bootloader onto the Arduino UNO.

Now, I believe I’m facing an issue since I own a Arduino UNO and a Wemos ESP8266 D1 R1.
I’m not sure if the Bootloader Burning process it’s doable with these two different boards.

Has anyone faced this issue and got it solved somehow?

Thanks in advance

Alexis


ERROR from MONITOR:

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/alexis/Library/Arduino15/packages/arduino/tools/avrdude/6.3.0-arduino17/etc/avrdude.conf"
     User configuration file is "/Users/alexis/.avrduderc"
     User configuration file does not exist or is not a regular file, skipping

     Using Port                    : /dev/cu.usbmodem1421
     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=0x00
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 2 of 10: not in sync: resp=0x00
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 3 of 10: not in sync: resp=0x00
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 4 of 10: not in sync: resp=0x00
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 5 of 10: not in sync: resp=0x00
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 6 of 10: not in sync: resp=0x00
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 7 of 10: not in sync: resp=0x00
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 8 of 10: not in sync: resp=0x00
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 9 of 10: not in sync: resp=0x00
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 10 of 10: not in sync: resp=0x00

avrdude done. Thank you.

Problem uploading to board. See https://support.arduino.cc/hc/en-us/sections/360003198300 for suggestions.

Hi @alexis_perepelycia. 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?

Dear @ptillisch

Thanks for your reply.

I've tried what you've suggested:

  • the Arduino Uno board blinked its LED
  • the Wemos D1 board did not blinked its LED

The blinking thing is intended to confirm that the Bootloader is working properly or something like that?

However, I still cannot load my sketch.

Thanks again.

Best,

Alexis

This is normal. The instructions I provided above are specific to the UNO.

That is exactly it! When you press the reset button on the Uno board, the bootloader program is started. This bootloader (Optiboot) blinks the LED a few times quickly as a signal it is running.

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.

@ptillisch

Thanks again for the detailed explanations.

I've done what you've suggested and unfortunatelly got the exact same error I was getting before.
I include a screen capture of the port selection:

Best,

Alexis

It is possible for a short or external circuitry connected to the Arduino board to interfere with the upload process, causing this type of upload error.

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.

@ptillisch

I've been trying your suggested manner in order to separate software from hardware issues.
Therefore I'm currently working with just the pc, the board and the usb cable and the results I've been posting here were all obtained with the board detached from the shield and circuit.

Same error thou.

Thanks again,

Alexis

Given the information gathered so far, I am left with only two possible causes for the upload failure:

  • The bootloader was somehow corrupted.
  • There is physical damage to the microcontroller or its support circuitry.

Even though the blinking LED after you press the reset button does indicate the bootloader is at least somewhat functional, there is still a possibility that it was corrupted in a way that leaves it able to blink the LED, but not to perform an upload. If so, the board might be recoverable by performing a "Burn Bootloader" operation.

I have to warn you there is no guarantee that this somewhat complex procedure which requires additional hardware will recover your board. But if you have the necessary hardware and are up for a challenge and an interesting project then I think it is worth a try.

It is doable, but unfortunately not quite as straightforward as when using an AVR-based board like the UNO as the programmer.

The first thing you must be aware of is that the ESP8266 uses 3.3 V logic levels, while the Uno uses 5 V. When you are making electrical connections between the two boards, you must be careful to avoid subjecting the ESP8266 to 5 V as this exceeds the chip's rating and could cause permanent physical damage.

Another problem I discovered is that I was not able to make it work when using the standard "ArduinoISP" sketch on the ESP8266 board. I see from my notes that I was able to use it some years ago, but failed this time so maybe something has changed in the meantime. However, from a quick search on Google I found a community created variant of the sketch, which worked perfectly for me:

I'll provide instructions you can follow to perform a "Burn Bootloader" operation:


In the instructions below, the board used as an "Arduino as ISP" is referred to as the "programmer board". The board the bootloader is being burned on is referred to as the "target board".


A. Prepare "Arduino as ISP" programmer

Although the "Arduino as ISP" only works for programming targets of the AVR architecture, you can use some boards of other architectures (e.g., "AVR", "SAMD", "megaAVR") as an "Arduino as ISP" programmer.

  1. Disconnect the USB cable of the Arduino boards from your computer.

  2. Make the following connections between the pins on the "programmer board" and the "target board":

    Programmer Target
    CIPO (AKA "MISO") CIPO
    3V3 5V[1]
    SCK SCK
    COPI (AKA "MOSI") COPI
    D4 RESET
    GND GND

    The documentation for the boards you are using will identify the location of these pins. If you are using an official Arduino board, check the pinout diagram on the documentation page for the board.

  3. Click the following link to open the "8266asISP" sketch in your web browser:
    https://github.com/vince-br-549/ESP8266-as-ISP/blob/master/8266asISP/8266asISP.ino

  4. Click the downward pointing arrow icon ("Download raw file") at the right side of the toolbar:

  5. Select File > Open... from the Arduino IDE menus.
    The "Open" dialog will open.

  6. Select the downloaded 8266asISP.ino file from the extracted folder in the "Open" dialog.

  7. Click the "Open" button.
    A "Moving" dialog will open.

  8. Click the "OK" button in the "Moving" dialog
    The "8266asISP" sketch will open in a new Arduino IDE window.

  9. Connect the "programmer board" to your computer with a USB cable.

  10. Select your "programmer board" from Arduino IDE's Tools > Board menu.

  11. Select the port of your "programmer board" from Arduino IDE's Tools > Port menu.

  12. Select Sketch > Upload from the Arduino IDE menus.

  13. Wait for the upload to finish.

You are now ready to burn the bootloader using your "Arduino as ISP" programmer.

Footnotes

  1. This powers the UNO board at 3.3 V, using the ESP8266 board as a power supply. The reason for doing this is this will cause the UNO to use 3.3 V logic levels in its communications with the ESP8266 so that it won't be damaged. There are a couple of potential issues with this approach:
    • 3.3 V power supply is out of spec for the UNO. From experience, we know it is still possible to run it at this voltage, but this might result in instability. For this specific application where we only need the UNO to be stable for several seconds to complete the "Burn bootloader" operation, it is a more reasonable thing to do. Even if it fails once, it will probably be possible to get a successful "Burn Bootloader" operation after a few retries (assuming the Uno is good).
    • The ESP8266 board's 3.3 V power supply might not be capable of powering the UNO in addition to the ESP8266 itself. From my notes I see that the "Burn Bootloader" operation failed when I powered the UNO from the ESP8266 board and was only successful after I used a separate 3.3 V power supply for the UNO. However, this time around I was successful when powering the UNO from the ESP8266 board (I am using a WEMOS D1 Mini) so it is worth trying.

B. Burn Bootloader

Instructions for burning the bootloader:


It is not possible to do this via "Arduino Cloud Editor". You will need to use Arduino IDE or Arduino CLI.


  1. Select the "target board" from the Tools > Board menu, and any other custom Tools menus (e.g., Tools > Processor).
  2. Select Tools > Programmer > Arduino as ISP from the Arduino IDE menus.
  3. Select Tools > Burn Bootloader from the Arduino IDE menus.
  4. Wait for the process to finish successfully.
  5. Disconnect the USB cable of the "programmer board" from your computer.
  6. Disconnect the "programmer board" from the "target board".

Dear @ptillisch ,

thanks a lot for the exhaustive reply/tutorial.
I'll make my best to do what you've suggested and try to recover my boards and let you know if I succeed or not or if I got stuck somewhere in the process.
However I realize I'd need a few back up boards since they might fail at any time without prior warning.
Thanks again.

Best,

Alexis

Dear @ptillisch,

Haven't tried yet your solutions. I'll do asap.
In the meantime got a new board and worked at once.
So definitelly my old boards are failing somehow. I'll let you know whenever I could recover them.

Best,

Alexis

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.