Skip to content

Commit 3e9c30a

Browse files
authored
Merge branch 'JF002:develop' into set-datetime-manually
2 parents ffa5161 + 514481e commit 3e9c30a

67 files changed

Lines changed: 972 additions & 579 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.gitmodules

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
11
[submodule "src/libs/lvgl"]
22
path = src/libs/lvgl
33
url = https://github.com/joaquimorg/lvgl.git
4+
[submodule "src/libs/littlefs"]
5+
path = src/libs/littlefs
6+
url = https://github.com/littlefs-project/littlefs.git

CMakeLists.txt

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
cmake_minimum_required(VERSION 3.10)
2-
project(pinetime VERSION 1.2.0 LANGUAGES C CXX ASM)
2+
project(pinetime VERSION 1.3.0 LANGUAGES C CXX ASM)
33

44
set(CMAKE_C_STANDARD 99)
55
set(CMAKE_CXX_STANDARD 14)
@@ -21,10 +21,6 @@ if (NOT NRF5_SDK_PATH)
2121
message(FATAL_ERROR "The path to the NRF52 SDK must be specified on the command line (add -DNRF5_SDK_PATH=<path>")
2222
endif ()
2323

24-
if(NOT USE_JLINK AND NOT USE_GDB_CLIENT AND NOT USE_OPENOCD)
25-
set(USE_JLINK true)
26-
endif()
27-
2824
if(USE_JLINK)
2925
if (NOT NRFJPROG)
3026
message(FATAL_ERROR "the path to the tool nrfjprog must be specified on the command line (add -DNRFJPROG=<path>")

README.md

Lines changed: 30 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
21
# PineTime
32

