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
  Open-Source Support for PineTime LTE (eSIM) emilyjohnson63 1 760 02-08-2025, 11:52 AM
Last Post: Kevin Kofler
  Pinetime Black Screen philipallmon 0 684 11-11-2024, 12:47 AM
Last Post: philipallmon
  PineTime charging issues - connecting pins black gsoundsgood 2 1,201 09-15-2024, 02:59 PM
Last Post: gsoundsgood
  How do I clear all personal data from the pinetime smartwatch? taltamir 6 1,886 08-22-2024, 10:34 AM
Last Post: taltamir
  [SOLVED] Gadgetbridge not pairing with pinetime zoof 3 6,159 06-25-2024, 12:21 AM
Last Post: Amen
  PineTime at FOSDEM jmlich 5 3,023 02-07-2024, 11:48 PM
Last Post: tllim
  PineTime turns off when removed from cradle tynstar 0 917 01-31-2024, 11:57 AM
Last Post: tynstar
  PineTime and Amazfish on Ubuntu Touch jmlich 1 1,803 10-14-2023, 04:12 PM
Last Post: tllim
  PineTime is dead!! Markdanni123 12 18,866 09-18-2023, 10:17 PM
Last Post: ccchan234
  PineTime Sleep Tracking any_mouse 12 17,935 07-10-2023, 05:41 PM
Last Post: davidair

Forum Jump:


Users browsing this thread: 1 Guest(s)