diff options
| author | hathach <[email protected]> | 2026-06-08 14:34:57 +0700 |
|---|---|---|
| committer | hathach <[email protected]> | 2026-06-08 14:34:57 +0700 |
| commit | bfaa3b6c4f9a0d64641155dc4e4f4e258a1f5eb5 (patch) | |
| tree | 58113859c36ea5fc5923a2fcb6fd3a996921b61e | |
| parent | 97480bad2ce5ddbb38be6bfe00491c49b6ea2afe (diff) | |
tools/gen_presets: build into cmake-build-<board> with single-config Ninja
Change the default configure preset binaryDir from build/<board> to
cmake-build-<board> (the dir name HIL expects) and switch the generator
from Ninja Multi-Config to single-config Ninja. Multi-Config nests
binaries under a RelWithDebInfo/ subdir, which hil_test.py does not look
in; single-config emits device/<ex>/<ex>.elf so preset-built firmware is
directly consumable by `hil_test.py -B examples`.
Regenerated BoardPresets.json (also picks up the tracked ch32v103c_bluepill
board that was missing from presets).
Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
| -rw-r--r-- | hw/bsp/BoardPresets.json | 30 | ||||
| -rwxr-xr-x | tools/gen_presets.py | 8 |
2 files changed, 30 insertions, 8 deletions
diff --git a/hw/bsp/BoardPresets.json b/hw/bsp/BoardPresets.json index 86609d075..a700e7309 100644 --- a/hw/bsp/BoardPresets.json +++ b/hw/bsp/BoardPresets.json @@ -5,10 +5,10 @@ "name": "default", "hidden": true, "description": "Configure preset for the ${presetName} board", - "generator": "Ninja Multi-Config", - "binaryDir": "${sourceDir}/build/${presetName}", + "generator": "Ninja", + "binaryDir": "${sourceDir}/cmake-build-${presetName}", "cacheVariables": { - "CMAKE_DEFAULT_BUILD_TYPE": "RelWithDebInfo", + "CMAKE_BUILD_TYPE": "RelWithDebInfo", "BOARD": "${presetName}" } }, @@ -17,7 +17,7 @@ "hidden": true, "description": "Configure preset for the ${presetName} board", "generator": "Ninja", - "binaryDir": "${sourceDir}/build/${presetName}", + "binaryDir": "${sourceDir}/cmake-build-${presetName}", "cacheVariables": { "BOARD": "${presetName}" } @@ -123,6 +123,10 @@ "inherits": "default" }, { + "name": "ch32v103c_bluepill", + "inherits": "default" + }, + { "name": "ch32v103r_r1_1v0", "inherits": "default" }, @@ -1088,6 +1092,11 @@ "configurePreset": "ch32f205r-r0" }, { + "name": "ch32v103c_bluepill", + "description": "Build preset for the ch32v103c_bluepill board", + "configurePreset": "ch32v103c_bluepill" + }, + { "name": "ch32v103r_r1_1v0", "description": "Build preset for the ch32v103r_r1_1v0 board", "configurePreset": "ch32v103r_r1_1v0" @@ -2473,6 +2482,19 @@ ] }, { + "name": "ch32v103c_bluepill", + "steps": [ + { + "type": "configure", + "name": "ch32v103c_bluepill" + }, + { + "type": "build", + "name": "ch32v103c_bluepill" + } + ] + }, + { "name": "ch32v103r_r1_1v0", "steps": [ { diff --git a/tools/gen_presets.py b/tools/gen_presets.py index 94a9361db..60404a5a7 100755 --- a/tools/gen_presets.py +++ b/tools/gen_presets.py @@ -31,17 +31,17 @@ def main(): {"name": "default", "hidden": True, "description": r"Configure preset for the ${presetName} board", - "generator": "Ninja Multi-Config", - "binaryDir": r"${sourceDir}/build/${presetName}", + "generator": "Ninja", + "binaryDir": r"${sourceDir}/cmake-build-${presetName}", "cacheVariables": { - "CMAKE_DEFAULT_BUILD_TYPE": "RelWithDebInfo", + "CMAKE_BUILD_TYPE": "RelWithDebInfo", "BOARD": r"${presetName}" }}, {"name": "default single config", "hidden": True, "description": r"Configure preset for the ${presetName} board", "generator": "Ninja", - "binaryDir": r"${sourceDir}/build/${presetName}", + "binaryDir": r"${sourceDir}/cmake-build-${presetName}", "cacheVariables": { "BOARD": r"${presetName}" }}] |
