Skip to content

Commit

Permalink
Merge branch 'main' into button-unlock
Browse files Browse the repository at this point in the history
  • Loading branch information
tgcfoss committed Sep 7, 2023
2 parents f9e9a4f + 0aead42 commit cf1d287
Show file tree
Hide file tree
Showing 76 changed files with 1,368 additions and 2,843 deletions.
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/bug-report.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ body:
label: Verification
description: Before submitting a bug report, check if similar issues already exist and use those issues to provide your feedback instead.
options:
- label: I searched for similar bug reports and found none was relevant.
- label: I searched for similar bug reports (including closed issues) and found none was relevant.
required: true
- type: input
id: desc-brief
Expand Down
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/issue-report.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ body:
label: Verification
description: Before submitting an issue, check if similar issues already exist and use those issues to provide your feedback instead.
options:
- label: I searched for similar issues and found none was relevant.
- label: I searched for similar issues (including closed issues) and found none was relevant.
required: true
- type: textarea
attributes:
Expand Down
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -47,3 +47,6 @@ Testing/Temporary/
#build files
src/nRF5_SDK_15.3.0_59ac345
src/arm-none-eabi

# clangd
.cache/
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,6 @@
[submodule "src/libs/QCBOR"]
path = src/libs/QCBOR
url = https://github.com/laurencelundblade/QCBOR.git
[submodule "src/libs/arduinoFFT"]
path = src/libs/arduinoFFT
url = https://github.com/kosme/arduinoFFT.git
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ cmake_minimum_required(VERSION 3.10)

set(CMAKE_BUILD_TYPE Release CACHE STRING "Choose Debug or Release")

project(pinetime VERSION 1.12.0 LANGUAGES C CXX ASM)
project(pinetime VERSION 1.13.0 LANGUAGES C CXX ASM)