43
[![Build PineTime Firmware](https://github.com/JF002/InfiniTime/workflows/Build%20PineTime%20Firmware/badge.svg?branch=master)](https://github.com/JF002/InfiniTime/actions)
@@ -12,9 +11,10 @@
1211
The **Pinetime** smartwatch is built around the NRF52832 MCU (512KB Flash, 64KB RAM), a 240*240 LCD display driven by the ST7789 controller, an accelerometer, a heart rate sensor, and a vibration motor.
1312

1413
# InfiniTime
14+
1515
![InfiniTime logo](images/infinitime-logo.jpg "InfiniTime Logo")
1616

17-
The goal of this project is to design an open-source firmware for the Pinetime smartwatch :
17+
The goal of this project is to design an open-source firmware for the Pinetime smartwatch :
1818

1919
- Code written in **modern C++**;
2020
- Build system based on **CMake**;
@@ -36,28 +36,32 @@ As of now, here is the list of achievements of this project:
3636
- Heart rate measurements
3737
- Step counting
3838
- Wake-up on wrist rotation
39-
- Quick actions
39+
- Quick actions
4040
* Disable vibration on notification
4141
* Brightness settings
4242
* Flashlight
4343
* Settings
44-
- 2 watch faces:
44+
- 3 watch faces:
4545
* Digital
4646
* Analog
47+
* [PineTimeStyle](https://wiki.pine64.org/wiki/PineTimeStyle)
4748
- Multiple 'apps' :
48-
* Music (control the playback of the music on your phone)
49-
* Heart rate (controls the heart rate sensor and display current heartbeat)
49+
* Music (control the playback of music on your phone)
50+
* Heart rate (measure your heart rate)
5051
* Navigation (displays navigation instructions coming from the companion app)
5152
* Notification (displays the last notification received)
5253
* Paddle (single player pong-like game)
53-
* Two (2048 clone game)
54-
* Stopwatch (with all the necessary functions such as play, pause, lap, stop)
55-
* Motion sensor and step counter (displays the number of steps and the state of the motion sensor in real-time)
54+
* Twos (2048 clone game)
55+
* Stopwatch
56+
* Steps (displays the number of steps taken)
57+
* Timer (set a countdown timer that will notify you when it expires)
58+
* Metronome (vibrates to a given bpm with a customizable beats per bar)
5659
- User settings:
5760
* Display timeout
5861
* Wake-up condition
5962
* Time format (12/24h)
6063
* Default watch face
64+
* Daily step goal
6165
* Battery status
6266
* Firmware validation
6367
* System information
@@ -68,18 +72,21 @@ As of now, here is the list of achievements of this project:
6872
* **[Experimental]** [WebBLEWatch](https://hubmartin.github.io/WebBLEWatch/) Synchronize time directly from your web browser. [video](https://youtu.be/IakiuhVDdrY)
6973
- OTA (Over-the-air) update via BLE
7074
- [Bootloader](https://github.com/JF002/pinetime-mcuboot-bootloader) based on [MCUBoot](https://juullabs-oss.github.io/mcuboot/)
71-
75+
7276
## Documentation
7377

7478
### Getting started
79+
7580
- [Getting started with InfiniTime 1.0 (quick user guide, update bootloader and InfiniTime,...)](doc/gettingStarted/gettingStarted-1.0.md)
7681
- [Flash, upgrade (OTA), time synchronization,...](doc/gettingStarted/ota-gadgetbridge-nrfconnect.md)
7782

7883
### Develop
84+
7985
- [Generate the fonts and symbols](src/displayapp/fonts/README.md)
8086
- [Creating a stopwatch in Pinetime(article)](https://pankajraghav.com/2021/04/03/PINETIME-STOPCLOCK.html)
8187

8288
### Build, flash and debug
89+
8390
- [Project branches](doc/branches.md)
8491
- [Versioning](doc/versioning.md)
8592
- [Files included in the release notes](doc/filesInReleaseNotes.md)
@@ -92,20 +99,23 @@ As of now, here is the list of achievements of this project:
9299
- Using files from the releases
93100

94101
### Contribute
102+
95103
- [How to contribute ?](doc/contribute.md)
96104

97105
### API
106+
98107
- [BLE implementation and API](./doc/ble.md)
99-
108+
100109
### Architecture and technical topics
110+
101111
- [Memory analysis](./doc/MemoryAnalysis.md)
102-
112+
103113
### Using the firmware
114+
104115
- [Integration with Gadgetbridge](doc/companionapps/Gadgetbridge.md)
105116
- [Integration with AmazFish](doc/companionapps/Amazfish.md)
106117
- [Firmware update, OTA](doc/companionapps/NrfconnectOTA.md)
107-
108-
118+
109119
## TODO - contribute
110120

111121
This project is far from being finished, and there are still a lot of things to do for this project to become a firmware usable by the general public.
@@ -119,21 +129,23 @@ Here a quick list out of my head of things to do for this project:
119129
- Measure power consumption and improve battery life
120130
- Improve documentation, take better pictures and video than mine
121131
- Improve the UI
122-
- Create companion app for multiple OSes (Linux, Android, iOS) and platforms (desktop, ARM, mobile). Do not forget the other devices from Pine64 like [the Pinephone](https://www.pine64.org/pinephone/) and the [Pinebook Pro](https://www.pine64.org/pinebook-pro/).
132+
- Create companion app for multiple OSes (Linux, Android, iOS) and platforms (desktop, ARM, mobile). Do not forget the other devices from Pine64 like [the Pinephone](https://www.pine64.org/pinephone/) and the [Pinebook Pro](https://www.pine64.org/pinebook-pro/).
123133
- Design a simple CI (preferably self-hosted and easy to reproduce).
124-
134+
125135
Do not hesitate to clone/fork the code, hack it and create pull-requests. I'll do my best to review and merge them :)
126136

127137
## Licenses
138+
128139
This project is released under the GNU General Public License version 3 or, at your option, any later version.
129140

130141
It integrates the following projects:
131142
- RTOS : **[FreeRTOS](https://freertos.org)** under the MIT license
132143
- UI : **[LittleVGL/LVGL](https://lvgl.io/)** under the MIT license
133144
- BLE stack : **[NimBLE](https://github.com/apache/mynewt-nimble)** under the Apache 2.0 license
134145
- Font : **[Jetbrains Mono](https://www.jetbrains.com/fr-fr/lp/mono/)** under the Apache 2.0 license
135-
136-
## Credits
146+
147+
## Credits
148+
137149
I’m not working alone on this project. First, many people create PR for this projects. Then, there is the whole #pinetime community : a lot of people all around the world who are hacking, searching, experimenting and programming the Pinetime. We exchange our ideas, experiments and code in the chat rooms and forums.
138150

139151
Here are some people I would like to highlight:

doc/PinetimeStubWithNrf52DK.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# Build a stub for PineTime using NRF52-DK
22
[NRF52-DK](https://www.nordicsemi.com/Software-and-Tools/Development-Kits/nRF52-DK) is the official developpment kit for NRF52832 SoC from Nordic Semiconductor.
33

4-
It can be very useful for PineTime developpment:
4+
It can be very useful for PineTime development:
55
* You can use it embedded JLink SWD programmer/debugger to program and debug you code on the PineTime
66
* As it's based on the same SoC than the PineTime, you can program it to actually run the same code than the PineTime.
77

@@ -47,4 +47,4 @@ You also need to enable the I/O expander to disconnect pins from buttons and led
4747
| --------- | --------- |
4848
| DETECT | GND |
4949

50-
Now, you should be able to program the SoC on the NRF52-DK board, and use it as if it was running on the pintime.
50+
Now, you should be able to program the SoC on the NRF52-DK board, and use it as if it was running on the PineTime.

doc/ble.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,9 @@ This page describes the BLE implementation and API built in this firmware.
55
**Note** : I'm a beginner in BLE related technologies and the information of this document reflect my current knowledge and understanding of the BLE stack. These informations might be erroneous or incomplete. Feel free to submit a PR if you think you can improve these.
66

77
## BLE Connection
8-
When starting the firmware start a BLE advertising : it send small messages that can be received by any *central* device in range. This allows the device to announce its presence to other devices.
8+
When starting the firmware start a BLE advertising : it sends small messages that can be received by any *central* device in range. This allows the device to announce its presence to other devices.
99

10-
A companion application (running on a PC, RasberryPi, smartphone) which received this avertising packet can request a connection to the device. This connection procedure allows the 2 devices to negociate communication parameters, security keys,...
10+
A companion application (running on a PC, RaspberryPi, smartphone) which received this avertising packet can request a connection to the device. This connection procedure allows the 2 devices to negotiate communication parameters, security keys,...
1111

1212
When the connection is established, the pinetime will try to discover services running on the companion application. For now **CTS** (**C**urrent **T**ime **S**ervice) and **ANS** (**A**lert **N**otification **S**ervice) are supported.
1313

doc/branches.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
The branching model of this project is based on the workflow named [Git flow](https://nvie.com/posts/a-successful-git-branching-model/).
33

44
It is based on 2 main branches:
5-
- **master** : this branch is always ready to be reployed. It means that at any time, we should be able to build the branch and release a new version of the application.
5+
- **master** : this branch is always ready to be deployed. It means that at any time, we should be able to build the branch and release a new version of the application.
66
- **develop** : this branch contains the latest development that will be integrated in the next release once it's considered as stable.
77

88
New features should be implemented in **feature branches** created from **develop**. When the feature is ready, a pull-request is created and it'll be merge into **develop** when it is succesfully reviewed and accepted.

doc/buildAndProgram.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ CMake configures the project according to variables you specify the command line
2727
**NRFJPROG**|Path to the NRFJProg executable. Used only if `USE_JLINK` is 1.|`-DNRFJPROG=/opt/nrfjprog/nrfjprog`
2828
**GDB_CLIENT_BIN_PATH**|Path to arm-none-eabi-gdb executable. Used only if `USE_GDB_CLIENT` is 1.|`-DGDB_CLIENT_BIN_PATH=/home/jf/nrf52/gcc-arm-none-eabi-9-2019-q4-major/bin/arm-none-eabi-gdb`
2929
**GDB_CLIENT_TARGET_REMOTE**|Target remote connection string. Used only if `USE_GDB_CLIENT` is 1.|`-DGDB_CLIENT_TARGET_REMOTE=/dev/ttyACM0`
30-
**BUILD_DFU (\*\*)**|Build DFU files while building (needs [adafruit-nrfutil](https://github.com/adafruit/Adafruit_nRF52_nrfutil)).|`-BUILD_DFU=1`
30+
**BUILD_DFU (\*\*)**|Build DFU files while building (needs [adafruit-nrfutil](https://github.com/adafruit/Adafruit_nRF52_nrfutil)).|`-DBUILD_DFU=1`
3131

3232
####(**) Note about **CMAKE_BUILD_TYPE**:
3333
By default, this variable is set to *Release*. It compiles the code with size and speed optimizations. We use this value for all the binaries we publish when we [release](https://github.com/JF002/InfiniTime/releases) new versions of InfiniTime.
@@ -163,7 +163,7 @@ J-Link>g
163163
```
164164

165165
#### JLink RTT
166-
RTT is a feature from Segger's JLink devices that allows bidirectionnal communication between the debugger and the target. This feature can be used to get the logs from the embedded software on the development computer.
166+
RTT is a feature from Segger's JLink devices that allows bidirectional communication between the debugger and the target. This feature can be used to get the logs from the embedded software on the development computer.
167167

168168
- Program the MCU with the code (see above)
169169
- Start JLinkExe

doc/buildWithDocker.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ Based on Ubuntu 18.04 with the following build dependencies:
1313

1414
The `infinitime-build` image contains all the dependencies you need. The default `CMD` will compile sources found in `/sources`, so you need only mount your code.
1515

16-
This example will build the firmware, generate the MCUBoot image and generate the DFU file. For cloning the repo, see [these instructions](../doc/buildAndProgram.md#clone-the-repo). Outputs will be written to **<project_root>/build/output**:
16+
This example will build the firmware, generate the MCUBoot image and generate the DFU file. For cloning the repo, see [these instructions](../doc/buildAndProgram.md#clone-the-repo). Outputs will be written to **<project_root>/build/output**:
1717

1818
```bash
1919
cd <project_root> # e.g. cd ./work/Pinetime

doc/contribute.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ When reviewing PR, the author and contributors will first look at the **descript
4848

4949
Then, reviewing **a few files that were modified for a single purpose** is a lot more easier than to review 30 files modified for many reasons (bug fix, UI improvements, typos in doc,...), even if all these changes make sense. Also, it's possible that we agree on some modification but not on some other, and we won't be able to merge the PR because of the changes that are not accepted.
5050

51-
We do our best to keep the code as consistent as possible, and that mean we pay attention to the **formatting** of the code. If the code formatting is not consistent with our code base, we'll ask you to review it, which will take more time.
51+
We do our best to keep the code as consistent as possible, and that means we pay attention to the **formatting** of the code. If the code formatting is not consistent with our code base, we'll ask you to review it, which will take more time.
5252

5353
The last step of the review consists in **testing** the modification. If it doesn't work out of the box, we'll ask your to review your code and to ensure that it works as expected.
5454

doc/filesInReleaseNotes.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ This firmware is standalone, meaning that it does not need a bootloader to actua
1818
**This firmware must be flashed at address 0x00 in the main flash memory**
1919

2020
### Bootloader
21-
The bootloader is maintained by [lupyuen](https://github.com/lupyuen) and is a binary version of [this release](https://github.com/lupyuen/pinetime-rust-mynewt/releases/tag/v5.0.4).
21+
The bootloader is maintained by [lupyuen](https://github.com/lupyuen) and is a binary version of [this release](https://github.com/lupyuen/pinetime-rust-mynewt/releases/tag/v5.0.4).
2222

2323
- **bootloader.hex** : Firmware in Intel HEX file format.
2424

0 commit comments

Comments
 (0)