PINE64
Firmware Update over Bluetooth LE - Printable Version

+- PINE64 (https://forum.pine64.org)
+-- Forum: PineTime (https://forum.pine64.org/forumdisplay.php?fid=134)
+--- Forum: Development Discussion on PineTime (https://forum.pine64.org/forumdisplay.php?fid=136)
+--- Thread: Firmware Update over Bluetooth LE (/showthread.php?tid=9824)



Firmware Update over Bluetooth LE - lupyuen - 05-11-2020

Hi All: Here's a proposed plan for supporting PineTime firmware updates over Bluetooth LE. If you're a firmware developer, please take a look...

https://lupyuen.github.io/pinetime-rust-mynewt/articles/dfu

It covers everything we need to do to implement firmware updates in our firmware: Bootloader, Bluetooth Stack, Firmware Rollback, Flash ROM Layout, Firmware Format, Mobile Apps, ...

We need to adopt a common mechanism for firmware updates if we wish to allow PineTime Owners to switch firmware easily. It's more work for us developers... But it's a huge benefit for PineTime Owners!

Please lemme know what you think... While writing this article I have received really good feedback from firmware developers. Their suggestions have been documented in the "Upcoming Enhancements" section.

The most serious limitation in the proposed design is that the firmware size must not exceed 232 KB. Hence there will be an upcoming enhancement to increase this limit (by moving the Standby Firmware Image to External SPI Flash).

Thanks everyone for the awesome work on PineTime... Now let's make PineTime fun and easy to learn and explore! :-)


RE: Firmware Update over Bluetooth LE - lupyuen - 05-15-2020

Just updating everyone on my MCUBoot Bootloader progress:

(1) Yep it's possible to move the Standby Firmware Image to SPI Flash. Now testing this

(2) This solves a major showstopper with MCUBoot. We now allow application firmware images of up to 464 KB in size

(3) Now putting in a 5 second delay when MCUBoot starts up. If the watch button is pressed and held during the 5 seconds, MCUBoot will roll back the firmware to the previous one

(4) MCUBoot now displays a graphic image stored in SPI Flash while booting. This is needed because we have to show something during the 5 second delay. Also when MCUBoot swaps firmware during upgrade

(5) I have created a tool that loads a 240x240 PNG file into SPI Flash for display by MCUBoot: https://github.com/lupyuen/pinetime-graphic

So my job this weekend is to do more testing of MCUBoot with SPI Flash

And there shall be a new article to explains how all the above stuff works. So that someone can back me up on the MCUBoot development :-)


Firmware Update over Bluetooth LE - lupyuen - 05-16-2020

Here's a video of the Enhanced MCUBoot Bootloader that displays the boot graphic stored in SPI Flash...

https://twitter.com/MisterTechBlog/status/1261568945728876544?s=19

Sent from my Pixel 4 XL using Tapatalk