PebbleOS is the firmware that runs on Pebble watches. Its source is developed in the open at github.com/coredevices/pebbleos under the Apache License 2.0. This section of the site is for developers who want to build, run or change the firmware itself. To write watchapps and watchfaces, start with Installing the Pebble SDK and the Guides instead.
The pages under PebbleOS documentation are
generated from the docs/ directory of the pebbleos repository on every build
of this site, from the main branch. The same content is published at
pebbleos-core.readthedocs.io. Each
imported page ends with the PebbleOS commit it was generated from and a link to
its source file.
The firmware is configured for one board at a time with
pbl configure --board <board>. The repository at main defines these boards:
| Board | Watch | Platform | SoC |
|---|---|---|---|
asterix |
Pebble 2 Duo | flint | Nordic nRF52840 |
obelix |
Pebble Time 2 | emery | SiFli SF32LB52 |
getafix |
Pebble Round 2 | gabbro | SiFli SF32LB52 |
qemu_flint |
Emulator | flint | QEMU, Cortex-M4 |
qemu_emery |
Emulator | emery | QEMU, Cortex-M33 |
qemu_gabbro |
Emulator | gabbro | QEMU, Cortex-M33 |
The platform column is the name the SDK uses for the same hardware, for
example in targetPlatforms in package.json. The
Hardware Information
guide lists what each platform has, such as display size and sensors.
Hardware revisions are selected with an @ suffix, for example
pbl configure --board obelix@pvt. The revisions each board supports are
listed in boards/<board>/<board>.yml. The repository has no board
definitions for the watches made by Pebble Technology Corporation (the aplite,
basalt, chalk and diorite platforms).
Note: The imported documentation has a board page for Asterix only. The
obelix,getafixand QEMU boards are documented by theirKconfiganddefconfigfiles in the repository.
Watchapps do not link against the firmware. The firmware build generates the
app SDK from its own sources: pebble.h with the exported declarations, and
libpebble.a with trampolines that call into the firmware through a function
table compiled into the firmware image. Apps run as unprivileged processes
and reach OS state through syscalls. The
Exposing APIs to the SDK page summarises how a
firmware function becomes an SDK API.
The SDK that developers install with pebble sdk install is built from a
firmware release. The C API reference on this site at /docs/c/ is
generated from the pebbleos release tag recorded in the site's
EMERY_SDK_VERSION file. The firmware documentation in this section tracks
main, so it can describe functions that are not yet in a released SDK.
The Pebble mobile app pairs with the watch over Bluetooth, installs apps and
firmware updates, and runs the PebbleKit JS side of apps. During development
it also carries the
Developer Connection
that the pebble tool uses to install and debug apps on a watch. Its source
is at github.com/coredevices/mobileapp.
Note: Two different things are called an SDK. The Pebble SDK builds watchapps. The PebbleOS SDK at github.com/coredevices/PebbleOS-SDK is the toolchain bundle for building the firmware: the ARM GNU toolchain, Pebble QEMU and flashing tools. The imported pages mean the second one.
pbl tool, configuration options, building and flashing,
testing, the emulator, debugging and contributing.include/: kernel, drivers,
services and subsystems. It describes interfaces inside the firmware; the
C API reference is the one to use when writing apps.Contributing to PebbleOS collects the steps for getting a change merged and answers to the questions that come up most often on the forum.