Skip to content
A simple pinetime firmware writen in C
C Other
  1. C 98.8%
  2. Other 1.2%
Branch: master
Clone or download
Latest commit e38cd2a Jan 15, 2020
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
art tweak battery % Jan 15, 2020
notes . Jan 13, 2020
raspi Update readme.md Jan 15, 2020
src . Jan 15, 2020
.editorconfig . Jan 15, 2020
.gitignore
CMakeLists.txt states and switch with button press ( needs debouncing ) Jan 12, 2020
LICENSE forgot to add a license :) Jan 15, 2020
apts.sh added bitmap render test Jan 14, 2020
art.lua clip to reduce bmap size Jan 14, 2020
art.sh added bitmap render test Jan 14, 2020
cmake.sh added libfixmath Jan 12, 2020
flash.sh flash.sh will flash twice once with semihosting to set the correct ti… Jan 14, 2020
gdb.gdb smarter hostname handling, gonna need a new pi build for the sd card … Jan 10, 2020
gdb.sh added libfixmath Jan 12, 2020
libfixmath.sh added libfixmath Jan 12, 2020
make.sh added libfixmath Jan 12, 2020
nr5sdk.sh added libfixmath Jan 12, 2020
readme.md
run.sh added libfixmath Jan 12, 2020
tail.sh added libfixmath Jan 12, 2020
timecake.cmake clip to reduce bmap size Jan 14, 2020
timecake.ld saveram Jan 10, 2020

readme.md

TIMECAKE

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.

  1. ./apts.sh
    • Install dependencies
  2. ./nr5sdk.sh
    • Download SDK
  3. ./libfixmath.sh
    • Download libfixmath ( not sure we need it but it is part of the build for now )

To build the code.

  1. ./cmake.sh
    • Perform out of build cmake, a clean project in ./out/ will be created
  2. ./make.sh
    • Compile and link in ./out/
  3. ./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.

  1. ./cmake.sh -D SEMIHOSTING=ON
    • Enable semihosting (printf) to the openocd console
  2. ./make.sh
    • Compile and link in ./out/
  3. ./gdb.sh
    • Start gdb, connect to OpenOCD and squirt code across

...then in another console while gdb is still running...

  1. ./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 :)

PINEWATCH FEATURES WORKING

  • Remote Build
  • Remote printf (semihosting)
  • Remote GDB
  • Local build
  • Sleep
  • LCD
  • Battery percent
  • Time
  • Accelerometer
  • Touch
  • Button
  • Buzz
  • Heart
  • Storage
  • BlueTooth
You can’t perform that action at this time.