Skip to the content.

Note: Only the Arduino IDE has Burn Bootloader functionality. It is not possible to do this via Arduino Web Editor or arduino-cli.


General troubleshooting advice


How do I burn the bootloader to my AVR board?

The following instructions are for targets that use the AVR architecture (e.g., Uno, Nano, Leonardo, Mega).

You will need an ISP programmer. If you don’t have a programmer, you can use a spare Arduino board as an “Arduino as ISP” programmer. Although the “Arduino as ISP” only works for programming targets of the AVR architecture, you can use boards of any architecture as an “Arduino as ISP” programmer.

Instructions:

  1. Make the following connections between the Arduino board you will be using as the programmer and the target. Refer to the “Connections” table on the SPI library reference page to determine the pins:

    Programmer Target
    MISO MISO
    VCC 5V (or VCC on 3.3 V boards)
    SCK SCK
    MOSI MOSI
    10 RESET
    GND GND
  2. Connect the programmer board to your computer with a USB cable.
  3. File > Examples > 11.ArduinoISP > Arduino ISP
  4. Select the port of your board from the Tools > Port menu.
  5. Sketch > Upload
  6. Wait for the upload to finish.

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

Instructions for burning the bootloader:

  1. Connect an ISP programmer to the ICSP header on your Arduino board.
  2. Select the target board from the Tools > Board menu and any other custom Tools menus (e.g. Tools > Processor).
  3. Select the appropriate programmer from the Tools > Programmer menu.
  4. Tools > Burn Bootloader
  5. Wait for the process to finish successfully.

You can also use your ISP programmer to upload sketches to the target board via Sketch > Upload Using Programmer. Note that when you do this, the bootloader is erased. After using Upload Using Programmer, you would need to do another Burn Bootloader before you can go back to uploading to the target board normally via the USB cable.


How do I burn the bootloader to my MKR or Nano 33 IoT board?

You’ll need:

