Difference between revisions of "PineTime Development"

From PINE64
Jump to navigation Jump to search
m (Update ITD link)
 
(21 intermediate revisions by 10 users not shown)
Line 1: Line 1:
== Reprogramming ==
[[PineTime Devkit Wiring|Wire it up]] and then [[Reprogramming the PineTime| flash something]].
== Available firmware and projects ==
== Available firmware and projects ==
{| class="wikitable"
{| class="wikitable"
Line 12: Line 16:
|
|
{|
{|
|[[InfiniTime]] ([https://github.com/JF002/Pinetime JF002/Pinetime])
|[[InfiniTime]] (GitHub: [https://github.com/JF002/Pinetime JF002/Pinetime])
|-
|-
|[https://github.com/kaythe/pinetime-os kaythe/pinetime-os]
|[https://github.com/kaythe/pinetime-os kaythe/pinetime-os]
Line 30: Line 34:
|-
|-
|[https://github.com/endian-albin/pinetime-hypnos endian-albin/pinetime-hypnos]
|[https://github.com/endian-albin/pinetime-hypnos endian-albin/pinetime-hypnos]
|-
|[https://zephyrlabs.github.io/Watchfaces/OmegaTime/ omegatime watchface]
|}
|}


Line 38: Line 44:
|
|
{|
{|
|[https://github.com/lupyuen/pinetime-rust-mynewt lupyuen/pinetime-rust-mynewt]
|[https://github.com/lupyuen/pinetime-rust-mynewt lupyuen/pinetime-rust-mynewt](Discontinued by Creator)
|-
|-
|[https://gitlab.com/caspermeijn/klok caspermeijn/klok]
|[https://gitlab.com/caspermeijn/klok caspermeijn/klok]
Line 49: Line 55:
|
|
{|
{|
|[https://github.com/sethitow/awesome-pinetime sethitow/mbed-pinetime]
|[https://github.com/sethitow/mbed-pinetime sethitow/mbed-pinetime]
|-
|-
|[https://github.com/geoffrey-vl/mbed-pinetime geoffrey.vl/mbed-pinetime]
|[https://github.com/geoffrey-vl/mbed-pinetime geoffrey.vl/mbed-pinetime]
Line 70: Line 76:
| https://wasp-os.readthedocs.io/
| https://wasp-os.readthedocs.io/
| https://github.com/daniel-thompson/wasp-os
| https://github.com/daniel-thompson/wasp-os
| [https://wasp-os.readthedocs.io/en/latest/install.html#pine64-pinetime-developer-edition PineTime install guide]
| [https://wasp-os.readthedocs.io/en/latest/install.html#pine64-pinetime-developer-edition WaspOS PineTime install guide]


|-
|-
Line 93: Line 99:
|[https://github.com/Arc13/Pyrus Arc13/Pyrus]
|[https://github.com/Arc13/Pyrus Arc13/Pyrus]
|}
|}
|-
|-
! AdaFruit bootloader
! AdaFruit bootloader
Line 98: Line 105:
| https://github.com/adafruit/Adafruit_nRF52_Bootloader
| https://github.com/adafruit/Adafruit_nRF52_Bootloader
| [https://github.com/daniel-thompson/wasp-bootloader daniel-thompson/wasp-bootloader]
| [https://github.com/daniel-thompson/wasp-bootloader daniel-thompson/wasp-bootloader]
|-
|-
! Useful drivers
! Useful drivers
Line 103: Line 111:
| https://github.com/sethitow/mbed-pinetime
| https://github.com/sethitow/mbed-pinetime
| [https://github.com/sethitow/mbed-pinetime/tree/master/drivers https://github.com/sethitow/mbed-pinetime]
| [https://github.com/sethitow/mbed-pinetime/tree/master/drivers https://github.com/sethitow/mbed-pinetime]
|}
{| class="wikitable"
!
! Project Homepage
! Project Source
! PineTime Implementations


|-
|-
! UI concepts and drawings
! Gadgetbridge (Android companion app)
|
|
| [https://gitlab.com/arteeh/pinetime-os arteeh/pinetime-os]
|-
! Linux companion app
|
|
| [https://gitlab.com/arteeh/pinetime-companion arteeh/pinetime-companion]
|-
! Android companion app
| https://gadgetbridge.org/
| https://gadgetbridge.org/
| https://codeberg.org/Freeyourgadget/Gadgetbridge
| https://codeberg.org/Freeyourgadget/Gadgetbridge
| [https://github.com/JF002/Pinetime InfiniTime] [https://codeberg.org/Freeyourgadget/Gadgetbridge/commit/9b8f4d329e49cafdfe0497ed38a715faa9f844c6 initial support added]
| InfiniTime support in mainline
 
|-
|-
! Arduino
! Arduino
Line 124: Line 130:
| https://github.com/atc1441/ATCwatch
| https://github.com/atc1441/ATCwatch
| https://github.com/atc1441/ATCwatch
| https://github.com/atc1441/ATCwatch
|-
|-
! OTA Update Flasher / DaFlasher
! OTA Update Flasher / DaFlasher
Line 129: Line 136:
| https://github.com/atc1441/DaFlasherFiles
| https://github.com/atc1441/DaFlasherFiles
| https://github.com/atc1441/DaFlasherFiles
| https://github.com/atc1441/DaFlasherFiles
|-
! InfiniTime companion app for Linux
| [https://github.com/alexr4535/siglo alexr4535/siglo]
|
|
|-
! Wasp-os companion app for Linux
| [https://github.com/Siroj42/wasp-companion Siroj42/wasp-companion]
|
|
|-
! UI design proposal
| [https://github.com/arteeh/pinetime arteeh/pinetime]
|
|
|-
! Flashing app for Linux
| [https://github.com/arteeh/pinetime-flasher arteeh/pinetime-flasher]
|
|
|-
! Flashing app for Windows
| [https://github.com/ZephyrLabs/PinetimeFlasher ZephyrLabs/PinetimeFlasher]
|
|
|-
! ESP32 / ESP8266 SWD WebFlasher
| https://youtu.be/Iu6RoXRZxOk
| https://github.com/atc1441/ESP32_nRF52_SWD
|
|-
! InfiniTime companion daemon for Linux
| [https://gitea.elara.ws/Elara6331/itd Elara6331/itd]
|
|
|-
|-
|}
|}


== How to write battery friendly software? ===
=== Manuals ===
 
* [https://github.com/JF002/Pinetime InfiniTime installation]
* [https://github.com/najnesnaj/pinetime-zephyr Zephyr installation] Beginner manual which explains how to install Zephyr (by najnesnaj).
* [https://wasp-os.readthedocs.io/en/latest/ Wasp-OS installation] Full manual with install instructions and an application writer's guide.
 
== How to write battery friendly software? ==


The key to save battery is to enable only what you need when you need it. nRF52832 has a lot of functionalities allowing you to draw as little current as possible. Here are some tips and tricks:
The key to save battery is to enable only what you need when you need it. nRF52832 has a lot of functionalities allowing you to draw as little current as possible. Here are some tips and tricks:
Line 155: Line 211:
== Wishlist ==
== Wishlist ==


In order to keep track of features and changes to the hardware people would like to see, check out this article: [[PineTime hardware wishlist]]
In order to keep track of features and changes to the hardware people would like to see, check out this article: [[PineTime Hardware Wishlist]]


== Compatibility with other projects ==
== Compatibility with other projects ==
Line 163: Line 219:
To keep track of what, how and why things work like they do across the different projects, check out the [[PineTime SD MCUBoot|PineTime SoftDevice and MCUBoot compatibility]] article.
To keep track of what, how and why things work like they do across the different projects, check out the [[PineTime SD MCUBoot|PineTime SoftDevice and MCUBoot compatibility]] article.


=== Compatibility with companions apps and Bluetooth communication ==
== Compatibility with companions apps and Bluetooth communication ==


There are many firmwares running on Pinetime that implement different BLE APIs (time synchronization, notifications,...). Companion apps must be able to differentiate between different firmwares and forks of the same firmware. See [[PineTime Bluetooth]].
There are a lot of different firmware running on the Pinetime that implement different BLE APIs (time synchronization, notifications, ...). Companion apps must be able to differentiate between different firmware and forks of the same firmware. See [[PineTime Bluetooth]].


== PineTime equivalents and jailbreaking ==
== PineTime equivalents and jailbreaking ==


This page contains a list of PineTime-like smartwatches that might be "jailbreakable" or a good source for ideas for the PineTime: [[PineTime Equivalents]]
This page contains a list of PineTime-like smartwatches that might be "jailbreakable" or a good source for ideas for the PineTime: [[PineTime Equivalents]]
[[Category:PineTime]]

Latest revision as of 05:08, 21 April 2023

Reprogramming

Wire it up and then flash something.

Available firmware and projects

Project Homepage Project Source PineTime Implementations
FreeRTOS https://www.freertos.org https://sourceforge.net/projects/freertos/
InfiniTime (GitHub: JF002/Pinetime)
kaythe/pinetime-os
Zephyr https://www.zephyrproject.org https://github.com/zephyrproject-rtos/zephyr
najnesnaj/pinetime-zephyr
SuperPrower/pinetime_zephyr_sample_fw
Dejvino/pinetime-hermes-firmware
endian-albin/pinetime-hypnos
omegatime watchface
mynewt https://mynewt.apache.org/about/ https://github.com/apache/mynewt-core
lupyuen/pinetime-rust-mynewt(Discontinued by Creator)
caspermeijn/klok
MbedOS https://os.mbed.com https://github.com/ARMmbed/mbed-os
sethitow/mbed-pinetime
geoffrey.vl/mbed-pinetime
RIOT http://riot-os.org/ https://github.com/RIOT-OS/RIOT/ bosmoment/PineTime-apps
TinyGo https://tinygo.org https://github.com/tinygo-org/tinygo aykevl/go-smartwatch
wasp-os (MicroPython) https://wasp-os.readthedocs.io/ https://github.com/daniel-thompson/wasp-os WaspOS PineTime install guide
Rust + RTFM https://rtfm.rs/ rtfm-rs/cortex-m-rtfm https://github.com/dbrgn/pinetime-rtfm/
Bare Metal
https://github.com/xriss/timecake
https://github.com/Arc13/Pyrus
xriss/timecake
Arc13/Pyrus
AdaFruit bootloader https://github.com/adafruit/Adafruit_nRF52_Bootloader daniel-thompson/wasp-bootloader
Useful drivers https://github.com/sethitow/mbed-pinetime https://github.com/sethitow/mbed-pinetime
Project Homepage Project Source PineTime Implementations
Gadgetbridge (Android companion app) https://gadgetbridge.org/ https://codeberg.org/Freeyourgadget/Gadgetbridge InfiniTime support in mainline
Arduino https://youtu.be/4aFDjymXjOw https://github.com/atc1441/ATCwatch https://github.com/atc1441/ATCwatch
OTA Update Flasher / DaFlasher https://youtu.be/gUVEz-pxhgg https://github.com/atc1441/DaFlasherFiles https://github.com/atc1441/DaFlasherFiles
InfiniTime companion app for Linux alexr4535/siglo
Wasp-os companion app for Linux Siroj42/wasp-companion
UI design proposal arteeh/pinetime
Flashing app for Linux arteeh/pinetime-flasher
Flashing app for Windows ZephyrLabs/PinetimeFlasher
ESP32 / ESP8266 SWD WebFlasher https://youtu.be/Iu6RoXRZxOk https://github.com/atc1441/ESP32_nRF52_SWD
InfiniTime companion daemon for Linux Elara6331/itd

Manuals

How to write battery friendly software?

The key to save battery is to enable only what you need when you need it. nRF52832 has a lot of functionalities allowing you to draw as little current as possible. Here are some tips and tricks:

  • Disable / shutdown / put in sleep mode all devices around the MCU (display controller, touch controller, external memory,...).
  • Disable all peripheral inside the MCU when you don't need them (SPI, TWI(I²C),...). The power management of the NRF52832 is very smart and will completely shut down (power off and disable the clock) the peripheral when the software disables it.
  • Put the MCU to sleep as soon and as often as possible. If you are not using a RTOS, this is done by calling WFE (wait for event) instruction. Most of the time, RTOS implement this functionality. For example, FreeRTOS calls it the tickless mode : it puts the CPU in sleep mode when no task is planned for execution for more than a specified time, and wakes up as soon as an event is detected or when a task is ready to run.
  • Do not use logging (JLink RTT, SWO, semihosting,...), it uses a lot of power.
  • Ensure that the debug circuitry of the MCU is not enabled when you measuring the battery life. The debug peripheral is enabled as soon as you connect a debugger to the device, and is not automatically disabled, even if you disconnect the debugger you will have to wait for the battery to go flat to disable to port. The software running in the NRF52832 cannot disable the debug peripheral. How to disable the debug circuitry:
 - using nrfjprog --reset
 - using JLinkExe : issue the command writeDP 1 0
 or with OpenOCD
 - issue the command halt
 - issue the command flash fillw 0x10001208 0xFFFFFF00 0x01
 - issue the command reset
 you can check if the debug port is enabled using the following code
 DWT->CYCCNT ? "NO":"YES"

Wishlist

In order to keep track of features and changes to the hardware people would like to see, check out this article: PineTime Hardware Wishlist

Compatibility with other projects

Different firmware running using different bootloaders and Bluetooth stacks on the nRF52832 have different requirements on how they should be initialised and what should be placed where in the internal flash.

To keep track of what, how and why things work like they do across the different projects, check out the PineTime SoftDevice and MCUBoot compatibility article.

Compatibility with companions apps and Bluetooth communication

There are a lot of different firmware running on the Pinetime that implement different BLE APIs (time synchronization, notifications, ...). Companion apps must be able to differentiate between different firmware and forks of the same firmware. See PineTime Bluetooth.

PineTime equivalents and jailbreaking

This page contains a list of PineTime-like smartwatches that might be "jailbreakable" or a good source for ideas for the PineTime: PineTime Equivalents