Skip to content

Latest commit

 

History

History
113 lines (82 loc) · 3.25 KB

README.md

File metadata and controls

113 lines (82 loc) · 3.25 KB

PebbleOS

This repository contains the source code of PebbleOS.

How PebbleOS works

Read more in the very detailed PebbleOS architecture presentation

Then read this presentation on how PebbleOS works!

Join the Rebble Discord #firmware-dev channel to discuss.

Watch the Podcast

Several original PebbleOS firmware engineers recorded a podcast about the OS.

Podcast Gemini Summary
CleanShot 2025-02-11 at 22 26 27@2x Arc 2025-02-11 22 25 13

Architecture

CleanShot 2025-01-31 at 14 38 16@2x

Arc 2025-01-31 11 44 47

WARNING: Codebase is being refactored/modernized, so only certain features may work right now.

Getting Started

  • Use Linux (tested: Ubuntu 24.04, Fedora 41) or macOS (tested: Sequoia 15.2)

  • Clone the submodules:

    git submodule init
    git submodule update
  • Install GNU ARM Embedded toolchain from https://developer.arm.com/downloads/-/arm-gnu-toolchain-downloads. Make sure it is available on your PATH by checking arm-none-eabi-gcc --version returns the expected version.

  • If using Ubuntu, install gcc-multilib and gettext

  • Install nrfjprog from https://www.nordicsemi.com/Products/Development-tools/nRF-Command-Line-Tools.

  • Create a Python venv:

    python -m venv .venv
  • Activate the Python venv (also every time you start working):

    source .venv/bin/activate
  • Install dependencies:

    pip install -r requirements-linux.txt
  • Install local dependencies:

    pip install -e \
      python_libs/pblprog \
      python_libs/pebble-commander \
      python_libs/pulse2 \
      python_libs/pebble-loghash

Building

First, configure the project like this:

./waf configure --board asterix_vla_dvb1 --nojs --nohash

At this moment, only asterix_vla_dvb1 board target may compile and boot.

Then build:

./waf build

PRF can be also be built:

./waf build_prf

Flashing

First make sure Nordic S140 Softdevice is flashed (only do this once):

nrfjprog --program src/fw/vendor/nrf5-sdk/components/softdevice/s140/hex/s140_nrf52_7.2.0_softdevice.hex --sectoranduicrerase --reset

Flash the firmware:

nrfjprog --program build/src/fw/tintin_fw.elf --sectorerase --reset

First time you should see a "sad watch" screen because resources are not flashed. To flash resources, run:

python tools/pulse_flash_imaging.py -t /dev/$PORT -p resources build/system_resources.pbpack

Viewing logs

python tools/pulse_console.py -t /dev/$PORT