Skip to content

Commit ada331c

Browse files
authored
General improvements with CMake presets (#2561)
***NO_CI***
1 parent 5dc04c1 commit ada331c

File tree

23 files changed

+1638
-2619
lines changed

23 files changed

+1638
-2619
lines changed

.gitignore

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -376,5 +376,7 @@ ASALocalRun/
376376
# ESP32 sdkconfig file
377377
sdkconfig
378378

379-
# CMake user presets
379+
# CMake user presets and local presets
380380
CMakeUserPresets.json
381+
config/user-tools-repos.json
382+
config/user-prefs.json

CMake/arm-gcc.json

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
{
2+
"version": 4,
3+
"include": [
4+
"base.json"
5+
],
6+
"configurePresets": [
7+
{
8+
"name": "arm-gcc-cortex-preset",
9+
"description": "Preset for ARM GCC cortex-m0, cortex-m0+, cortex-m3, cortex-m4, cortex-m7, cortex-m33",
10+
"hidden": true,
11+
"inherits": "general-preset",
12+
"cacheVariables": {
13+
"CMAKE_TOOLCHAIN_FILE": {
14+
"type": "FILEPATH",
15+
"value": "${sourceDir}/CMake/toolchain.arm-none-eabi.cmake"
16+
},
17+
"NF_INTEROP_ASSEMBLIES": null
18+
}
19+
}
20+
]
21+
}

CMake/base.json

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
{
2+
"version": 4,
3+
"configurePresets": [
4+
{
5+
"name": "general-preset",
6+
"description": "Preset with general configurations common to all presets",
7+
"hidden": true,
8+
"generator": "Ninja",
9+
"binaryDir": "${sourceDir}/build",
10+
"architecture": {
11+
"value": "unspecified",
12+
"strategy": "external"
13+
},
14+
"vendor": {
15+
"microsoft.com/VisualStudioSettings/CMake/1.0": {
16+
"intelliSenseMode": "linux-gcc-arm"
17+
}
18+
},
19+
"warnings": {
20+
"deprecated": true,
21+
"dev": true,
22+
"uninitialized": false,
23+
"unusedCli": false
24+
},
25+
"cacheVariables": {
26+
"CMAKE_BUILD_TYPE": "MinSizeRel"
27+
}
28+
}
29+
]
30+
}

CMake/xtensa-esp32.json

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
{
2+
"version": 4,
3+
"include": [
4+
"base.json"
5+
],
6+
"configurePresets": [
7+
{
8+
"name": "xtensa-esp32-preset",
9+
"description": "Preset for ESP32 series",
10+
"hidden": true,
11+
"inherits": "general-preset",
12+
"cacheVariables": {
13+
"CMAKE_TOOLCHAIN_FILE": {
14+
"type": "FILEPATH",
15+
"value": "${sourceDir}/CMake/toolchain.xtensa-esp32-elf.cmake"
16+
},
17+
"NF_INTEROP_ASSEMBLIES": null,
18+
"NF_TARGET_HAS_NANOBOOTER": "OFF",
19+
"RTOS": "ESP32",
20+
"TARGET_SERIES": "ESP32",
21+
"TARGET_BOARD": "ESP32",
22+
"NF_FEATURE_HAS_CONFIG_BLOCK": "ON",
23+
"SUPPORT_ANY_BASE_CONVERSION": "ON",
24+
"API_System.Net": "ON",
25+
"API_System.Math": "ON",
26+
"API_System.Device.Adc": "ON",
27+
"API_System.Device.Dac": "ON",
28+
"API_System.Device.Gpio": "ON",
29+
"API_System.Device.I2c": "ON",
30+
"API_System.Device.I2s": "ON",
31+
"API_System.Device.Spi": "ON",
32+
"API_System.Device.Pwm": "ON",
33+
"API_System.Device.Wifi": "ON",
34+
"API_System.IO.Ports": "ON",
35+
"API_Hardware.Esp32": "ON",
36+
"API_nanoFramework.Hardware.Esp32.Rmt": "ON",
37+
"API_nanoFramework.ResourceManager": "ON",
38+
"API_nanoFramework.System.Collections": "ON",
39+
"API_nanoFramework.System.Text": "ON",
40+
"ESP32_SPIRAM_FOR_IDF_ALLOCATION": "256 * 1024"
41+
}
42+
}
43+
]
44+
}

CMake/xtensa-esp32c3.json

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
{
2+
"version": 4,
3+
"include": [
4+
"base.json"
5+
],
6+
"configurePresets": [
7+
{
8+
"name": "xtensa-esp32c3-preset",
9+
"description": "Preset for ESP32-C3 series",
10+
"inherits": "general-preset",
11+
"hidden": true,
12+
"cacheVariables": {
13+
"CMAKE_TOOLCHAIN_FILE": {
14+
"type": "FILEPATH",
15+
"value": "${sourceDir}/CMake/toolchain.riscv32-esp-elf.cmake"
16+
},
17+
"NF_INTEROP_ASSEMBLIES": null,
18+
"NF_TARGET_HAS_NANOBOOTER": "OFF",
19+
"RTOS": "ESP32",
20+
"TARGET_SERIES": "ESP32_C3",
21+
"TARGET_BOARD": "ESP32_C3",
22+
"NF_FEATURE_HAS_CONFIG_BLOCK": "ON",
23+
"SUPPORT_ANY_BASE_CONVERSION": "ON",
24+
"API_System.Net": "ON",
25+
"API_System.Math": "ON",
26+
"API_System.Device.Adc": "ON",
27+
"API_System.Device.Dac": "OFF",
28+
"API_System.Device.Gpio": "ON",
29+
"API_System.Device.I2c": "ON",
30+
"API_System.Device.I2s": "OFF",
31+
"API_System.Device.Spi": "ON",
32+
"API_System.Device.Pwm": "ON",
33+
"API_System.Device.Wifi": "ON",
34+
"API_System.IO.Ports": "ON",
35+
"API_Hardware.Esp32": "ON",
36+
"API_nanoFramework.Hardware.Esp32.Rmt": "OFF",
37+
"API_nanoFramework.ResourceManager": "ON",
38+
"API_nanoFramework.System.Collections": "ON",
39+
"API_nanoFramework.System.Text": "ON"
40+
}
41+
}
42+
]
43+
}

CMake/xtensa-esp32s2.json

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
{
2+
"version": 4,
3+
"include": [
4+
"base.json"
5+
],
6+
"configurePresets": [
7+
{
8+
"name": "xtensa-esp32s2-preset",
9+
"description": "Preset for ESP32-S2 series",
10+
"inherits": "general-preset",
11+
"hidden": true,
12+
"cacheVariables": {
13+
"CMAKE_TOOLCHAIN_FILE": {
14+
"type": "FILEPATH",
15+
"value": "${sourceDir}/CMake/toolchain.xtensa-esp32s2-elf.cmake"
16+
},
17+
"NF_INTEROP_ASSEMBLIES": null,
18+
"NF_TARGET_HAS_NANOBOOTER": "OFF",
19+
"RTOS": "ESP32",
20+
"TARGET_SERIES": "ESP32_S2",
21+
"TARGET_BOARD": "ESP32_S2",
22+
"NF_FEATURE_HAS_CONFIG_BLOCK": "ON",
23+
"SUPPORT_ANY_BASE_CONVERSION": "ON",
24+
"API_System.Net": "ON",
25+
"API_System.Math": "ON",
26+
"API_System.Device.Adc": "ON",
27+
"API_System.Device.Dac": "ON",
28+
"API_System.Device.Gpio": "ON",
29+
"API_System.Device.I2c": "ON",
30+
"API_System.Device.I2s": "ON",
31+
"API_System.Device.Spi": "ON",
32+
"API_System.Device.Pwm": "ON",
33+
"API_System.Device.Wifi": "ON",
34+
"API_System.IO.Ports": "ON",
35+
"API_Hardware.Esp32": "ON",
36+
"API_nanoFramework.Hardware.Esp32.Rmt": "ON",
37+
"API_nanoFramework.ResourceManager": "ON",
38+
"API_nanoFramework.System.Collections": "ON",
39+
"API_nanoFramework.System.Text": "ON",
40+
"ESP32_SPIRAM_FOR_IDF_ALLOCATION": "256 * 1024"
41+
}
42+
}
43+
]
44+
}

0 commit comments

Comments
 (0)