Comments: Installing an Arduino Bootloader


Looking for answers to technical questions?

We welcome your comments and suggestions below. However, if you are looking for solutions to technical questions please see our Technical Assistance page.

  • -------------------- Tech Support Tips/Troubleshooting/Common Issues --------------------

    RedBoard/Arduino Uno as the Target Board

    If you are uploading with an the Pocket AVR programmer using the command line, make sure that you are in the directory that the hex file is located in. From there, avrdude will know where to look to flash the code to your microcontroller. For example, I have the redboard.hex file complete with an Arduino Uno bootloader that I want to flash on my RedBoard with Atmega328P. If the fuse bits are set, you would write it like so to flash the firmware and lock the fuse bits :

      avrdude -b 19200 -c usbtiny -p m328P -v -e -U flash:w:redboard.hex -U lock:w:0x0F:m

    Arduino Mega as the Target Board

    Installing the Arduino Bootloader with Arduino Mega 2560 =>

    Atmega32U4 as the Target Board

    If you have issues connecting to the Atmega32U4, make sure that you are in bootloader mode. I was not able to connect to a 5V/16MHz Pro Micro with the Atmega32U4 until I hit the reset button twice [ ]. This put the microcontroller in bootloader mode.

    Lock Bits with the Pocket AVR Programmer

    For some strange reason you will lock it as 0x0F when using the Pocket AVR Programmer but when checking with an official Atmel AVR microcontroller, it looks to be 0xCF for the lock bits.

    Arduino Error

    If you are getting an error in the Arduino IDE similar to this with the Pocket AVR Programmer:

    avrdude: verification error, first mismatch at byte 0x0000
    0x0c != 0x00
    avrdude: verification error; content mismatch

    Try looking at this tutorial =>

    I never fully understood this particular Arduino error output. I think it has something to do with either the fuse bits or lock bits when the programmer is trying to verify the bits in Arduino's board definitions. It could also be the write speed to the microcontroller's flash memory or something with the RESET pin being triggered when your computer is trying to open the COM port to the Arduino development board as explained in the tutorial.

  • This works! Thanks. Saved me from buying a new MKR1000.

  • Member #801599 / about 8 years ago / 1

    Hi, I've designed a board that uses the Atmega328p. However, I had to burn Bootloader myself, so I used the Arduino Uno as a programmer, but now I can only upload sketch to my board via Arduino Uno (programmer) but not through the RS-232 port. On other boards that I've designed with the Atmega28P Bootloader pre-burnt, I can upload sketch via RS-232 port. Any ideas why that is?

    • M-Short / about 8 years ago / 1

      Make sure you've uploaded the correct bootloader as there are a few that will work on the ATmega328. Also make sure your fusebits are correct. The Arduino IDE will grab the fusebits from a file and set those when it uploads the bootloader. This is good if you are actually uploading to an Uno, etc. But if your setup is a bit different (like using the internal clock instead of an external crystal) this might cause problems. Also, if you didn't use the Arduino IDE to upload the bootloader you might need to set the fuse bits. If you still have questions feel free to email with a summary of what file you used, how you uploaded the bootloader and a screenshot of any errors and they may have more answers for you.

  • Member #723220 / about 9 years ago / 1

    Can I upload firmware of atmega16u2 of arduino board using arduino as ISP ?

    • M-Short / about 9 years ago / 1

      The only real requirement (other than it being an AVR) is that the Arduino IDE can compile the code first. There are things like the chip, speed, etc., that are determined using the boards.txt file. If there is no entry the Arduino IDE can not compile the code. By default the Arduino IDE does not have an ATMega16u2 entry, so you will need to add it. Otherwise the IDE should be able to compile the code and send the correct commands to avrdude.

  • Vladimir / about 10 years ago / 1

    I made a short tutorial on how to burn the Bootloader by using the AVR MKII ISP, so if anyone is going that route, take a look:

If you've found an issue with this tutorial content, please send us your feedback!