Follow this guide to:
Set up a command-line PebbleOS development environment
Get the source code
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.
A series of system-level dependencies are required. Follow the next steps to install them.
Update first:
sudo apt update
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
Upgrade first:
sudo dnf upgrade --refresh
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
Install brew.
Install dependencies:
brew install python openocd $(cat requirements-brew.txt)
Link brew Python:
brew link python@3
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
A series of additional Python dependencies are also required. Follow the next steps to install them in a Python virtual environment.
Create a new virtual environment:
python3 -m venv .venv
Activate the virtual environment:
source .venv/bin/activate
Tip
Remember to activate the virtual environment before every time you start working!
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.