You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Go to file
root 704b3c1b51
spi nor flash writing OK
1 week ago
app update for latest zephyr rtos 2 years ago
boards working sample with button and touchscreen on kind of standard pinetime distribution 2 years ago
cmake Add west support as external zephyr application 3 years ago
docs add images to html on github 1 year ago
drivers working posix SDL with touchbutton 2 years ago
dts/bindings/sensor cosmetic changes 3 years ago
include markdown indexing...tryout 2 years ago
manual add images to html on github 1 year ago
misc/rtt_shell Add Tips&Tricks section to readme with RTT setup 3 years ago
patches-zephyr documented patch zephyr display 4 years ago
pinetime_devkit0 working pinetime setup, up for testing 3 weeks ago
samples spi nor flash writing OK 1 week ago
subsys Add battery monitor module 3 years ago
.config working samples i2c and lvgl display 4 years ago
CMakeLists.txt Add battery monitor module 3 years ago
Kconfig.pinetime Add battery monitor module 3 years ago
LICENSE licence info and copyright for book 4 years ago update for latest zephyr rtos 2 years ago
gendoc add images to html on github 1 year ago
index.rst major update - app dir 2 years ago
jj add images to html on github 1 year ago
opensourcewatch.epub add images to html on github 1 year ago
oswatch.pdf add images to html on github 1 year ago
pkglist testing i2c overlay 4 years ago fast track doc 4 years ago
west.yml modified west.yml 2 years ago
west.yml-old modified west.yml 2 years ago
wsl-howto testing oswatch-cts2 2 weeks ago

Open Source Watch toolkit for the Zephyr RTOS

originally a
PineTime firmware toolkit based on Zephyr Project RTOS.

now evolved into a framework which has the potential to support other watches, cyclecomputers, wearables ...

Included in this toolkit is a virtual watch, which you can run on your computer. (no real watch, devboard, debugprobe is needed!)

Contributing to this project

I mainly use the Desay D6 watch and the x86 simulated one, to develop. Testing it on the pinetime and adding functionality, can use your help. (it is possible and I do have the know-how)

Suppose tomorrow new hardware becomes available, changing the board definition file should get you started quickly. The idea behind this project, is that this consumer based hardware is cheap (desay d6 < 5$), so it can be used in maker-projects other than just a watch. Example? The oswatch-calendar can be used as a timer to switch stuff. (clock - display - bluetooth - cts) (my intent is to use it as PID controller for beer production)

The pinetime board (watch) has become a part of the zephyr distribution. The zephyr project is very thorough in accepting code, board definitions etc ... which is very good indeed! Anyone willing to take the samples in this repo and prepare/propose/incorporate them in the zephyr repo is welcome to do so.

Where To Start?

Read the tutorial! A helpful manual is included in the repository:

Installation Overview

  1. Follow the Zephyr Getting Started Guide to install zephyr SDK and tools.
  2. Install west meta tool (

build your first sample!

  • west build -p -b pinetime_devkit0 samples/boards/pine64_pinetime

Major update on 18/02/2021

The initial toolkit was focused on getting zephyr up and running on the pinetime smartwatch.

Zephyr is still under development and some nifty features were added since (or I discovered them only lately)

  • touchscreen support (kscan)
  • out of tree development
  • virtual board
  • ssd1306 oled spi support

it inspired me to morph the original pinetime-toolkit into an open-source-watch-framework. Right now the firmware can be used on 3(!) watch-platforms.

update on 04/12/2021

some modifications in order to work with latest version of zephyr played around with the KX022 motion sensor on the ds6 wanted to create angle-detection for electric bike, but what I really need is a torque-sensor... found a suitable scooter xiaomi M365 controller Idea is to use regen breaking, for downhill However need to be able to switch between regen and non-regen, difficult with hubmotor, cause it contains a one-way clutch


Step by step functionality is added. If you have no need for bluetooth you can start with oswatch. If you need bluetooth you can start with oswatch-bt.

If you need powersaving, you can use oswatch-lowpower, which is an extension os oswatch-calendar, and as a consequence contains more code. (bigger firmware)

Once you set up zephyr on your system, you only have to copy the "app" directory alongside. There is an extensive "hands-on" manual included, it is an addition of the zephyr manual.

Although dev-boards are not expensive, you might just want to try things out, without spending money. Bluetooth, LVGL, board definition, touchscreen can be run native on X86. (simulated watch) Another advantage : no need for a debug probe. You can get a taste of debugging your firmware with gdb. I've included compiled firmware, which you can run on your linux(64) box.

I used a osbox virtual linux ubuntu 18, so you do not even have to own a computer.


suppose you already have ../work/zephyr installed,

copy /app to ../work

Building and Running

  • west build -p -b native_posix_64 oswatch
  • ./build/zephyr/zephyr.exe


What Is Included?

In this repository you can find files that supplement a zephyr installation.

  • board definition Contains the board definition for the pinetime, ds_d6, and native_posix_64
  • drivers Contains the drivers for the pinetime, ds_d6
  • samples These are building blocks, which eventually end up in the oswatch-firmware.
  • oswatch-- This is the actual firmware, and you can choose which functions you need

Project Roadmap


  • the display (OLED and pinetime and computerscreen)
  • bluetooth BLE
  • graphics libraries
  • RTC
  • Alarm - Calendar
  • Serial NOR flash
  • accel sensor (not yet implented in oswatch--but driver exists)
  • heart rate sensor (not yet implemented in oswatch--but driver exists)
  • touchscreen (modifying the focaltech driver works on pinetime! but not present (yet) in oswatch---)
  • CTS (setting time in bluetooth)
  • DFU (wireless firmware update)
  • serial port


  • build-in features of bosch accel sensor (eg step counter)
  • powermanagement
  • watchdog
  • touchscreen (out of tree)
  • incorporating sensors


  • HR detection (algorithm)
  • cycle computer

Other watches

There are quite a few hackable watches, based on the same nrf52832 microcontroller. I have also made a repository for the desay D6, which is a ssd1306 OLED based, cheap chinese watch with a serial port. other smartwatches This watch combined with a "blue-pill" black magic debug probe, which contains a serial port, might be one of the cheapest zephyr dev boards available!