Details about the Pine Time can be found at https://wiki.pine64.org/index.php/PineTime
My plan with this project is to get as far as some sort of watch display, so far it looks like we can do most things at the hardware level. This means we will NOT be using an operating system such as FreeRTOS, Zephyr, mynewt, MbedOS or RIOT.
The following was tested and working on Ubuntu 19.10
See raspi directory for scripts to build an sd card image to run on a PI. Or check github releases for an sd card image you could just download.
This PI is then used as a programmer for the pinetime connected to the GPIO pins and to a network so we can squirt code across remotely.
To prepare.
./apts.sh
- Install dependencies
./nr5sdk.sh
- Download SDK
./libfixmath.sh
- Download libfixmath ( not sure we need it but it is part of the build for now )
To build the code.
./cmake.sh
- Perform out of build cmake, a clean project in ./out/ will be created
./make.sh
- Compile and link in ./out/
./run.sh
- Start gdb, connect to OpenOCD and squirt code across then exit.
If that works you may also try building a semihosting version which will only work while gdb is connected.
./cmake.sh -D SEMIHOSTING=ON
- Enable semihosting (printf) to the openocd console
./make.sh
- Compile and link in ./out/
./gdb.sh
- Start gdb, connect to OpenOCD and squirt code across
...then in another console while gdb is still running...
./tail.sh
- View the printf output (openocd logs) Note that gdb must still be connected or semihosting will fail.
After running this semi hosting version successfully it will have set the clock correctly so you can flash back to the normal version and retain the correct time. This is how I am currently setting the time :)
- Remote Build
- Remote printf (semihosting)
- Remote GDB
- Local build
- Sleep
- LCD
- Battery percent
- Time
- Accelerometer
- Touch
- Button
- Buzz
- Heart
- Storage
- BlueTooth