A bootloader is the first piece of embedded software that runs when a device is powered up. Typically, its three main functionalities are:

●    Launching the application – this is typically done after checking the integrity of the current firmware programmed into the microcontroller flash memory.

●    Error detection – If an error is detected at this stage, the bootloader loads the factory firmware and reverts the system to a known-good state, which can typically happen after a failed update therefore avoiding the product becoming ‘bricked’.

●    Software reset – If a key press or a software update flag is detected the bootloader will load the new firmware into the microcontroller flash memory and trigger a software reset.

There are many challenges associated with bootloader design including reliability, bug protection and software efficiency. IP protection is an additional concern, with firmware update encryption available using various algorithms according to security needs.

Bluefruit have a lot of experience writing bootloaders for various microcontroller families, from small PICs to complex ARM-based 32-bit MCUs.