paulsykes / pinetime-zephyr

pinetime smartwatch nrf52 zephyr

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

PineTime Zephyr

PineTime firmware toolkit based on Zephyr Project RTOS.

A collection of drivers, libraries and samples to build your own PineTime smart watch firmware.

Contributing to this project

I took a break from this project (till winter) ; https://github.com/MarcusNordstrom/pinetime-zephyr These guys are doing some work on the accel sensor.

Where To Start?

Read the tutorial! A helpful manual is included in the repository:

Installation Overview

  1. Follow the Zephyr Getting Started Guide to install zephyr SDK and tools.
  2. Install west meta tool (https://docs.zephyrproject.org/latest/guides/west/install.html).
  3. Create a working directory and enter it.
mkdir work
cd work
  1. Use west to clone pinetime repository and initialize pinetime project.
west init -m https://github.com/najnesnaj/pinetime-zephyr

Alternatively, you can also clone using manifest from specific branch or tag:

west init -m https://github.com/<user>/pinetime-zephyr --mr <branch>
  1. Use west to use clone and checkout all dependant repositories specified in west.yml (inluding zephyr).
west update
  1. Enjoy!

If you used zephyr and west before and want to stick to the same zephyr copy then you can clone pinetime next to zephyr in working directory and update manifest and west.

west config manifest.path pinetime

Resources:

Tips & Tricks

Logging/Shell/Console

Segger RTT (Real Time Transfer)

Pinetime does not have UART pins but UART-like connection can be achieved using RTT (Real Time Transfer) feature of Segger JLink debugger. RTT data can be accessed using SEGGER tool (RTTViewer) or by using telnet connection to active debug session. Second methond is recommended since it gives better throughput and allows bitdirection communication using Zephyr Shell (with RTT as backend). PuTTY can be used to telnet to debug session.

Prerequisites:

Following steps needs to be taken to run RTT shell in the application:

  1. Install PuTTY and Setup RTT session. On Linux, copy misc/rtt_shell/rtt to ~/putty/sessions. On Windows, execute misc/rtt_shell/putty-rtt.reg.
  2. Enable logging and shell over RTT:
CONFIG_LOG=y
CONFIG_USE_SEGGER_RTT=y
CONFIG_SHELL=y
CONFIG_SHELL_BACKEND_RTT=y
  1. Build and flash application.

  2. Start debug session

west debug (will start gdb)
continue (in gdb console)
  1. Start PuTTY RTT session, prompt should be printed.

Resources:

What Is Included?

In this repository you can find files that supplement a zephyr installation.

  • board definition Contains the board definition for the pinetime.
  • drivers Contains the drivers for the pinetime.
  • samples Modified samples for blinky, new samples for the ST7789V display etc.

Project Roadmap

DONE

  • the display
  • bluetooth BLE
  • graphics libraries
    • LittlevGL
    • Adafruit GFX
  • RTC
  • Serial NOR flash
  • accel sensor
  • heart rate sensor
  • touchscreen
  • CTS (setting time in bluetooth)
  • DFU (wireless firmware update)

TODO

  • HR detection (algorithm)
  • build-in features of bosch accel sensor (eg step counter)
  • testing interrupt/semaphore mechanism on accel sensor and touchscreen
  • powermanagement
  • watchdog

About

pinetime smartwatch nrf52 zephyr

License:Apache License 2.0


Languages

Language:HTML 56.4%Language:TeX 18.5%Language:JavaScript 14.7%Language:CSS 5.1%Language:C 3.9%Language:Common Lisp 0.8%Language:Python 0.3%Language:CMake 0.2%Language:Makefile 0.1%Language:Batchfile 0.1%