Electronics > Beginners
To Bootload Or Not To Bootload That Is The Question....
(1/4) > >>
Kilroywashere:
So i know bootloading sets up the micro but..... I have not used the bootload option in arduino IDE ... So my question is .... When do you bootload?  Like if i get a attiny85  its not the same bootloader as the atmega328p right?
ataradov:
MCU bootloaders typically do not set up anything, in fact their goal should be to be as unobtrusive as possible. They are used to perform in-field firmware updates. So if you need in-field updates, then you need a bootloader, otherwise you don't.

And yes, bootloaders for those two devices will be different.
Kilroywashere:

--- Quote from: ataradov on March 13, 2019, 02:22:50 am --- They are used to perform in-field firmware updates. So if you need in-field updates, then you need a bootloader, otherwise you don't.

--- End quote ---

What is an example of a In-field firmware update .... I mean since i dont know what it is .... i wont likely ever need to bootload ....
ataradov:
Have you ever updated the OS on your phone? The final step of the process, after the new firmware is downloaded by the old OS, is performed by the bootloader.

Firmware upgrade on any other electronics you have - the same exact thing, the actual update is done by the bootloaders.

You don't release a product for sale, then you don't need a bootloader, for sure.

Arduino uses a bootloader to actually program the device without a real programmer. This is also sort of in-field update.
ejeffrey:
For development systems like Arduino, the bootloader is there so that users can program the micro over a serial port without a dedicated programmer.  That is a common application.

Another reason to use a bootloader is if your application is on external storage the processor can't natively address.  A bootloader could copy your code from a SPI flash into RAM.  Some microcontrollers actually have a bootloader in ROM to support multiple booting options.

Another reason is if you have multiple application images the bootloader can select between.  For instance maybe you have a separate application image for a diagnostic mode.  The bootloader can check for something like a specific button held at power up. To launch the diagnostic image instead of the regular application.

The last option works well with field updates.  To avoid bricking your device, you can have a factory image in write protected flash and a slot for an upgraded image.  Normally the bootloader will chain to the newest image but if an upgrade fails or has a bug it can fall back to the factory image.
Navigation
Message Index
Next page
There was an error while thanking
Thanking...

Go to full version
Powered by SMFPacks Advanced Attachments Uploader Mod