Instructions:

  1. Connect an SD card to your computer.
  2. Open this link in your browser: https://github.com/arduino/ArduinoCore-samd/tree/master/bootloaders
  3. Click the folder that matches the name of your target board.
  4. Click the file that ends in .bin
  5. Click the “Download” button.
  6. Rename the downloaded file to fw.bin
  7. Move fw.bin to the SD card.
  8. Eject the SD card from your computer.
  9. Plug the USB cable of the Arduino board you will be using as a programmer into your computer.
  10. (In the Arduino IDE) Sketch > Include Library > Manage Libraries
  11. Wait for the download to finish.
  12. In the “Filter your search…” field, type “Adafruit DAP library”.
  13. Press “Enter”.
  14. Click on “Adafruit DAP library by Adafruit”.
  15. Click the “Install” button.
  16. Wait for the installation to finish.
  17. Click the “Close” button.
  18. File > Examples > Adafruit DAP library > flash_from_SD
  19. Change this line:
    #define SD_CS 4
    

    according to the Arduino pin connected to the SD CS pin. If your board has a built-in SD slot (e.g., MKR Zero), then you can change this line:

    if (!SD.begin(SD_CS)) {
    

    to:

    if (!SD.begin()) {
    
  20. Select the correct board from the Tools > Board menu.
  21. Select the correct port from the Tools > Port menu.
  22. Sketch > Upload
  23. Wait for the upload to finish successfully.
  24. Unplug the programmer Arduino board from your computer.
  25. Plug the SD card into the SD slot connected to your Arduino board.
  26. Connect the programmer Arduino board to the target Arduino board (see pinout diagrams below) as follows:

    Programmer Target
    VCC +3V3
    10 SWDIO
    9 SWCLK
    GND GND
    11 RESETN
  27. Plug the USB cable of the programmer Arduino board into your computer.
  28. Tools > Serial Monitor. You should now see the target board detected, and the bootloader file flashed to it successfully.
  29. Unplug the programmer Arduino board from your computer.
  30. Disconnect the programmer Arduino board from the target Arduino board.

Note: another alternative is to use a J-Link debug probe (J-Link EDU Mini and J-Link clones are available for a low price) with the Adalink software: https://github.com/adafruit/Adafruit_Adalink

SWD pinout diagrams:

MKR boards other than MKR 1000

Code tags button

MKR 1000

Code tags button

Nano 33 IoT

Code tags button


How do I burn the bootloader to my Arduino Zero?

The Zero has a built-in programmer, which makes burning the bootloader very easy.

  1. Connect a USB cable to the “Programming Port” of the Zero.
  2. Plug the USB cable of the Zero into your computer.
  3. Tools > Board > Arduino Zero (Programming Port)
  4. Tools > Programmer > Atmel EDBG
  5. Tools > Burn Bootloader. The Burn Bootloader process should now proceed successfully.

How do I burn the bootloader to my Uno WiFi Rev2?

The Uno WiFi Rev2 has a built-in programmer, which makes burning the bootloader very easy.

  1. Plug the USB cable of the Uno WiFi Rev2 into your computer.
  2. Tools > Board > Arduino Uno WiFi Rev2
  3. Tools > Programmer > Onboard Atmel mEDBG (UNO WiFi Rev2)
  4. Tools > Burn Bootloader. The Burn Bootloader process should now proceed successfully.

Verbose output during Burn Bootloader

If the Burn Bootloader process is failing, it can be very helpful to check the verbose output to see what the problem is:

  1. File > Preferences
  2. Check the box next to “Show verbose output during: > upload”.
  3. Click the “OK” button.
  4. Do the Burn Bootloader.
  5. After the process fails, check the output in the black console window at the bottom of the Arduino IDE window. You may need to scroll up to see it all.

Specific issues


avrdude: warning: cannot set sck period. please check for usbasp firmware update.

This is normal with the common USBasp clones and does not indicate a problem. If you are having a problem burning the bootloader, this is not the cause. It is possible to upgrade the USBasp firmware, but it’s a somewhat advanced process so you should only upgrade if you actually need the features of the new firmware version.


avrdude: Device signature = 0x000000 or avrdude: Device signature = 0xffffff or avrdude: Device signature = {some random wrong signature}, avrdude: Yikes! Invalid device signature.

Carefully check the wiring between the programmer and target. If using an “Arduino as ISP” programmer, note that not all boards have the SPI bus on Arduino pins 11, 12, 13. Refer to the “Connections” table on the SPI library reference page to determine your board’s SPI pins.

If the target’s fuses were set to use an external clock/resonator/crystal, but no external clock source is attached, you will not be able to program the target. The solution is to connect a clock source to the target long enough to set the fuses to use the internal oscillator, after which the external clock source will no longer be required. The Arduino IDE’s Burn Bootloader process sets the fuses according to the definition of the currently selected board.

Make sure you have selected your target board from the Tools > Board menu.


avrdude: stk500_getsync() attempt 1 of 10: not in sync: resp=0x{some code}

Make sure you uploaded the File > Examples > 11.ArduinoISP > Arduino ISP sketch to the programmer board.

If you’re using an ATmega32U4-based board (e.g., Leonardo, Micro, Pro Micro, Yun) as an “Arduino as ISP” programmer, select “Arduino as ISP (ATmega32U4)” from the Tools > Programmer menu. If you don’t see that programmer option in the Tools > Programmer menu, you need to update Arduino AVR Boards, following these instructions:

  1. Tools > Board > Boards Manager
  2. Wait for the downloads to finish.
  3. Click on “Arduino AVR Boards”.
  4. Click the “Update” button.
  5. Wait for the update to finish.
  6. Click the “Close” button.

avrdude: stk500_getparm(): (a) protocol error, expect=0x14, resp=0x10, avrdude: stk500_initialize(): (b) protocol error, expect=0x10, resp=0x01, avrdude: initialization failed, rc=-1

Make sure you’re using Arduino AVR Boards 1.8.1 or newer. You can check the Arduino AVR Boards version and upgrade if necessary by following these instructions:

  1. Tools > Board > Boards Manager
  2. Wait for the download to finish.
  3. Click on “Arduino AVR Boards”.
  4. Click the “Update” button.
  5. Wait for the update to finish.
  6. Click the “Close” button.

If the problem still occurs with Arduino AVR Boards 1.8.1 or newer, connect a 10 uF capacitor between the GND and RST pins on the “Arduino as ISP” programmer board.


avrdude: Error: Could not find USBtiny device (0x2341/0x49) / avrdude: Error: Could not find USBtiny device (0x2a03/0x49) while using an “Arduino as ISP” programmer

This is caused by using the “ArduinoISP” or “ArduinoISP.org” Programmer menu selections when using the Arduino as ISP programmer. You need to select Tools > Programmer > Arduino as ISP.


How do I use -F to override AVRDUDE’s signature check?

Although AVRDUDE suggests overriding the signature check via the -F command line flag, this would only be helpful in extremely rare cases where the chip’s signature has somehow been corrupted. Much more often, the signature check fails because the programmer is incorrectly connected to the target or the wrong board was selected. In those cases, disabling the signature check won’t solve the problem.


avrdude: error: program enable: target doesn't answer. 0, avrdude: initialization failed, rc=-1

This error is caused by using the libusb-win32 driver with Arduino’s version of AVRDUDE. The solution is to use the libusbK driver instead:

  1. Download Zadig: https://zadig.akeo.ie. Note that Zadig is recommended on the official USBasp website.
  2. Plug in your USBasp
  3. Start Zadig
  4. From the dropdown menu, select USBasp. If it doesn’t show up on the menu, select Options > List all devices and check again.
  5. Click the up or down arrows next to the Driver selection box on the right side until you see libusbK.
  6. Click the “Replace Driver” button.
  7. Wait for the driver installation to finish.
  8. Close Zadig.

avrdude: error: program enable: target doesn't answer. 1, avrdude: initialization failed, rc=-1

Make sure the programmer’s cable is correctly connected to the target board. Pin 1 on the cable is indicated by a small triangle embossed on the plastic. Pin 1 on the Arduino board’s ICSP header is indicated by a white dot on the PCB’s silkscreen.

If your USBasp programmer has the official firmware, you must short the JP3 jumper to program chips that are running at <=1 MHz clock speed. The factory default clock configuration is running on the internal oscillator at 1 MHz. Many of the common Chinese USBasp clones come with a modified firmware that is able to work with chips running at the slower clock speeds without needing to set the jumper. There is also a alternate open source firmware provided by the community that has this functionality.


avrdude: stk500v2_program_enable(): bad AVRISPmkII connection status: RST fail, Target reverse inserted

Make sure the programmer’s cable is correctly connected to the target board. Pin 1 on the cable is indicated by a small triangle embossed on the plastic. Pin 1 on the Arduino board’s ICSP header is indicated by a white dot on the PCB’s silkscreen.