Go Down

Topic: What is there in bootloader files in arduino? (Read 399 times) previous topic - next topic

Prithiviraj_pandian

Hi Everyone,
    I want to know how the bootloaders are being developed for the particular family of AVR in Arduino..
   
    1) There is one file called Boards.txt in that only we are adding what are the microcontrollers available.
And four more folder are called as  bootloaders, cores, firmwares, variants... But most of the Boards are not having all this folders.
           i) when are these folders are required? when are these folders are not required?
    2) There are some microcontrollers HEX files are located in the Bootloaders folders. different HEX files are invoked for different boards names in the boards.txt file. So
           i)   Where can We generate those HEX files?
           ii)  Why the particular HEX files are invoked for particular boards?
           iii)  What information the HEX files will have?

pert

I want to know how the bootloaders are being developed for the particular family of AVR in Arduino.
For the official Arduino AVR boards they're not really being developed at all. I think the developers consider the current AVR bootloaders good enough and they haven't been modified in a long time. This is unfortunate in the case of the bootloaders used for Nano, Pro Mini, and other boards since there is a serious bug that makes it so you can't use the watchdog. Luckily the optiboot bootloader used for the Uno is very good and can be used to replace the buggy bootloaders. Also there are very good 3rd party boards packages that have actively maintained bootloaders pre-compiled.

1) There is one file called Boards.txt in that only we are adding what are the microcontrollers available.
And four more folder are called as  bootloaders, cores, firmwares, variants... But most of the Boards are not having all this folders.
Which boards are you talking about?

i)   Where can We generate those HEX files?
The bootloader source code and Makefile are located in each folder. All the tools required to make them are included with the Arduino IDE except for make, which may already be installed on your computer depending on operating system. If not you can get make from a copy of Arduino IDE 1.0.6 or it's available online.

ii)  Why the particular HEX files are invoked for particular boards?
The bootloader source code is specific to certain boards, for example caterina has special features for the ATmega32U4. The individual builds of each bootloader type are made for specific boards configurations such as MCU model and clock speed. However some of the bootloader files are interchangeable to different boards than the are used on. For example, the bootloader used for the Uno can also be installed on the Nano(ATmega328P version), fixing the watchdog bug and freeing up 1.5kB of flash. The reason they are interchangeable is that the MCU models on these boards are the same and the clock speed is the same. So why don't the Arduino developers replace the nano bootloader? Partly because Arduino doesn't sell the Nano anymore(it was always manufactured by a 3rd party but I suspect they used to get licensing fees and don't anymore since it is now considered "retired"). The other reason is that they don't want to break compatibility with all the nanos that already have the crappy non-optiboot bootloader on them.

iii)  What information the HEX files will have?
Take a look at the bootloader source code. The HEX files are the result of that code compiled for a specific configuration.

Go Up