common bootloader?
#10
Quote:For now, I'm doing some researches on another options : The application is responsible for the download of the new firmware image and for storing it in the memory. Then, the bootloader (which does not embed the ble stack) can detect that a new image is available, swap it with the current one and provide a way to rollback the update if it fails.

The advantage is that the firmware is free to use the BLE stack of its choice, but of course, it is still possible to 'brick' the watch if you flash a firmware that does not allow to OTA another firmware...

Hi @JF002 

At work we use mbed-os. ARM has an open source bootloader that does exactly that what you described.
The app can pull in a new firmware image by any means (cellular, bluetooth, CAN, ...) and write it to internal flash or some kind of "external" storage such as SPI flash, etc.
The bootloader is rather basic in that it doesn't rely on any kind data carrier, but only on storage.
This way the bootloader is compatible with a wide range of apps, only minimal configuration is needed plus maybe some tweaking as you would like to have it. It also helps keeping bugs away from the bootloader.
The bootloader does have a few tricks to make sure everything goes wrong. During fwupdate, it always checks the active application for legibility. Next it runs over all fwupdate candidates and checks for the one with highest timestamp. If the timestamp is higher than that of the active application, the candidate is selected. Note that the timestamp is something you have completely control over when you "download" the fwupdate candidate into your device. It's not the application version, so it actually allows to flash older firmware as long as you download it with a newer timestamp. Before the candidate is actually being flashed, t bootloader will perform SHA check on the full firmware candidate data. This takes a few seconds depending on the size of the application.

My experience so far is that we've used it for hundreds of OTA updates without a problem. The binary size is about 30k, that leaves enough for complex applications. However I know that not everyone is keen on ARM's mbed-os due to "vendor lock-in".
Here is the repo: https://github.com/ARMmbed/mbed-bootloader


Messages In This Thread
common bootloader? - by Jeeves - 12-05-2019, 04:36 AM
RE: common bootloader? - by lupyuen - 12-05-2019, 04:43 AM
RE: common bootloader? - by Jeeves - 12-05-2019, 05:24 AM
RE: common bootloader? - by lupyuen - 12-05-2019, 06:07 AM
RE: common bootloader? - by Jeeves - 12-05-2019, 06:17 AM
RE: common bootloader? - by Independent_Contact - 01-10-2020, 10:39 AM
RE: common bootloader? - by geoffrey.vl - 05-01-2020, 07:29 AM
RE: common bootloader? - by JF002 - 05-02-2020, 03:45 AM
RE: common bootloader? - by danielt - 05-04-2020, 03:36 AM
common bootloader? - by lupyuen - 05-02-2020, 04:17 AM
RE: common bootloader? - by geoffrey.vl - 05-02-2020, 12:51 PM
common bootloader? - by lupyuen - 05-07-2020, 09:35 AM
RE: common bootloader? - by danielt - 05-07-2020, 10:06 AM
common bootloader? - by lupyuen - 05-08-2020, 10:29 AM
common bootloader? - by lupyuen - 05-09-2020, 12:39 PM
RE: common bootloader? - by danielt - 05-11-2020, 05:34 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
Lightbulb New version of MCUBoot bootloader : I need your help! JF002 15 20,721 02-01-2021, 01:50 PM
Last Post: VMMainFrame
Information PineTime Updater for Flashing New Bootloader and FreeRTOS Firmware lupyuen 2 5,218 07-31-2020, 05:10 PM
Last Post: lupyuen
  MCUBoot Bootloader for PineTime lupyuen 2 5,754 05-18-2020, 04:23 PM
Last Post: lupyuen
  wasp-bootloader: a robust SoftDevice bootloader for PineTime danielt 3 5,459 04-14-2020, 05:31 AM
Last Post: danielt

Forum Jump:


Users browsing this thread: 3 Guest(s)