Skip to content

Commit e614af1

Browse files
committed
Add WATCH_COLMI_P8 option to cmake & docs
1 parent 73d3e41 commit e614af1

2 files changed

Lines changed: 10 additions & 0 deletions

File tree

CMakeLists.txt

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -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")

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.

0 commit comments

Comments
 (0)