PineTime "smartwatch" quickstart repo for Rust development with HAL
This is a work in progress. As of right now this setup has been tested with the PineTime watch using a JLink Mini-Edu probe and the Segger JLinkGDBRemote software. No other probe/setup has been tested yet.
Connect the SWD to your JLink probe and connect the probe to the computer. A breakout board might be needed so you can use standard breakout pins.
- Segger JLink software
arm-none-eabi-gdb
WARNING Flashing the device removes the closed-source OS that comes with PineTime. I'm not aware of any way to get it back (there might be a hex file somewhere).
You should run JLinkExe
for first time so you can unlock the "locked flash/ram" on the PineTime. A prompt should pop up, if not check if your Segger software is up to date. Once the re-flash is done you can continue using JLinkGDBServer
as shown below:
- Run
JLinkGDBServer -device NRF52832_XXAA -if SWD -speed 4000 -port 3333 -nogui
You might get a pop up if using JLink Mini-Edu that needs to be accepted once per day - Once
JLinkGDBServer
is connected you should be good to go and just usecargo run
to execute the main program. Use the examples as required.
TODO
The main program is just an endless wait loop, not too interresting.
There are currently these examples, run them with cargo run --release --example <name>
display
- renders some basic primitives on a blue backgrounddisplay_ferris
- draws ferris over a black backgroundsystemoff
- shuts down to low power modebattery_status
- one time battery info to semihosting printlns