Skip to content

JoshMcguigan/mesozoic

Repository files navigation

Mesozoic - PineTime Firmware

Mesozoic is experimental firmware for the PineTime Smartwatch.

The project is made up of several crates:

  • app - application layer code
    • compiled into both the embedded firmware and the simulator
  • pinetime - low level firmware code supporting the PineTime hardware
  • sim - Mesozoic / PineTime simulator

Quick start (Simulator)

The fastest way to get started with Mesozoic is using the simulator.

# See .cargo/config for the full definition of this alias.
cargo msim

simulator

Simulator dependencies

The simulator uses SDL2 and its development libraries. Installation instructions are available here.

Unit tests

Run the unit tests with:

# See .cargo/config for the full definition of this alias.
cargo mapp-test

Mesozoic includes some snapshot tests. The snapshots can be updated with:

rm app/snapshots/*
cargo mapp-test

Using Mesozoic on real hardware

Setup

Debugger connection

The one-time setup and firmware flashing require connecting to the debug pins of the PineTime as described in the PineTime Devkit Wiring Guide.

One-time setup

  • Download SoftDevice S132
    • Version 7.3.0 has been confirmed to work
  • Extract the *.hex file from the downloaded zip
  • Install probe-rs
    • cargo install probe-rs --features cli
  • Erase the flash
    • probe-rs erase --chip nrf52832_xxAA
  • Flash the SoftDevice
    • probe-rs download --verify --format hex --chip nRF52832_xxAA softdevice.hex

Bluetooth connection

  • Using some BLE explorer app (I use EFR Connect) connect to the device named PINE
  • Read the battery level characteristic from the battery service
  • Accept the pairing request

Flashing Mesozoic to the PineTime

# See .cargo/config for the full definition of this alias.
cargo mpinetime

Toolchain setup

You may need to add the appropriate rust toolchain:

rustup target add thumbv7em-none-eabihf

License

Licensed under either of

at your option.

Contribution

Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.

About

PineTime smartwatch firmware

Resources

License

Apache-2.0, MIT licenses found

Licenses found

Apache-2.0
LICENSE-APACHE.txt
MIT
LICENSE-MIT.txt

Stars

Watchers

Forks

Languages