PineTime Software Images
#6
(05-04-2020, 11:58 AM)JF002 Wrote: The softdevice is really complex, and, as far as I understand, relies on a MBR located at 0x0. This MBR forwards the IRQ to the softdevice or the applications according to the state of the softdevice. I don't know if it does anything else.

I also don't know how to deal with this in a universal bootloader? Is it possible to chain the MBR with a custom bootloader, the softdevice and the application?

I think the trick needed it to replace the MBR with our own (I called this the vector table in my last post). There a blog post that gives some strong clues about how to do that: https://aykevl.nl/2018/01/mbr-softdevice-internals . For initial development to enable open source BLE stacks I think it can simply update the vector table to adopt mcuboot at the end of internal flash and be done.

Other than that all that is required is to arrange for the softdevice to fit, alongside the application that uses it, within the main application slot so that the softdevice can work when it is copied here.

In other words.

Code:
Internal flash:

0x00000000 FreeMBR 4k
0x00001000 Application slot 492k
0x0007C000 mcuboot 16k

SPI flash:
Update slot 492k
Recovery slot 492k
Scratch 4k  (may be better in internal flash before bootloader
File system Rest of SPI flash?


A softdevice application would come as a single binary with the SD and application merged together...

PS Above a recovery slot is also proposed. This is used to avoid bricking when both application and update slots do not contain a working application (for example if both crashed before bringing up OTA update suppport due to something recently added to the file system then it would be hard to recover so the recovery slot allows us to have a "simple" BLE OTA update program that can be deployed in emergencies.
PineTime: wasp-os and MicroPython, Pinebook Pro:  Debian Bullseye


Messages In This Thread
PineTime Software Images - by VMMainFrame - 05-02-2020, 06:58 PM
PineTime Software Images - by lupyuen - 05-02-2020, 08:13 PM
RE: PineTime Software Images - by danielt - 05-04-2020, 03:39 AM
RE: PineTime Software Images - by JF002 - 05-04-2020, 11:58 AM
RE: PineTime Software Images - by danielt - 05-05-2020, 06:09 AM
PineTime Software Images - by lupyuen - 05-04-2020, 05:03 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
  PineTime at FOSDEM jmlich 5 875 02-07-2024, 11:48 PM
Last Post: tllim
  PineTime turns off when removed from cradle tynstar 0 270 01-31-2024, 11:57 AM
Last Post: tynstar
  PineTime and Amazfish on Ubuntu Touch jmlich 1 781 10-14-2023, 04:12 PM
Last Post: tllim
  PineTime is dead!! Markdanni123 12 14,012 09-18-2023, 10:17 PM
Last Post: ccchan234
  PineTime Sleep Tracking any_mouse 12 12,534 07-10-2023, 05:41 PM
Last Post: davidair
  PineTime Dead out of box? henkery 1 1,259 03-12-2023, 04:34 PM
Last Post: henkery
  Pinetime almost dead... only shows Infinitime logo. lightweight 8 6,910 02-11-2023, 09:30 AM
Last Post: alexmitroff
  PineTime beginner MV1791 2 2,241 01-09-2023, 11:52 PM
Last Post: Canyonless
  Struggling to detect Pinetime over bluetooth John45595 0 1,183 11-20-2022, 11:06 PM
Last Post: John45595
  PineTime Dev Kit for sale igor.bljahhin 2 3,245 10-19-2022, 05:34 AM
Last Post: peatord

Forum Jump:


Users browsing this thread: 1 Guest(s)