VSCode Pristine Build changes from sysbuild to no sysbuild on generate failure

Hello,

There is a minor issue identifying a sysbuild configuration if the initial generate and build fails.

Steps to repro:

- add a kconfig that doesn't exist in your prj.conf

- click "add configuration" ensure you select Sysbuild, generate and build, and then let it go till it fails

- click "pristine build" and watch that it doesn't detect that it's a sysbuild

I attached some sanitized logs showing the error.

Even if the kconfig error is fixed, it doesn't use sysbuild.

Geoff

Building application
west build --build-dir <build_dir> <app_source> --pristine --board demo/nrf54l15/cpuapp -- -DCONFIG_DEBUG_OPTIMIZATIONS=y -DCONFIG_DEBUG_THREAD_INFO=y -DEXTRA_CONF_FILE="prj_debug.conf" -DDEBUG_THREAD_INFO=On -DCONFIG_HARDWARE_REVISION=2 -Dapplication_DEBUG_THREAD_INFO=On -Dmcuboot_DEBUG_THREAD_INFO=Off

-- west build: generating a build system
Loading Zephyr module(s) (Zephyr base): sysbuild_default
-- Found Python3: /opt/nordic/ncs/toolchains/561dce9adf/opt/[email protected]/bin/python3.12 (found suitable version "3.12.4", minimum required is "3.10") found components: Interpreter 
-- Cache files will be written to: /Users/<user>/Library/Caches/zephyr
-- Found west (found suitable version "1.4.0", minimum required is "0.14.0")


... build stuff removed ...


-- Configuring incomplete, errors occurred!
See also "<build_dir>/CMakeFiles/CMakeOutput.log".
FATAL ERROR: command exited with status 1: /opt/nordic/ncs/toolchains/561dce9adf/bin/cmake -DWEST_PYTHON=/opt/nordic/ncs/toolchains/561dce9adf/opt/[email protected]/bin/python3.12 -B<build_dir> -GNinja -DBOARD=demo/nrf54l15/cpuapp -DCONFIG_DEBUG_OPTIMIZATIONS=y -DCONFIG_DEBUG_THREAD_INFO=y -DEXTRA_CONF_FILE=prj_debug.conf -DDEBUG_THREAD_INFO=On -DCONFIG_HARDWARE_REVISION=2 -Dapplication_DEBUG_THREAD_INFO=On -Dmcuboot_DEBUG_THREAD_INFO=Off -S<west_workspace>/zephyr/share/sysbuild -DAPP_DIR:PATH=<app_source>

 *  The terminal process terminated with exit code: 1. 
 *  Terminal will be reused by tasks, press any key to close it. 

Building application
west build --build-dir <build_dir> <app_source> --pristine --board demo/nrf54l15/cpuapp --no-sysbuild -- -DEXTRA_CONF_FILE="prj_debug.conf" -DDEBUG_THREAD_INFO=On -DCONFIG_DEBUG_OPTIMIZATIONS=y -DCONFIG_DEBUG_THREAD_INFO=y -DCONFIG_HARDWARE_REVISION=2 -Dapplication_DEBUG_THREAD_INFO=Off -Dmcuboot_DEBUG_THREAD_INFO=Off

-- west build: generating a build system
Loading Zephyr default modules (Zephyr base).
-- Application: <app_source>
-- CMake version: 3.21.0
-- Found Python3: /opt/nordic/ncs/toolchains/561dce9adf/opt/[email protected]/bin/python3.12 (found suitable version "3.12.4", minimum required is "3.10") found components: Interpreter 
-- Cache files will be written to: /Users/<user>/Library/Caches/zephyr
-- Zephyr version: 4.2.99 (<west_workspace>/zephyr)
-- Found west (found suitable version "1.4.0", minimum required is "0.14.0")



... build stuff removed ...



-- Configuring incomplete, errors occurred!
FATAL ERROR: command exited with status 1: /opt/nordic/ncs/toolchains/561dce9adf/bin/cmake -DWEST_PYTHON=/opt/nordic/ncs/toolchains/561dce9adf/opt/[email protected]/bin/python3.12 -B<build_dir> -GNinja -DBOARD=demo/nrf54l15/cpuapp -DEXTRA_CONF_FILE=prj_debug.conf -DDEBUG_THREAD_INFO=On -DCONFIG_DEBUG_OPTIMIZATIONS=y -DCONFIG_DEBUG_THREAD_INFO=y -DCONFIG_HARDWARE_REVISION=2 -Dapplication_DEBUG_THREAD_INFO=Off -Dmcuboot_DEBUG_THREAD_INFO=Off -S<app_source>

 *  The terminal process terminated with exit code: 1. 
 *  Terminal will be reused by tasks, press any key to close it. 

Parents
  • Check and compare the actually used build dirs.

    VS code looves to compile the app (sub) project instead of the main sysbuild depending on which build folder was selected. Extremely annoying on the NRF5340 which always has at least the net core in the sysbuild active - you can't flash the partly build project onto the MCU properly, it usually crashes in Ozone.

    The west flash command does not have this problem usually - but takes forever compared to flashing via Ozone.

Reply
  • Check and compare the actually used build dirs.

    VS code looves to compile the app (sub) project instead of the main sysbuild depending on which build folder was selected. Extremely annoying on the NRF5340 which always has at least the net core in the sysbuild active - you can't flash the partly build project onto the MCU properly, it usually crashes in Ozone.

    The west flash command does not have this problem usually - but takes forever compared to flashing via Ozone.

Children
  • Hey!

    This is selecting the build (so the whole config) and not an individual one. We have the app and mcuboot.

    It only happens on first generation if there is a build error, so it's just a bug in detection given not all of the config is generated due to the error.

    Just a weird issue I saw that caused me pain while trying to figure out mcuboot params.

    If there is no error in the config, and the first generation completes successfully, then there is no issue.

    Geoff

Related