Create a directory for the development environment and cd in to it.
mkdir ~/pebble-dev
cd ~/pebble-devThis will install curl, python, node, gawk and a couple of required libraries
sudo apt install -y curl
curl -sL https://deb.nodesource.com/setup_12.x | sudo -E bash -
sudo apt install -y nodejs python-pip python3-pip python2.7-dev python-gevent gawk libsdl1.2debian libfdt1 libpixman-1-0We're also going to need a cross compiler
wget https://developer.arm.com/-/media/Files/downloads/gnu-rm/10-2020q4/gcc-arm-none-eabi-10-2020-q4-major-x86_64-linux.tar.bz2
tar jxf gcc-arm-none-eabi-10-2020-q4-major-x86_64-linux.tar.bz2
rm gcc-arm-none-eabi-10-2020-q4-major-x86_64-linux.tar.bz2
cd gcc-arm-none-eabi-10-2020-q4-major
sudo cp -R * /usr/
cd ~/pebble-dev
rm -rf gcc-arm-none-eabi-10-2020-q4-majorTo make sure the cross compiler is working run
arm-none-eabi-gcc --versionThe output should look like:
arm-none-eabi-gcc (GNU Arm Embedded Toolchain 10-2020-q4-major) 10.2.1 20201103 (release)
Copyright (C) 2020 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
Download and extract the pebble sdk.
wget https://developer.rebble.io/s3.amazonaws.com/assets.getpebble.com/pebble-tool/pebble-sdk-4.5-linux64.tar.bz2
tar -jxf pebble-sdk-4.5-linux64.tar.bz2
rm pebble-sdk-4.5-linux64.tar.bz2Add the PebbleSDK binaries to PATH and apply the change.
echo 'export PATH=~/pebble-dev/pebble-sdk-4.5-linux64/bin:$PATH' >> ~/.profile
. ~/.profileInstall virtualenv.
sudo pip3 install virtualenvInstall PebbleSDK.
cd ~/pebble-dev/pebble-sdk-4.5-linux64
virtualenv --python=python2.7 .env
source .env/bin/activate
pip install -r requirements.txt
deactivateDeactivate PebbleSDK analytics tracking.
mkdir -p ~/.pebble-sdk
touch ~/.pebble-sdk/NO_TRACKINGInstall the PebbleSDK core.
pebble sdk install https://github.com/aveao/PebbleArchive/raw/master/SDKCores/sdk-core-4.3.tar.bz2To test if everything was successful, you can run:
pebble ping --emulator apliteNOTE: The emulator requires an active X server.
Navigate back to our development environment.
cd ~/pebble-devMake sure git is installed.
sudo apt install -y gitClone the RebbleOS repository, and install its dependencies.
git clone https://github.com/pebble-dev/RebbleOS.git
cd RebbleOS
git submodule update --init --recursiveCreate a Resources folder.
mkdir ResourcesAt this point, you will need to visit the Discord to download the FPGA files and put them in the Resources folder.
Which can be found in the #firmware channel in the Pins.
Copy additional resources from the PebbleSDK using a utility script.
./Utilities/mk_resources.sh ~/.pebble-sdk/SDKs/4.3/sdk-core/pebbleNow we need to make a small change to lib/tz/Makefile to use gawk instead of awk
Open the file in your favorite text editor and find the code that says:
# The name of a Posix-compliant 'awk' on your system.
# Older 'mawk' versions, such as the 'mawk' in Ubuntu 16.04, might dump core;
# on Ubuntu you can work around this with
# AWK= gawk
AWK= awk
Change AWK=awk to AWK=gawk (the whitespace in between is not important, you can leave it or remove it). Save and exit the editor
It should now be ready to compile and run in the emulator
cd ~/pebble-dev/RebbleOS
make snowy_qemuIf anything fails, or if you have any questions, feel free to hit us up in Discord!