Skip to content

Commit 5bdef36

Browse files
committed
Merge branch 'develop' into HEAD
2 parents 9e8dd9a + 514481e commit 5bdef36

139 files changed

Lines changed: 5338 additions & 1792 deletions

File tree

Some content is hidden

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

.clang-tidy

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
Checks: '*,
2+
-altera-unroll-loops,
23
-llvmlibc-callee-namespace,
34
-llvm-header-guard,
45
-llvm-namespace-comment,
@@ -14,17 +15,20 @@ Checks: '*,
1415
-cppcoreguidelines-avoid-magic-numbers,
1516
-cppcoreguidelines-avoid-non-const-global-variables,
1617
-cppcoreguidelines-avoid-c-arrays,
18+
-cppcoreguidelines-special-member-functions,
1719
-readability-magic-numbers,
1820
-readability-uppercase-literal-suffix,
1921
-modernize-use-trailing-return-type,
2022
-modernize-avoid-c-arrays,
21-
-hicpp-signed-bitwise,
22-
-hicpp-no-assembler,
2323
-hicpp-avoid-c-arrays,
2424
-hicpp-uppercase-literal-suffix,
25+
-hicpp-vararg,
26+
-hicpp-no-assembler,
2527
-hicpp-no-array-decay,
28+
-hicpp-signed-bitwise,
29+
-hicpp-special-member-functions,
2630
-cert-err58-cpp,
2731
-cert-err60-cpp'
2832
CheckOptions:
2933
- key: readability-function-cognitive-complexity.Threshold
30-
value: 100
34+
value: 100

.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

.idea/codeStyles/Project.xml

Lines changed: 23 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

CMakeLists.txt

Lines changed: 13 additions & 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.0.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>")
@@ -55,10 +51,22 @@ if(BUILD_DFU)
5551
set(BUILD_DFU true)
5652
endif()
5753

54+
set(PROJECT_GIT_COMMIT_HASH "")
55+
56+
execute_process(COMMAND git rev-parse --short HEAD
57+
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
58+
OUTPUT_VARIABLE PROJECT_GIT_COMMIT_HASH
59+
RESULT_VARIABLE PROJECT_GIT_COMMIT_HASH_SUCCESS)
60+
61+
string(STRIP ${PROJECT_GIT_COMMIT_HASH} PROJECT_GIT_COMMIT_HASH)
62+
63+
message("PROJECT_GIT_COMMIT_HASH_SUCCESS? " ${PROJECT_GIT_COMMIT_HASH_SUCCESS})
64+
5865
message("BUILD CONFIGURATION")
5966
message("-------------------")
6067
message(" * Version : " ${PROJECT_VERSION_MAJOR}.${PROJECT_VERSION_MINOR}.${PROJECT_VERSION_PATCH})
6168
message(" * Toolchain : " ${ARM_NONE_EABI_TOOLCHAIN_PATH})
69+
message(" * GitRef(S) : " ${PROJECT_GIT_COMMIT_HASH})
6270
message(" * NRF52 SDK : " ${NRF5_SDK_PATH})
6371
set(PROGRAMMER "???")
6472
if(USE_JLINK)

README.md

Lines changed: 31 additions & 19 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,50 +36,57 @@ 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
6468
- Supported by 3 companion apps (development is in progress):
65-
* [Gadgetbridge](https://codeberg.org/Freeyourgadget/Gadgetbridge/) (on Android)
69+
* [Gadgetbridge](https://codeberg.org/Freeyourgadget/Gadgetbridge/) (on Android via F-Droid)
6670
* [Amazfish](https://openrepos.net/content/piggz/amazfish) (on SailfishOS and Linux)
6771
* [Siglo](https://github.com/alexr4535/siglo) (on Linux)
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:

cmake-nRF5x/CMake_nRF5x.cmake

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -74,21 +74,6 @@ macro(nRF5x_setup)
7474
)
7575
endif ()
7676

77-
set(COMMON_FLAGS "-MP -MD -mthumb -mabi=aapcs -Wall -g3 -ffunction-sections -fdata-sections -fno-strict-aliasing -fno-builtin --short-enums ${CPU_FLAGS} -Wreturn-type -Werror=return-type")
78-
79-
# compiler/assambler/linker flags
80-
set(CMAKE_C_FLAGS "${COMMON_FLAGS}")
81-
set(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -O0 -g3")
82-
set(CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE} -O3")
83-
set(CMAKE_CXX_FLAGS "${COMMON_FLAGS}")
84-
set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -O0 -g3")
85-
set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -O3")
86-
set(CMAKE_ASM_FLAGS "-MP -MD -x assembler-with-cpp")
87-
set(CMAKE_EXE_LINKER_FLAGS "-mthumb -mabi=aapcs -L ${NRF5_SDK_PATH}/modules/nrfx/mdk -T${NRF5_LINKER_SCRIPT} ${CPU_FLAGS} -Wl,--gc-sections --specs=nano.specs -lc -lnosys -lm")
88-
# note: we must override the default cmake linker flags so that CMAKE_C_FLAGS are not added implicitly
89-
set(CMAKE_C_LINK_EXECUTABLE "${CMAKE_C_COMPILER} <LINK_FLAGS> <OBJECTS> -o <TARGET> <LINK_LIBRARIES>")
90-
set(CMAKE_CXX_LINK_EXECUTABLE "${CMAKE_C_COMPILER} <LINK_FLAGS> <OBJECTS> -lstdc++ -o <TARGET> <LINK_LIBRARIES>")
91-
9277
# basic board definitions and drivers
9378
include_directories(
9479
"${NRF5_SDK_PATH}/components"

0 commit comments

Comments
 (0)