This is a port of PebbleOS to the BangleJS2 smartwatch.
- Docker - For building firmware in a consistent environment
- probe-rs - For flashing firmware via SWD (
cargo install probe-rs-tools) - Rust toolchain - For building QSPI flasher tools and memory logger (
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh) - Python 3 - For QSPI flash image creation
# Clone the repository
git clone --recursive <repository-url>
cd pebbleos-banglejs2
# Initialize submodules (if not cloned with --recursive)
make init-submodules
# Build everything
make build
# Build and flash (requires hardware connected via SWD)
make flashThis is a metarepo containing references to all repositories needed for the BangleJS2 port:
- PebbleOS - Main firmware (branch:
banglejs2) - nrfx - Nordic RF driver (branch:
pebbleos-banglejs2) - pebbleapp - Companion phone app (branch:
banglejs2) - qspi-flasher - QSPI flashing tooling
- bangle-memory-logger - Memory-based log reading tooling
- Watch functionality
- Good battery life (~20%/day)
- Color display
- Touch emulated as button
- Sleep mode
- Vibration motor (PWM-based)
- QSPI flash access
- Peripherals (accelerometer, GPS, heart rate sensor, temperature, pressure, etc.)
Initialize submodules:
make init-submodulesBuild firmware only:
make build-firmwareBuild all tools (QSPI flasher + memory logger):
make build-toolsBuild everything:
make buildClean build artifacts:
make cleanFlash everything (requires hardware):
make flashFlash QSPI only:
make flash-qspiFlash main firmware only:
make flash-firmwareRead logs (requires hardware):
make logsA convenience script is provided in scripts/build_and_flash.sh:
./scripts/build_and_flash.shOptions:
--no-flash- Build only, skip all flashing--no-qspi- Skip QSPI flash, only flash main firmware
If not using the Makefile:
QSPI flasher:
# Firmware
cd qspi-flasher/qspi-flasher-fw
cargo build --release
# Host tool
cd qspi-flasher/qspi-flasher-host
cargo build --releaseMemory logger:
cd bangle-memory-logger
cargo build --releaseThe device must be connected via SWD and powered on. Use probe-rs for flashing:
# Flash main firmware
probe-rs download --chip nRF52840_xxAA PebbleOS/build/src/fw/tintin_fw.elf
probe-rs reset --chip nRF52840_xxAAFor QSPI flashing, use the qspi-flasher tooling (see make flash-qspi).
The bangle-memory-logger tool reads log buffers from the device via SWD:
./bangle-memory-logger/target/release/log-reader --elf PebbleOS/build/src/fw/tintin_fw.elf | tee output.logOptions:
--elf <path>- Path to the firmware ELF file (for symbol resolution)- Use
teeto both display and save logs
The device must be connected via SWD and powered on.
- Only SWD port is exposed on BangleJS2, requiring special tooling for QSPI flashing
- Memory buffer logging is used for debugging via SWD
- nrfx fork includes LOG_BUFFER memory region changes for host-accessible logging