pebble
  • Tutorials
  • Get the SDK
  • Guides
  • Documentation
  • PebbleOS
  • Mobile App
  • Examples
  • Index 01
  • Community
  • Blog
  • More
Privacy
Cookies
Publish

PebbleOS

  • Overview
  • Start here
    • Getting started guide
  • Pebble Firmware
    • Overview
    • Playground
    • Application SDK
  • Development
    • The pbl CLI
    • Build system
    • Samples
    • Emulator and simulator
    • Testing
    • Debugging
    • Conventions
  • System
    • Architecture overview
    • Kernel
    • Drivers
    • Subsystems
    • Libraries
    • Third-party
  • Hardware
    • Boards
    • Board Add-ons
    • Programmers
  • Community
    • Contribution Guidelines
  • Reference
    • Reference
    • Kconfig options

Getting started guide

This guide takes you from a fresh machine to PebbleOS running, in the emulator or on a watch.

Install dependencies

Install the packages the build needs from your system’s package manager.

Ubuntu 24.04 LTS or later:

sudo apt update
sudo apt install \
    bison \
    clang \
    cmake \
    device-tree-compiler \
    flex \
    gcc \
    gcc-multilib \
    gettext \
    git \
    gperf \
    libfreetype6-dev \
    libglib2.0-dev \
    libgtk-3-dev \
    libncurses-dev \
    librsvg2-bin \
    libsdl2-dev \
    libusb-1.0-0 \
    make \
    nodejs \
    openocd \
    pkg-config \
    python3-dev \
    python3-venv

Fedora 44 or later:

sudo dnf upgrade --refresh
sudo dnf install \
    bison \
    clang \
    cmake \
    dash \
    dtc \
    flex \
    freetype-devel \
    gcc \
    gettext \
    git \
    glib2-devel \
    gperf \
    gtk3-devel \
    librsvg2-tools \
    make \
    ncurses-devel \
    nodejs \
    openocd \
    pkgconf-pkg-config \
    python3-devel \
    SDL2-devel

Install Homebrew, then Python, Git and OpenOCD:

brew install python git openocd
brew link python@3

The remaining packages are listed in the repository and installed once it is cloned, in the next step.

Get the source code

Clone the repository with its submodules and enter it:

git clone --recurse-submodules https://github.com/coredevices/pebbleos
cd pebbleos

Nothing else to install.

Nothing else to install.

Install the remaining packages:

brew install $(cat requirements-brew.txt)

Install Python dependencies

Create a virtual environment in the checkout, activate it and install the Python dependencies:

python3 -m venv .venv
source .venv/bin/activate
pip install -r requirements.txt

This also installs pbl, the developer command line the rest of this guide uses.

Tip

Activate the virtual environment (source .venv/bin/activate) in every new shell before running pbl.

Install the PebbleOS SDK

The PebbleOS SDK provides the toolchain and tools the build needs:

curl -LsSf https://github.com/coredevices/PebbleOS-SDK/releases/latest/download/pebbleos-sdk-installer.sh | sh

The build finds the installed SDK on its own; Build system explains how to pick a specific one.

Build for a board

Every build targets a board, either the emulator, such as qemu_pebble/m33 or a real one; Boards lists them. Configure a build directory for one and build it:

pbl configure --board qemu_pebble/m33
pbl build

Run the firmware

pbl run

On an emulated board, a window opens with the emulated watch and the firmware boots to the watchface; the arrow keys are the watch buttons. The Emulator page covers everything else you can do with it.

On a real board, pbl run flashes the firmware to the watch. With a programmer connected as the board’s page shows, add --resources the first time to write the system resources too. Without one, go through the phone paired with the watch:

pbl run -r phone --via adb|cloud|ip [--address $IP]

pbl run covers the options of each case.

Next steps

  • The pbl CLI documents every pbl command.

  • Emulator and simulator compares the emulator and the native simulator.

  • Testing covers the unit and integration test suites.

  • Architecture overview explains how the firmware is put together.

  • Rust covers applications in Rust, and what they need installed.

Generated from PebbleOS 7416f78a1. This page is maintained in the pebbleos repository: docs/getting_started/index.md.

Overview

  • Install dependencies
  • Get the source code
  • Install Python dependencies
  • Install the PebbleOS SDK
  • Build for a board
  • Run the firmware
  • Next steps