Flash Arduino Uno Bootloader with AVR Studio & AVRISP mkII




As the arduino is really present at the moment I gave it a try with some projects.

But when doing this with custom PCBs you might get interested how to get the specific bootloader into the MCU.

Here I am describing a way how to do this with AVR Studio and AVRISP mkII Flasher.

First of all you have to wire them with the ribbon cable and power the Arduino with a 9V power supply.

The AVRISP mkII has to be connected with USB to the computer to talk with it in the AVR Studio for flashing.


Part 1 (AVR Application):

You have to navigate to the "Extra" menu and click on "Device Programming".

Then you have to choose the ATMega328 because this is the MCU which you are using in the Arduino Uno.

And of course the programmer, in this case the AVRISP mkII.

Clicking on "Apply" and "Read" will give you the current state informations about the chip.

Now you can set the fuses of the MCU with the values E 0x05, H 0xDE and L 0xFF.

Clicking on "Program" will change the fuse settings like expected.


After this part you can load the hex file of the bootloader into the MCU.

Therefore you only have to specify the path to the "optiboot_atmega328.hex" file and click on "Program".

You can find the optiboot files at https://github.com/Optiboot/optiboot/

When it is finished you can load a simple led test program on the arduino to check if everything has been done correctly.



Part 2 (Arduino Application):

Navigating to the example programs of the arduino will you give the access to the blink program.

Load the sketch to the Arduino and wait for the result.

You should see now a blinking LED and you have successfully flashed your Arduino Bootloader.