You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
-[../CMakeSettings.json](../CMakeSettings.json) - Visual Studio integration file.
33
+
-[`WOLFBOOT_ROOT`/CMakeSettings.json](../CMakeSettings.json) - Visual Studio integration file.
34
34
Maps Visual Studio configurations (Debug, Release) to existing CMake presets.
35
35
Controls IntelliSense, environment variables, and the preset shown in the VS CMake toolbar.
36
36
@@ -66,11 +66,12 @@ Controls IntelliSense, environment variables, and the preset shown in the VS CMa
66
66
67
67
-[downloads/stm32l4.cmake](./downloads/stm32l4.cmake) - STM32L4 fetch script for HAL and CMSIS.
68
68
69
+
-[`WOLFBOOT_ROOT`/.vs/VSWorkspaceSettings.json](../.vs/VSWorkspaceSettings.json) - Exclusion directories: Visual Studio tries to be "helpful" and open a solution file. This is undesired when opening a directory as a CMake project.
69
70
---
70
71
71
72
### Build with cmake using `.config` files
72
73
73
-
Presets are preferred, see below.
74
+
Presets are preferred instead of `.config`, see below.
74
75
75
76
To use `.config` files instead of presets,
76
77
@@ -148,6 +149,43 @@ cmake --preset stm32h7
148
149
cmake --build --preset stm32h7
149
150
```
150
151
152
+
### CMake User Presets.
153
+
154
+
See the [CMakeUserPresets.json.sample(./CMakeUserPresets.json.sample).
155
+
Copy the file to `WOLFBOOT_ROOT` and remove the`.sample` suffix: `CMakeUserPresets.json`.
156
+
157
+
It is critically important that none the names of a user preset do not conflict with regular presets.
158
+
159
+
For instance, the sample extends and overrides some of the `stm32l4` settings,
160
+
using LLVM clang on Windows, and prefixes ALL the names with `my-`:
161
+
162
+
```json
163
+
{
164
+
"version": 3,
165
+
"configurePresets": [
166
+
{
167
+
"name": "my-stm32l4",
168
+
"displayName": "my STM32L4",
169
+
"inherits": [
170
+
"stm32l4"
171
+
],
172
+
"generator": "Ninja",
173
+
"binaryDir": "${sourceDir}/build-my-stm32l4",
174
+
"cacheVariables": {
175
+
"ARM_GCC_BIN": "C:/SysGCC/arm-eabi/bin",
176
+
"HOST_CC": "C:/Program Files/LLVM/bin/clang.exe"
177
+
}
178
+
}
179
+
],
180
+
"buildPresets": [
181
+
{
182
+
"name": "my-stm32l4",
183
+
"configurePreset": "my-stm32l4"
184
+
}
185
+
]
186
+
}
187
+
```
188
+
151
189
152
190
From the [docs for CMake Presets](https://cmake.org/cmake/help/latest/manual/cmake-presets.7.html):
0 commit comments