common bootloader?
#8
I'm currently working on DFU and OTA. 

I've done some tests with wasp-bootloader : https://forum.pine64.org/showthread.php?tid=9134
It's working nearly out of the box but only if the firmware you want to flash is based on the Nordic Softdevice BLE stack (the same softdevice, the same version).
This bootloader embeds the BLE stack whihch is shared with the application firmware. This might be a good thing, but as I said, all the firmwares you'll want to flash will have to be built around the same ble stack.
Another downside is that Nordic Softdevices are not open-source, and there are already some firmware that do not use the Softdevices. For example, Nimble is open-source and supports the NRF82832.

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...

For now, I'm just trying to see how it works. I hope it'll help us to have a better overview of the possibilities we have to implement OTA updates Smile

Quote:Do you have any data about the object size the NimBLE stack compiles down to? Ideally, the bootloader would probably be less than 4KB so it fits in just the first page of the internal flash. I'd be only too delighted to use a pre-written bluetooth stack if it's small enough.
The NRF Softdevice (S132 in SDK 15.3) needs 155648 bytes of Flash and 22456 bytes of RAM. I do not have the exact numbers, but it should be quite similar for Nimble. 
If both the bootloader and the application integrate a BLE stack, ~300 KB would be used in RAM, more than half of the available flash memory...
Working on Pinetime with FreeRTOS (C/C++) : https://github.com/JF002/Pinetime

Mastodon : https://mastodon.codingfield.com/@JF
Twitter : https://twitter.com/codingfield
Matrix : @JF002atrix.org


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 6,073 02-01-2021, 01:50 PM
Last Post: VMMainFrame
Information PineTime Updater for Flashing New Bootloader and FreeRTOS Firmware lupyuen 2 2,178 07-31-2020, 05:10 PM
Last Post: lupyuen
  MCUBoot Bootloader for PineTime lupyuen 2 2,246 05-18-2020, 04:23 PM
Last Post: lupyuen
  wasp-bootloader: a robust SoftDevice bootloader for PineTime danielt 3 2,585 04-14-2020, 05:31 AM
Last Post: danielt

Forum Jump:


Users browsing this thread: 1 Guest(s)