Skip to content

Commit 5cd4b36

Browse files
JF002Gitea
authored andcommitted
Merge branch 'develop' of JF/PineTime into master
2 parents b89c92b + e63596b commit 5cd4b36

55 files changed

Lines changed: 3687 additions & 158 deletions

Some content is hidden

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

.idea/codeStyles/Project.xml

Lines changed: 1 addition & 24 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

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 0.14.0 LANGUAGES C CXX ASM)
2+
project(pinetime VERSION 0.14.1 LANGUAGES C CXX ASM)
33

44
set(NRF_TARGET "nrf52")
55

@@ -41,6 +41,10 @@ if(DEFINED USE_DEBUG_PINS AND USE_DEBUG_PINS)
4141
add_definitions(-DUSE_DEBUG_PINS)
4242
endif()
4343

44+
if(BUILD_DFU)
45+
set(BUILD_DFU true)
46+
endif()
47+
4448
message("BUILD CONFIGURATION")
4549
message("-------------------")
4650
message(" * Version : " ${PROJECT_VERSION_MAJOR}.${PROJECT_VERSION_MINOR}.${PROJECT_VERSION_PATCH})
@@ -62,6 +66,11 @@ if(USE_DEBUG_PINS)
6266
else()
6367
message(" * Debug pins : Disabled")
6468
endif()
69+
if(BUILD_DFU)
70+
message(" * Build DFU (using adafruit-nrfutil) : Enabled")
71+
else()
72+
message(" * Build DFU (using adafruit-nrfutil) : Disabled")
73+
endif()
6574

6675
set(VERSION_EDIT_WARNING "// Do not edit this file, it is automatically generated by CMAKE!")
6776
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/src/Version.h.in ${CMAKE_CURRENT_SOURCE_DIR}/src/Version.h)

README.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,8 @@ The goal of this project is to design an open-source firmware for the Pinetime s
2424

2525
## Overview
2626

27-
![Pinetime screens](images/0.7.0/montage.jpg "PinetimeScreens")
27+
![Pinetime screens](images/0.14.0/collage1.png "PinetimeScreens")
28+
![Pinetime screens](images/0.14.0/collage2.png "PinetimeScreens")
2829

2930
As of now, here is the list of achievements of this project:
3031