set(CMAKE_C_STANDARD 99)
set(CMAKE_CXX_STANDARD 14)
Expand Down
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,16 @@ Fast open-source firmware for the [PineTime smartwatch](https://www.pine64.org/p
- [Getting started with InfiniTime](doc/gettingStarted/gettingStarted-1.0.md)
- [Updating the software](doc/gettingStarted/updating-software.md)
- [About the firmware and bootloader](doc/gettingStarted/about-software.md)
- [PineTimeStyle Watch face](https://wiki.pine64.org/wiki/PineTimeStyle)
- [Weather integration](https://wiki.pine64.org/wiki/Infinitime-Weather)

### Companion apps

- [Gadgetbridge](https://gadgetbridge.org/) (Android)
- [AmazFish](https://openrepos.net/content/piggz/amazfish/) (SailfishOS)
- [Siglo](https://github.com/alexr4535/siglo) (Linux)
- [InfiniLink](https://github.com/InfiniTimeOrg/InfiniLink) (iOS) **[Looking for a new maintainer]**
- [ITD](https://gitea.arsenm.dev/Arsen6331/itd) (Linux)
- [ITD](https://gitea.elara.ws/Elara6331/itd) (Linux)
- [WatchMate](https://github.com/azymohliad/watchmate) (Linux)

***Note** : We removed mentions to NRFConnect as this app is closed source and recent versions do not work anymore with InfiniTime (the last version known to work is 4.24.3). If you used NRFConnect in the past, we recommend you switch to [Gadgetbridge](https://gadgetbridge.org/).*
Expand Down
12 changes: 11 additions & 1 deletion doc/buildAndProgram.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,17 @@ CMake configures the project according to variables you specify the command line
#### (\*) Note about **CMAKE_BUILD_TYPE**
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/InfiniTimeOrg/InfiniTime/releases) new versions of InfiniTime.
The *Debug* mode disables all optimizations, which makes the code easier to debug. However, the binary size will likely be too big to fit in the internal flash memory. If you want to build and debug a *Debug* binary, you'll need to disable some parts of the code. For example, the icons for the **Navigation** app use a lot of memory space. You can comment the content of `m_iconMap` in the [Navigation](https://github.com/InfiniTimeOrg/InfiniTime/blob/main/src/displayapp/screens/Navigation.h#L148) application to free some memory.
The *Debug* mode disables all optimizations, which makes the code easier to debug. However, the binary size will likely be too big to fit in the internal flash memory. If you want to build and debug a *Debug* binary, you can disable some parts of the code that are not needed for the test you want to achieve. You can also apply the *Debug* mode selectively on parts of the application by applying the `DEBUG_FLAGS` only for the part (CMake target) you want to debug. For example, let's say you want to debug code related to LittleFS, simply set the compilation options for the RELEASE configuration of the target to `DEBUG_FLAGS` (in `src/CMakeLists.txt`). This will force the compilation of that target in *Debug* mode while the rest of the project will be built in *Release* mode. Example:

```
target_compile_options(littlefs PRIVATE
${COMMON_FLAGS}
$<$<CONFIG:DEBUG>: ${DEBUG_FLAGS}>
$<$<CONFIG:RELEASE>: ${DEBUG_FLAGS}> # Change from RELEASE_FLAGS to DEBUG_FLAGS
$<$<COMPILE_LANGUAGE:CXX>: ${CXX_FLAGS}>
$<$<COMPILE_LANGUAGE:ASM>: ${ASM_FLAGS}>
)
```

#### (\*\*) Note about **BUILD_DFU**
DFU files are the files you'll need to install your build of InfiniTime using OTA (over-the-air) mechanism. 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.
Expand Down
10 changes: 10 additions & 0 deletions doc/buildWithDocker.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,16 @@ Based on Ubuntu 22.04 with the following build dependencies:
- adafruit-nrfutil
- lv_font_conv

## Clone the repository

Before building, local repository must be fully initialized.

```
git clone https://github.com/InfiniTimeOrg/InfiniTime.git
cd InfiniTime
git submodule update --init
```

## Run a container to build the project

The `infinitime-build` image contains all the dependencies you need.
Expand Down
23 changes: 17 additions & 6 deletions src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,6 @@ set(SDK_SOURCE_FILES
# FreeRTOS
${NRF5_SDK_PATH}/external/freertos/source/croutine.c
${NRF5_SDK_PATH}/external/freertos/source/event_groups.c
${NRF5_SDK_PATH}/external/freertos/source/portable/MemMang/heap_4.c
${NRF5_SDK_PATH}/external/freertos/source/list.c
${NRF5_SDK_PATH}/external/freertos/source/queue.c
${NRF5_SDK_PATH}/external/freertos/source/stream_buffer.c
Expand Down Expand Up @@ -368,6 +367,8 @@ list(APPEND IMAGE_FILES
displayapp/icons/battery/batteryicon.c
)
list(APPEND SOURCE_FILES
stdlib.c
FreeRTOS/heap_4_infinitime.c
BootloaderVersion.cpp
logging/NrfLogger.cpp
displayapp/DisplayApp.cpp
Expand Down Expand Up @@ -427,7 +428,6 @@ list(APPEND SOURCE_FILES
displayapp/screens/settings/SettingBluetooth.cpp

## Watch faces
displayapp/icons/bg_clock.c
displayapp/screens/WatchFaceAnalog.cpp
displayapp/screens/WatchFaceDigital.cpp
displayapp/screens/WatchFaceInfineat.cpp
Expand Down Expand Up @@ -494,9 +494,14 @@ list(APPEND SOURCE_FILES

buttonhandler/ButtonHandler.cpp
touchhandler/TouchHandler.cpp

utility/Math.cpp
)

list(APPEND RECOVERY_SOURCE_FILES
stdlib.c
FreeRTOS/heap_4_infinitime.c

BootloaderVersion.cpp
logging/NrfLogger.cpp
displayapp/DisplayAppRecovery.cpp
Expand Down Expand Up @@ -556,9 +561,14 @@ list(APPEND RECOVERY_SOURCE_FILES
components/fs/FS.cpp
buttonhandler/ButtonHandler.cpp
touchhandler/TouchHandler.cpp

utility/Math.cpp
)

list(APPEND RECOVERYLOADER_SOURCE_FILES
stdlib.c
FreeRTOS/heap_4_infinitime.c

# FreeRTOS
FreeRTOS/port.c
FreeRTOS/port_cmsis_systick.c
Expand Down Expand Up @@ -666,12 +676,13 @@ set(INCLUDE_FILES
heartratetask/HeartRateTask.h
components/heartrate/Ppg.h
components/heartrate/HeartRateController.h
libs/arduinoFFT-develop/src/arduinoFFT.h
libs/arduinoFFT-develop/src/defs.h
libs/arduinoFFT-develop/src/types.h
libs/arduinoFFT/src/arduinoFFT.h
libs/arduinoFFT/src/defs.h
libs/arduinoFFT/src/types.h
components/motor/MotorController.h
buttonhandler/ButtonHandler.h
touchhandler/TouchHandler.h
utility/Math.h
)

include_directories(
Expand Down Expand Up @@ -783,7 +794,7 @@ add_definitions(-DOS_CPUTIME_FREQ)
add_definitions(-DNRF52 -DNRF52832 -DNRF52832_XXAA -DNRF52_PAN_74 -DNRF52_PAN_64 -DNRF52_PAN_12 -DNRF52_PAN_58 -DNRF52_PAN_54 -DNRF52_PAN_31 -DNRF52_PAN_51 -DNRF52_PAN_36 -DNRF52_PAN_15 -DNRF52_PAN_20 -DNRF52_PAN_55 -DBOARD_PCA10040)
add_definitions(-DFREERTOS)
add_definitions(-D__STACK_SIZE=1024)
add_definitions(-D__HEAP_SIZE=4096)
add_definitions(-D__HEAP_SIZE=0)
add_definitions(-DMYNEWT_VAL_BLE_LL_RFMGMT_ENABLE_TIME=1500)

# Note: Only use this for debugging
Expand Down
Loading

0 comments on commit cf1d287

Please sign in to comment.