Building InfiniTime for the PineTime

Note: This is current as of March 31, 2022. This tutorial was written for advanced users, i.e. users who have used “git”, have knowledge of programming, and have build programs before on Linux. Also, using the “develop” branch of InfiniTime can brick your smart watch. You have been warned.

Here’s the official documentation for building InfiniTime. As of the writing of this tutorial, the documentation is a little hard to follow, so that’s why I wrote this. These steps were carried out on Linux Mint 20.3.

  1. Pull down the sources of “InfiniTime”.
$ git clone InfiniTime

This branch is named “develop” because it is meant for, well, developing it. If you want a more stable branch, checkout a numbered branch (e.g. 1.7.1 or 1.8.0).

  1. Install the “ARM-GCC” cross-compiler to any location you like (preferably one that’s easy to access).
  2. Install the “NRF52” SDK 15.3.0 to another place of your choosing.
  3. Install the following Python 3 packages: cbor, intelhex, click, and cryptography. This can be achieved with pip3 (or just pip if your distro only uses Python 3). The official documentation offers the alternative of installing them into a virtual environment. If you’re fine with installing them system-wide, you can use the following command:
$ python -m pip install -r <Path to InfiniTime sources>/tools/mcuboot/requirements.txt

If you didn’t know already, the “requirements.txt” file is in the directory with the InfiniTime sources.

  1. Install the “adafruit-nrfutil” utility. The documentation for “adafruit-nrfutil” suggests installing from pip:
$ pip3 install --user adafruit-nrfutil

Note that this requires the path to the user install to be added to the “$PATH” environment variable.

  1. Once all of that software is installed, use the following command to build the Makefiles, and build the InfiniTime image:
$ mkdir build
$ cmake -B build -DARM_NONE_EABI_TOOLCHAIN_PATH=<Path to ARM-GCC compiler> -DNRF5_SDK_PATH=<Path to NRF52 SDK> -DBUILD_DFU=1
$ cd build
$ make -j<number of cores> pinetime-mcuboot-app

The “-DBUILD_DFU” part is meant for flashing the device over the air (OTA) with programs like GadgetBridge and Siglo. The file generated has a name like “pinetime-mcuboot-app-dfu-<version>.zip”, where <version> is the current release version of InfiniTime. It is found in the build/src directory of the InfiniTime sources.

Once the file is generated, you should be able to flash it on to your PineTime.

Jason Anderson

Jason Anderson has been hacking up computers for nearly 20 years, has been using Linux for over 15 years, and has studying and practicing IT security for over 3 years. Among that, he has a BBA in Accounting, an A+ certification, and a Linux+ certification. Look him up on Twitter at @FakeJasonA and on Mastodon on

Leave a Reply

Your email address will not be published.