Skip to content

Latest commit

 

History

52 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

goPine

goPine is PineTime smartwatch firmware written in Go with TinyGo. This is a developer project: build it locally and use an SWD debugger for the first install, then update over Bluetooth.

Browser updater · Firmware and releases

Dark watch face Light watch face Apps menu Heart-rate and pedometer options Stopwatch with lap time

Screenshots from the desktop simulator.

Features

  • 12/24-hour clock, five alarms with snooze, stopwatch with laps, and countdown timer.
  • Battery and charging display; light/dark themes, brightness, rotation, and tap to wake.
  • Muted clock-face hints open Apps and Settings by either tapping or swiping.
  • Persistent settings, alarms, and timer state.
  • Optional Bluetooth time sync, notifications, and music controls; two saved devices.
  • In-app Bluetooth firmware updates with on-watch confirmation and rollback.
  • Health options: off or periodic heart-rate tracking (1/5/15/30 minutes, 1/3 hours), plus an independent hardware pedometer toggle. Both default to off.

Phone features depend on the companion app and permissions. InfiniLink music controls target Apple Music; notification dismissal is local to the watch. Inbox Clear All removes every visible message and suppresses the iPhone's pre-existing replay backlog. A bounded RAM history remembers the last 32 locally dismissed iPhone notifications across Bluetooth reconnects; new notification IDs or changed content can appear normally. This history resets when the watch reboots. Health replaces the disabled Weather card in Apps. Tap the heart-rate row to cycle modes; periodic mode samples until a valid reading or a 30-second timeout per interval, including while the screen sleeps. The last estimated BPM, its age, and steps since boot appear below the controls. Steps accumulate across toggles, but reset on reboot; they are not a daily history. Tracking choices are saved alongside the other settings. Sensor faults stop tracking until its option is toggled off and on; firmware updates temporarily suspend both sensors. Off mode keeps the previous sensor shutdown behavior. The heart-rate estimator is experimental and needs on-watch validation. Continuous mode has been removed. Older saved Continuous settings migrate to periodic tracking, preserving the previously selected interval (5 minutes by default). Heart-rate tracking and the pedometer pause whenever external power is connected, including after the battery is full. Both resume their saved settings on unplug; step totals are retained and a fresh scheduled heart-rate attempt can run.

The fourth Health button opens Watch face graph, with Off, Heart rate, and Steps choices. The clock can show the last hour of BPM readings or bars of steps per minute, with a labeled numeric scale. Enable the corresponding tracking separately. History stays in RAM and resets on reboot; missing readings remain gaps. Existing clock setup prompts take priority over the graph.

Tap the last heart-reading line in Health for Heart signal diagnostics: raw optical waveform, ambient reading, ADC range, sample count, accepted BPM count, largest sampling gap, and verified sensor register readback. This records acquisition evidence even when no BPM is accepted and retains the last periodic attempt until the next measurement. See heart-rate investigation.

Heart-rate graph on clock face Steps-per-minute graph on clock face

Battery percentage is a voltage estimate, and runtime is still being evaluated.

Build and first install

Requires Go 1.27.4, TinyGo 0.42.0, Python 3, clang, and LLVM tools (llvm-ar, llvm-nm, llvm-dwarfdump, llvm-objdump). For flashing, use a 3.3 V SWD probe with access to the PineTime debug pads and a programmer such as pyOCD.

The BLE radio port requires the audited TinyGo 0.42.0 toolchain; the build script rejects other versions.

From the repository root, fetch the pinned BLE dependency and build:

git clone https://github.com/InfiniTimeOrg/InfiniTime.git build/deps/InfiniTime
git -C build/deps/InfiniTime checkout --detach 6c119eb52206b580b556b41633dddc1e1b66a8da
version=0.3.39  # Set to the version you are building.
bash scripts/build-ota.sh --bootstrap "$version"
bash scripts/build-ota.sh --ble "$version"
go run ./cmd/otapack \
  -elf "build/ota/gopine-$version.elf" -version "$version" \
  -bootloader build/assets/bootloader-1.0.1.bin -out build/bootstrap

The bootstrap build downloads and verifies the stock bootloader/recovery assets and initializes TinyGo's libc headers. The final command packages the BLE build into a combined bootloader/application HEX.

Connect SWDIO, SWCLK, and ground. Power the battery-connected watch from its charger; do not connect a second supply to VCC. Back up existing firmware if needed. Flash the recovery helper first:

pyocd flash -t nrf52832 -f 1000000 -O auto_unlock=false -e sector \
  "build/bootstrap/gopine-recovery-setup-$version.hex"
pyocd reset -t nrf52832 -f 1000000 -O auto_unlock=false

Wait for Recovery ready on the watch, then flash the combined image:

pyocd flash -t nrf52832 -f 1000000 -O auto_unlock=false -e sector \
  "build/bootstrap/gopine-bootstrap-$version.hex"
pyocd reset -t nrf52832 -f 1000000 -O auto_unlock=false

Use sector erase, not mass erase or automatic unlock. The helper replaces the running firmware and provisions recovery; complete both steps. The final image contains MCUboot and a confirmed goPine build. Set or sync the clock afterward.

For standalone SWD development, targets/pinetime-gopine.json builds without MCUboot. It starts at address zero and overwrites an installed bootloader; use the bootstrap procedure above for Bluetooth updates and rollback.

Bluetooth updates

Requires a BLE build of goPine 0.3.22 or newer already installed. Build with bash scripts/build-ota.sh --ble "$version", or download a release ZIP.

  1. Open the browser updater in a Web Bluetooth browser and choose the firmware ZIP.
  2. On the watch, open Settings → Firmware Update and hold until Ready to connect. Use at least 20% battery or external power.
  3. Connect to goPine Update and keep the page open through verification.
  4. Tap INSTALL, then KEEP after reboot.

On Linux Chrome, Bluetooth may require enabling chrome://flags/#enable-experimental-web-platform-features. For the Linux/BlueZ uploader and local web controls:

bash scripts/ota-update.sh "$version" \
  --package "build/ota/gopine-update-$version.zip" \
  --adapter hci0 --address YOUR_WATCH_ADDRESS --web

Select your own adapter and goPine address. A disconnected transfer can resume in the same sender session; closing the page or restarting the watch requires a new session. Native ZIPs are not compatible with InfiniTime's DFU updater. Images are unsigned; checksums detect corruption, not publisher authenticity.

Recovery

A reset before KEEP requests trial rollback. To reach the stock MCUboot menu, hold the side button until restart: release at green for normal boot, blue for the image remaining in the secondary slot, or red for InfiniTime recovery. Rollback cannot restore an overwritten image. Recovery uses compatible external DFU tools and official InfiniTime packages; reinstall goPine over SWD if needed.

Development

Install SDL2 development libraries (libsdl2-dev on Debian/Ubuntu), then run:

go run .
go test ./...
go vet ./...

Mouse clicks/drags simulate touch; Space is the side button. Set GOPINE_SIM_STORAGE=/path/to/watch.flash for persistent simulator settings. Swipe right from the clock for Apps and left for Settings. Bluetooth and tap to wake default to off; enable them in Settings. The clock needs manual setting or phone sync after an unexpected reset.

Tagging vMAJOR.MINOR.PATCH runs the tested BLE release workflow. It publishes update ZIPs and resource reports; wired bootstrap images are built locally. The BLE port README covers architecture and tests.

Releases

Used by

Contributors

Languages