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 Black Screen philipallmon 0 137 11-11-2024, 12:47 AM
Last Post: philipallmon
  PineTime charging issues - connecting pins black gsoundsgood 2 461 09-15-2024, 02:59 PM
Last Post: gsoundsgood
  How do I clear all personal data from the pinetime smartwatch? taltamir 7 620 08-23-2024, 04:44 AM
Last Post: 67man
  [SOLVED] Gadgetbridge not pairing with pinetime zoof 3 5,129 06-25-2024, 12:21 AM
Last Post: Amen
  PineTime at FOSDEM jmlich 5 1,864 02-07-2024, 11:48 PM
Last Post: tllim
  PineTime turns off when removed from cradle tynstar 0 575 01-31-2024, 11:57 AM
Last Post: tynstar
  PineTime and Amazfish on Ubuntu Touch jmlich 1 1,232 10-14-2023, 04:12 PM
Last Post: tllim
  PineTime is dead!! Markdanni123 12 16,295 09-18-2023, 10:17 PM
Last Post: ccchan234
  PineTime Sleep Tracking any_mouse 12 15,330 07-10-2023, 05:41 PM
Last Post: davidair
  PineTime Dead out of box? henkery 1 1,653 03-12-2023, 04:34 PM
Last Post: henkery

Forum Jump:


Users browsing this thread: 7 Guest(s)