@@ -12,9 +12,9 @@ To build this project, you'll need:
1212 python -m venv .venv
1313 source .venv/bin/activate
1414 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
1616 ```
17- - A reasonably recent version of CMake (I use 3.16.5 )
17+ - A reasonably recent version of CMake (minimum 3.10 )
1818- lv_font_conv, to generate the font .c files
1919 - see [lv_font_conv](https://github.com/lvgl/lv_font_conv#install-the-script)
2020 - 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:
2424
2525### Clone the repo
2626
27- ```
27+ ```sh
2828git clone https://github.com/InfiniTimeOrg/InfiniTime.git
2929cd InfiniTime
3030git submodule update --init
@@ -34,6 +34,40 @@ cd build
3434
3535### Project generation using CMake
3636
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+
3771CMake configures the project according to variables you specify the command line. The variables are:
3872
3973 Variable | Description | Example|
0 commit comments