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

PebbleOS

  • Overview
  • Contributing
  • Exposing APIs to the SDK
  • Development
    • Prerequisites
    • The pbl CLI
    • Configuration Options
    • Building firmware
    • Build system
    • Running and writing tests
    • Integration tests
    • QEMU
    • Native
    • Debugging
    • Moddable JS Engine
    • Exposing functions to the SDK
    • Software bill of materials
    • Contribution Guidelines
  • Architecture
  • Boards
  • Reference
  • Firmware API Reference

Prerequisites

Follow this guide to:

  • Set up a command-line PebbleOS development environment

  • Get the source code

PebbleOS SDK

Install the PebbleOS SDK, which bundles the ARM GNU toolchain, Pebble QEMU, and other tools:

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

The build locates the SDK on its own when a build directory is configured: it honours PEBBLEOS_SDK_ROOT if set (the SDK’s env.sh exports it), and otherwise picks the newest pebbleos-sdk-<version> under your home directory or /opt that satisfies the version in SDK_VERSION. The SDK root and the paths of the tools found in it (toolchain, QEMU, sftool, gdb) are cached in the build directory, so a build keeps using the SDK it was configured with. To use a specific install, pass -DPEBBLEOS_SDK_ROOT=<dir> to pbl configure.

System-level dependencies

A series of system-level dependencies are required. Follow the next steps to install them.

  1. Update first:

sudo apt update
  1. Install required dependencies

sudo apt install \
    bison \
    clang \
    flex \
    gcc \
    gcc-multilib \
    gettext \
    git \
    gperf \
    libfreetype6-dev \
    libglib2.0-dev \
    libgtk-3-dev \
    libncurses-dev \
    librsvg2-bin \
    libsdl2-dev \
    make \
    nodejs \
    openocd \
    pkg-config \
    python3-dev \
    python3-venv
  1. Upgrade first:

sudo dnf upgrade --refresh
  1. Install required dependencies

sudo dnf install \
    bison \
    clang \
    dash \
    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
  1. Install brew.

  2. Install dependencies:

brew install python openocd $(cat requirements-brew.txt)
  1. Link brew Python:

brew link python@3

Get the source code

You can clone the PebbleOS repository by running:

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

Once cloned, enter the pebbleos directory before continuing:

cd pebbleos

Python dependencies

A series of additional Python dependencies are also required. Follow the next steps to install them in a Python virtual environment.

  1. Create a new virtual environment:

python3 -m venv .venv
  1. Activate the virtual environment:

source .venv/bin/activate

Tip

Remember to activate the virtual environment before every time you start working!

  1. Install dependencies

pip install -r requirements.txt

This also installs pbl, the developer CLI you drive the build with. With the virtual environment active it is on the PATH from anywhere inside the checkout:

pbl configure --board asterix
pbl build

See The pbl CLI for what it can do and how it is put together.

Generated from PebbleOS 91af4a22c. This page is maintained in the pebbleos repository: docs/development/getting_started.md.

Overview

  • PebbleOS SDK
  • System-level dependencies
  • Get the source code
  • Python dependencies