Skip to content

Commit 6652ec6

Browse files
JF002Gitea
authored andcommitted
Merge branch 'develop' of JF/PineTime into master
2 parents 6c3d6fb + d03db14 commit 6652ec6

50 files changed

Lines changed: 962 additions & 287 deletions

Some content is hidden

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

.github/workflows/main.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,13 +9,13 @@ name: Build PineTime Firmware
99
# When to run this Workflow...
1010
on:
1111

12-
# Run this Workflow when files are updated (Pushed) in the "master" Branch
12+
# Run this Workflow when files are updated (Pushed) in the "master" and "develop" Branch
1313
push:
14-
branches: [ master ]
14+
branches: [ master, develop ]
1515

16-
# Also run this Workflow when a Pull Request is created or updated in the "master" Branch
16+
# Also run this Workflow when a Pull Request is created or updated in the "master" and "develop" Branch
1717
pull_request:
18-
branches: [ master ]
18+
branches: [ master, develop ]
1919

2020
# Steps to run for the Workflow
2121
jobs:

.gitignore

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,4 +38,8 @@ Testing/Temporary/
3838
**/.DS_Store
3939

4040
# Windows
41-
**/thumbs.db
41+
**/thumbs.db
42+
43+
#VSCODE
44+
.vscode/.cortex-debug.registers.state.json
45+
.vscode/.cortex-debug.peripherals.state.json

.vscode/settings.json

Lines changed: 51 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,5 +5,55 @@
55
"-DNRF5_SDK_PATH=${env:NRF5_SDK_PATH}",
66
],
77
"cmake.generator": "Unix Makefiles",
8-
"clang-tidy.buildPath": "build/compile_commands.json"
8+
"clang-tidy.buildPath": "build/compile_commands.json",
9+
"files.associations": {
10+
"array": "cpp",
11+
"atomic": "cpp",
12+
"bit": "cpp",
13+
"*.tcc": "cpp",
14+
"bitset": "cpp",
15+
"cctype": "cpp",
16+
"chrono": "cpp",
17+
"clocale": "cpp",
18+
"cmath": "cpp",
19+
"cstdarg": "cpp",
20+
"cstddef": "cpp",
21+
"cstdint": "cpp",
22+
"cstdio": "cpp",
23+
"cstdlib": "cpp",
24+
"ctime": "cpp",
25+
"cwchar": "cpp",
26+
"cwctype": "cpp",
27+
"deque": "cpp",
28+
"unordered_map": "cpp",
29+
"vector": "cpp",
30+
"exception": "cpp",
31+
"algorithm": "cpp",
32+
"functional": "cpp",
33+
"iterator": "cpp",
34+
"memory": "cpp",
35+
"memory_resource": "cpp",
36+
"numeric": "cpp",
37+
"optional": "cpp",
38+
"random": "cpp",
39+
"ratio": "cpp",
40+
"string": "cpp",
41+
"string_view": "cpp",
42+
"system_error": "cpp",
43+
"tuple": "cpp",
44+
"type_traits": "cpp",
45+
"utility": "cpp",
46+
"fstream": "cpp",
47+
"initializer_list": "cpp",
48+
"iosfwd": "cpp",
49+
"istream": "cpp",
50+
"limits": "cpp",
51+
"new": "cpp",
52+
"ostream": "cpp",
53+
"sstream": "cpp",
54+
"stdexcept": "cpp",
55+
"streambuf": "cpp",
56+
"cinttypes": "cpp",
57+
"typeinfo": "cpp"
58+
}
959
}

CMakeLists.txt

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
cmake_minimum_required(VERSION 3.10)
2-
project(pinetime VERSION 1.4.0 LANGUAGES C CXX ASM)
2+
project(pinetime VERSION 1.5.0 LANGUAGES C CXX ASM)
33

44
set(CMAKE_C_STANDARD 99)
55
set(CMAKE_CXX_STANDARD 14)
@@ -51,6 +51,14 @@ if(BUILD_DFU)
5151
set(BUILD_DFU true)
5252
endif()
5353

54+
option(WATCH_COLMI_P8 "Build for the Colmi P8" OFF)
55+
set(TARGET_DEVICE "PineTime")
56+
57+
if(WATCH_COLMI_P8)
58+
set(TARGET_DEVICE "Colmi P8")
59+
add_definitions(-DWATCH_P8)
60+
endif()
61+
5462
set(PROJECT_GIT_COMMIT_HASH "")
5563

