Bootloader merit badge

How does the IDE know which bootloader to burn when you "Burn Bootloader" ?

OK I got some Nano Arduinos, and finally got them to blink using "old bootloader".

I used an easily found procedure using a UNO as "Arduino ISP".

Everything went along without incident, except: I wished to follow advice given somewhere to burn the UNO bootloader, at no point was I asked about this.

I got the result, a savings of memory, see below, and the Nano now can be called a UNO for regular programming.

Sketch uses 1004 bytes (3%) of program storage space. Maximum is 30720 bytes.

Sketch uses 1004 bytes (3%) of program storage space. Maximum is 32256 bytes.

Curiously, uploading blink appears to work selecting either Nano or UNO, the only difference is in the reported Maximum (30270 if I call it a Nano, 32256 if I call it a UNO).

So I just wanna know where I ended up.



It's part of the board definition in boards.txt.

Here you can see the definition for the "ATmega328P (Old Bootloader)" variant of the Nano:

and here for the Uno:


The "Burn Bootloader" process also sets the configuration fuses on the microcontroller, and these are also specified by the board definition.

So the bootloader and fuses are determined by which board you have selected from the Arduino IDE's Tools > Board menu at the time you run the "Burn Bootloader" process, in addition to any custom tools menus the board might have (e.g., Tools > Processor in the case of the Nano).

The "ATmega328P" variant of the Nano uses the same bootloader as the Uno:

Unfortunately, it has different configuration fuses, which causes its boot section to be 2 kB even though the bootloader actually fits in a 0.5 kB boot section. The Uno has the correct fuse settings, which is the only reason you get an extra 1.5 kB of flash memory for your sketch when using the Uno's bootloader and board selection with the Nano.

1 Like

THX @pert , I do believe it was your original advices from whenever that I was heeding.


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