What is this Boot Loader, How to Burn an Arduino Boot-loader

Keywords : Bootloader, Arduino Bootloader, How to burn Arduino Bootloader

Arduino Bootloader

In general bootloader is a firmware used in micro-controllers. The bootloader may exist in the same memory space where user program exists. When power up or reset, bootloader runs ahead of the main code and it may setup the microcontroller state or even update the main program.One of the biggest application of bootloader is they allow firmware update without dedicated programmers over USART, I2C, SPI or even Ethernet.

The specialty of Arduino bootloader is that it supports reprogramming the available memory space (apart from the bootloader) using serial communication. (Only on serial based Arduino) Without this we’ll be needing a dedicated programmer for the micro-controller.

During power-up Arduino bootloader checks the incoming from UART pins of the microcontroller. If predefined sequence is received, it acts as a programmer, or else it will jump to the user code for the execution. Also, it is important to know that this will happen during the startup of the microcontroller (while executing the bootloader program) which avoids corrupting the flash memory.



How to burn Arduino bootloader to an ATmega328P microcontroller

Lets say you bought an ATmega328P microcontroller to replace a burnt one in your Arduino Uno or you are going to make a custom uno board for your requirements. Sometimes you may get an Atmel chip without bootloader. (note that most of the agents/shops sell both with and without bootloader)
Also the one with boot loader is little expensive than the one without, you may have to go for the first option if you are going to buy a large number of MCUs.

Burning the boot loader into your new MCU is not a very big deal with Arduino as you will not need a dedicated programmer even for that ! All you will need is an uno board, breadboard and some jumper wires.


Lets burn the Bootloader 😀

1) To do this you need another working Arduino Board with ATmega328P. Connect the Arduino board to a PC and,
i) File >> Example >> 11.ArduinoISP >> ArduinoISP
ii) Select your board type from Tools >> Board  >> Arduino/Genuino Uno
iii) and then Select the Port from Tools >> Port >> Serial Port Arduino has Connected
iv) Select the programmer from Tools >> Programmer >> AVRISP mkII
v) Upload the code
Select Arduino as ISP


2) Disconnect Arduino from PC and connect the ATmega328P (with no boot loader) and the components as below using a bread board. (If need there is a good description in ArduinoISP sketch as comments)



Burning Bootloader Schematic
Burning Bootloader Schematic

If you have an additional Arduino board and feel like not using a breadboard, below schematic is for you. connect the two Arduino boards as below. (One with the bootloader on left) I've not marked the status LEDs which are not compulsory. 


Burn Bootloader using two Arduino Boards
Burn Bootloader using two Arduino Boards

3) Now lets connect the one with the bootloader to PC and, go to, 
 Tools >> Programmer >> Arduino as ISP   (You will have to undo this setting after burning the bootloader) 


Burning the Arduino Bootloader
Burning the Arduino Bootloader
4) Select "Arduino/ Genuino Uno" from Board and the port your Arduino is connected, Then select, 
Tools >> Burn Bootloader


Burning Arduino Bootloader
Burning the Bootloader
That's it 💪