@@ -46,6 +47,7 @@ As of now, here is the list of achievements of this project:
4647
- Supported by 2 companion apps (development is in progress):
4748
* [Gadgetbridge](https://codeberg.org/Freeyourgadget/Gadgetbridge/) (on Android)
4849
* [Amazfish](https://openrepos.net/content/piggz/amazfish) (on SailfishOS and Linux)
50+
* **[Experimental]** [WebBLEWatch](https://hubmartin.github.io/WebBLEWatch/) Synchronize time directly from your web browser. [video](https://youtu.be/IakiuhVDdrY)
4951
- **[Experimental]** OTA (Over-the-air) update via BLE
5052
- **[Experimental]** Bootloader based on [MCUBoot](https://juullabs-oss.github.io/mcuboot/)
5153

doc/buildAndProgram.md

Lines changed: 16 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,10 @@ CMake configures the project according to variables you specify the command line
2626
**NRFJPROG**|Path to the NRFJProg executable. Used only if `USE_JLINK` is 1.|`-DNRFJPROG=/opt/nrfjprog/nrfjprog`
2727
**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`
2828
**GDB_CLIENT_TARGET_REMOTE**|Target remote connection string. Used only if `USE_GDB_CLIENT` is 1.|`-DGDB_CLIENT_TARGET_REMOTE=/dev/ttyACM0`
29+
**BUILD_DFU (\*)**|Build DFU files while building (needs [adafruit-nrfutil](https://github.com/adafruit/Adafruit_nRF52_nrfutil)).|`-BUILD_DFU=1`
2930

31+
####(*) Note about **BUILD_DFU**:
32+
DFU files are the files you'll need to install your build of InfiniTime using OTA (over-the-air) mecanism. To generate the DFU file, the Python tool [adafruit-nrfutil](https://github.com/adafruit/Adafruit_nRF52_nrfutil) is needed on your system. Check that this tool is properly installed before enabling this option.
3033

3134
#### CMake command line for JLink
3235
```
@@ -45,11 +48,14 @@ cmake -DARM_NONE_EABI_TOOLCHAIN_PATH=... -DNRF5_SDK_PATH=... -DUSE_OPENOCD=1 -DG
4548

4649
### Build the project
4750
During the project generation, CMake created the following targets:
48-
- FLASH_ERASE : mass erase the flash memory of the NRF52.
49-
- FLASH_pinetime-app : flash the firmware into the NRF52.
50-
- pinetime-app : build the standalone (without bootloader support) version of the firmware.
51-
- pinetime-mcuboot-app : build the firmware with the support of the bootloader (based on MCUBoot).
52-
- pinetime-graphics : small firmware that writes the boot graphics into the SPI flash.
51+
- **FLASH_ERASE** : mass erase the flash memory of the NRF52.
52+
- **FLASH_pinetime-app** : flash the firmware into the NRF52.
53+
- **pinetime-app** : build the standalone (without bootloader support) version of the firmware.
54+
- **pinetime-recovery** : build the standalone recovery version of infinitime (light firmware that only supports OTA and basic UI)
55+
- **pinetime-recovery-loader** : build the standalone tool that flashes the recovery firmware into the external SPI flash
56+
- **pinetime-mcuboot-app** : build the firmware with the support of the bootloader (based on MCUBoot).
57+
- **pinetime-mcuboot-recovery** : build pinetime-recovery with bootloader support
58+
- **pinetime-mcuboot-recovery-loader** : build pinetime-recovery-loader with bootloader support
5359

5460
If you just want to build the project and run it on the Pinetime, using *pinetime-app* is recommanded. See [this page](../bootloader/README.md) for more info about bootloader support.
5561

@@ -64,8 +70,11 @@ Binary files are generated into the folder `src`:
6470
- **pinetime-app.map** : map file
6571
- **pinetime-mcuboot-app.bin, .hex and .out** : firmware with bootloader support in bin, hex and out formats.
6672
- **pinetime-mcuboot-app.map** : map file
67-
- **pinetime-graphics.bin, .hex and .out** : firmware for the boot graphic in bin, hex and out formats.
68-
- **pinetime-graphics.map** : map file
73+
- **pinetime-mcuboot-app-image** : MCUBoot image of the firmware
74+
- **pinetime-mcuboot-ap-dfu** : DFU file of the firmware
75+
76+
The same files are generated for **pinetime-recovery** and **pinetime-recoveryloader**
77+
6978

7079
### Program and run
7180
#### Using CMake targets

docker/Dockerfile

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,8 @@ RUN apt-get update -qq \
1717
# aarch64 packages
1818
libffi-dev \
1919
libssl-dev \
20-
python3-dev \
20+
python3-dev \
21+
python \
2122
&& rm -rf /var/cache/apt/* /var/lib/apt/lists/*;
2223

2324
RUN pip3 install adafruit-nrfutil

docker/build.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,7 @@ CmakeGenerate() {
6363
-DUSE_OPENOCD=1 \
6464
-DARM_NONE_EABI_TOOLCHAIN_PATH="$TOOLS_DIR/$GCC_ARM_VER" \
6565
-DNRF5_SDK_PATH="$TOOLS_DIR/$NRF_SDK_VER" \
66+
-DBUILD_DFU=1 \
6667
"$SOURCES_DIR"
6768
cmake -L -N .
6869
}

docker/post_build.sh.in

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -9,15 +9,12 @@ export PROJECT_VERSION="@PROJECT_VERSION_MAJOR@.@PROJECT_VERSION_MINOR@.@PROJECT
99
mkdir -p "$OUTPUT_DIR"
1010

1111
cp "$SOURCES_DIR"/bootloader/bootloader-5.0.4.bin $OUTPUT_DIR/bootloader.bin
12+
cp "$BUILD_DIR/src/pinetime-mcuboot-app-image-$PROJECT_VERSION.bin" "$OUTPUT_DIR/pinetime-mcuboot-app-image-$PROJECT_VERSION.bin"
13+
cp "$BUILD_DIR/src/pinetime-mcuboot-app-dfu-$PROJECT_VERSION.zip" "$OUTPUT_DIR/pinetime-mcuboot-app-dfu-$PROJECT_VERSION.zip"
1214

13-
"$TOOLS_DIR"/mcuboot/scripts/imgtool.py create --version 1.0.0 \
14-
--align 4 --header-size 32 --slot-size 475136 --pad-header \
15-
"$BUILD_DIR/src/pinetime-mcuboot-app-$PROJECT_VERSION.bin" \
16-
"$OUTPUT_DIR/image-$PROJECT_VERSION.bin"
15+
cp "$BUILD_DIR/src/pinetime-mcuboot-recovery-loader-image-$PROJECT_VERSION.bin" "$OUTPUT_DIR/pinetime-mcuboot-recovery-loader-image-$PROJECT_VERSION.bin"
16+
cp "$BUILD_DIR/src/pinetime-mcuboot-recovery-loader-dfu-$PROJECT_VERSION.zip" "$OUTPUT_DIR/pinetime-mcuboot-recovery-loader-dfu-$PROJECT_VERSION.zip"
1717

18-
adafruit-nrfutil dfu genpkg --dev-type 0x0052 \
19-
--application "$OUTPUT_DIR/image-$PROJECT_VERSION.bin" \
20-
"$OUTPUT_DIR/dfu-$PROJECT_VERSION.zip"
2118

2219
mkdir -p "$OUTPUT_DIR/src"
2320
cd "$BUILD_DIR"

images/0.14.0/collage1.png

607 KB
Loading

images/0.14.0/collage2.png

625 KB
Loading

images/infinitime-logo-github.jpg

36.6 KB
Loading

0 commit comments

Comments
 (0)