5664
execute_process(COMMAND git rev-parse --short HEAD
@@ -68,6 +76,7 @@ message(" * Version : " ${PROJECT_VERSION_MAJOR}.${PROJECT_VERSION_MINOR}.${P
6876
message(" * Toolchain : " ${ARM_NONE_EABI_TOOLCHAIN_PATH})
6977
message(" * GitRef(S) : " ${PROJECT_GIT_COMMIT_HASH})
7078
message(" * NRF52 SDK : " ${NRF5_SDK_PATH})
79+
message(" * Target device : " ${TARGET_DEVICE})
7180
set(PROGRAMMER "???")
7281
if(USE_JLINK)
7382
message(" * Programmer/debugger : JLINK")

README.md

Lines changed: 8 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,22 @@
1-
# PineTime
1+
# InfiniTime
22

33
[![Build PineTime Firmware](https://github.com/JF002/InfiniTime/workflows/Build%20PineTime%20Firmware/badge.svg?branch=master)](https://github.com/JF002/InfiniTime/actions)
44

5-
> The PineTime is a free and open source smartwatch capable of running custom-built open operating systems. Some of the notable features include a heart rate monitor, a week-long battery as well as a capacitive touch IPS display that is legible in direct sunlight. It is a fully community driven side-project, which means that it will ultimately be up to the developers and end-users to determine when they deem the PineTime ready to ship.
6-
7-
> We envision the PineTime as a companion for not only your PinePhone but also for your favorite devices — any phone, tablet, or even PC.
8-
9-
*https://www.pine64.org/pinetime/*
10-
11-
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.
12-
13-
# InfiniTime
14-
155
![InfiniTime logo](images/infinitime-logo.jpg "InfiniTime Logo")
166

17-
The goal of this project is to design an open-source firmware for the Pinetime smartwatch :
7+
The goal of this project is to design an open-source firmware for the [Pinetime smartwatch](https://www.pine64.org/pinetime/) :
188

199
- Code written in **modern C++**;
2010
- Build system based on **CMake**;
2111
- Based on **[FreeRTOS 10.0.0](https://freertos.org)** real-time OS.
2212
- Using **[LittleVGL/LVGL 7](https://lvgl.io/)** as UI library...
2313
- ... and **[NimBLE 1.3.0](https://github.com/apache/mynewt-nimble)** as BLE stack.
2414

15+
## New to InfiniTime?
16+
17+
- [Getting started with InfiniTime 1.0 (quick user guide, update bootloader and InfiniTime,...)](doc/gettingStarted/gettingStarted-1.0.md)
18+
- [Flash, upgrade (OTA), time synchronization,...](doc/gettingStarted/ota-gadgetbridge-nrfconnect.md)
19+
2520
## Overview
2621

2722
![Pinetime screens](images/1.0.0/collage.png "PinetimeScreens")
@@ -70,16 +65,12 @@ As of now, here is the list of achievements of this project:
7065
* [Amazfish](https://openrepos.net/content/piggz/amazfish) (on SailfishOS and Linux)
7166
* [Siglo](https://github.com/alexr4535/siglo) (on Linux)
7267
* **[Experimental]** [WebBLEWatch](https://hubmartin.github.io/WebBLEWatch/) Synchronize time directly from your web browser. [video](https://youtu.be/IakiuhVDdrY)
68+
* **[Experimental]** [Infini-iOS](https://github.com/xan-m/Infini-iOS) (on iOS)
7369
- OTA (Over-the-air) update via BLE
7470
- [Bootloader](https://github.com/JF002/pinetime-mcuboot-bootloader) based on [MCUBoot](https://juullabs-oss.github.io/mcuboot/)
7571

7672
## Documentation
7773

78-
### Getting started
79-
80-
- [Getting started with InfiniTime 1.0 (quick user guide, update bootloader and InfiniTime,...)](doc/gettingStarted/gettingStarted-1.0.md)
81-
- [Flash, upgrade (OTA), time synchronization,...](doc/gettingStarted/ota-gadgetbridge-nrfconnect.md)
82-
8374
### Develop
8475

8576
- [Generate the fonts and symbols](src/displayapp/fonts/README.md)

cmake-nRF5x/readme.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ The script makes use of the following tools:
9898

9999
After setup you can use cmake as usual:
100100

101-
1. Generate the actual build files (out-of-source builds are strongly recomended):
101+
1. Generate the actual build files (out-of-source builds are strongly recommended):
102102

103103
```commandline
104104
cmake -H. -B"cmake-build" -G "Unix Makefiles"

doc/buildAndProgram.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ CMake configures the project according to variables you specify the command line
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`
3030
**BUILD_DFU (\*\*)**|Build DFU files while building (needs [adafruit-nrfutil](https://github.com/adafruit/Adafruit_nRF52_nrfutil)).|`-DBUILD_DFU=1`
31+
**WATCH_COLMI_P8**|Use pin configuration for Colmi P8 watch|`-DWATCH_COLMI_P8=1`
3132

3233
####(**) Note about **CMAKE_BUILD_TYPE**:
3334
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.

doc/gettingStarted/ota-gadgetbridge-nrfconnect.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,8 @@ Read carefully the warning and tap **Install**:
4747

4848
Wait for the transfer to finish. Your PineTime should reset and reboot with the new version of InfiniTime!
4949

50+
Don't forget to **validate** your firmware. In the InfiniTime go to the settings (swipe right, select gear icon) and Firmware option and click **validate**. Otherwise after reboot the previous firmware will be used.
51+
5052
![Gadgetbridge 5](gadgetbridge5.jpg)
5153

5254
### Using NRFConnect
@@ -64,6 +66,8 @@ Select **Distribution packet (ZIP)**:
6466

6567
Browse to the DFU file you downloaded previously, the DFU transfer will start automatically. When the transfer is finished, your PineTime will reset and restart on the new version of InfiniTime!
6668

69+
Don't forget to **validate** your firmware. In the InfiniTime go to the settings (swipe right, select gear icon) and Firmware option and click **validate**. Otherwise after reboot the previous firmware will be used.
70+
6771
![NRFConnect 3](nrfconnect3.jpg)
6872

6973
## How to flash InfiniTime using the SWD interface
@@ -88,6 +92,10 @@ If you are using OpenOCD with a STLinkV2, you can find more info [on this page](
8892
### Using Gadgetbridge
8993
Good news! Gadgetbridge **automatically** synchronizes the time when connecting to your PineTime!
9094

95+
### Using any Chromium-based web browser
96+
You can use it from your PC, Mac, Android. Browsers now have BLE support.
97+
https://hubmartin.github.io/WebBLEWatch/
98+
9199
### Using NRFConnect
92100
You must enable the **CTS** *GATT server* into NRFConnect so that InfiniTime can synchronize the time with your smartphone.
93101

doc/versioning.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,4 @@ The versioning of this project is based on [Semantic versionning](https://semver
33

44
- The **patch** is incremented when we fix a bug on a **released** version (most of the time using a **hotfix** branch).
55
- The **minor** is incremented when we release a new version with new features. It corresponds to a merge of **develop** into **master**.
6-
- The **major** should be incremented when a breaking change is made to the application. We still have to define what is a breaking change in the context of this project. For now, I suggest that it stays **0** until we have a fully functionning firmware suited for the final user.
6+
- The **major** should be incremented when a breaking change is made to the application. We still have to define what is a breaking change in the context of this project. For now, I suggest that it stays **0** until we have a fully functioning firmware suited for the final user.

gcc_nrf52-mcuboot.ld

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,18 @@ GROUP(-lgcc -lc -lnosys)
66
MEMORY
77
{
88
FLASH (rx) : ORIGIN = 0x08020, LENGTH = 0x78000
9-
RAM (rwx) : ORIGIN = 0x20000000, LENGTH = 0x10000
9+
RAM (rwx) : ORIGIN = 0x20000000, LENGTH = 64K
1010
}
1111

1212
SECTIONS
1313
{
14-
}
14+
.noinit(NOLOAD):
15+
{
16+
PROVIDE(__start_noinit_data = .);
17+
*(.noinit)
18+
PROVIDE(__stop_noinit_data = .);
19+
} > RAM
20+
} INSERT AFTER .bss
1521

1622
SECTIONS
1723
{

0 commit comments

Comments
 (0)