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

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 \
    make \
    openocd \
    python3-dev \
    python3-venv
  1. Upgrade first:

sudo dnf upgrade --refresh
  1. Install required dependencies

sudo dnf install \
    clang \
    dash \
    freetype-devel \
    gcc \
    glib2-devel \
    gtk3-devel \
    librsvg2-tools \
    nodejs \
    python-devel  
  1. Install brew.

  2. Install dependencies:

brew install librsvg python openocd
  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