@@ -12,9 +12,9 @@ To build this project, you'll need:
12
12
python -m venv .venv
13
13
source .venv/bin/activate
14
14
python -m pip install wheel
15
- python -m pip install -r tools/mcuboot/requirements.txt
15
+ python -m pip install -r tools/mcuboot/requirements.txt adafruit-nrfutil
16
16
```
17
- - A reasonably recent version of CMake (I use 3.16.5 )
17
+ - A reasonably recent version of CMake (minimum 3.10 )
18
18
- lv_font_conv, to generate the font .c files
19
19
- see [lv_font_conv](https://github.com/lvgl/lv_font_conv#install-the-script)
20
20
- install npm (commonly done via the package manager, ensure node' s version is at least 12)
@@ -24,7 +24,7 @@ To build this project, you'll need:
24
24
25
25
### Clone the repo
26
26
27
- ```
27
+ ```sh
28
28
git clone https://github.com/InfiniTimeOrg/InfiniTime.git
29
29
cd InfiniTime
30
30
git submodule update --init
@@ -34,6 +34,40 @@ cd build
34
34
35
35
### Project generation using CMake
36
36
37
+ #### CMakePresets
38
+
39
+ Note that this requires CMake 3.19 or later to be installed.
40
+ This project provides a `CMakePresets.json` file, enabling easy and fast development with modern editors such as VSCode, neovim or CLion.
41
+ The `CMakePresets.json` file looks for the arm-gcc toolchaing and NRF52 SDK in the `sdk-toolchain` directory.
42
+ So to download and exctract these in the correct directory, do the following:
43
+
44
+ ```sh
45
+ mkdir -p sdk-toolchain
46
+
47
+ # Get the nRF5 SDK
48
+ wget https://developer.nordicsemi.com/nRF5_SDK/nRF5_SDK_v15.x.x/nRF5_SDK_15.3.0_59ac345.zip
49
+ mv nRF5_SDK_15.3.0_59ac345.zip sdk-toolchain/
50
+ cd sdk-toolchain
51
+ unzip nRF5_SDK_15.3.0_59ac345.zip
52
+ cd -
53
+
54
+ # Get the arm cross compiler (There' s probably a more linux-y way of doing this though...)
55
+ wget https://developer.arm.com/-/media/Files/downloads/gnu-rm/10.3-2021.10/gcc-arm-none-eabi-10.3-2021.10-x86_64-linux.tar.bz2
56
+ mv gcc-arm-none-eabi-10.3-2021.10-x86_64-linux.tar.bz2 sdk-toolchain/
57
+ cd sdk-toolchain
58
+ tar xjf gcc-arm-none-eabi-10.3-2021.10-x86_64-linux.tar.bz2
59
+ cd -
60
+ ```
61
+
62
+ To use the presets, simply call ` cmake ` like so (make sure you have activated the python virtual environment as described [ above] ( ##dependencies ) ):
63
+
64
+ ``` sh
65
+ cmake --preset Release
66
+ cmake --build build/Release
67
+ ```
68
+
69
+ #### CMake Variables
70
+
37
71
CMake configures the project according to variables you specify the command line. The variables are:
38
72
39
73
Variable | Description | Example|
0 commit comments