How to use CMakePresets with west and sysbuild in NCS v2.7.0?

I was following instructions from this and this post, but I'm not yet able to build with the following combination: CMakePresets.json + west + sysbuild.

I'm using this west command in a nRF Connect command line on v2.7.0:

west build -d ${targetDir} -- --preset ${presetName}

I understood from one of the posts it can't be forced to use sysbuild, but assumed that it would then behave similarly as the option "Build system default" in the vscode extension. However when using west with the preset it just doesn't use sysbuild, but uses the old parent/child approach.

Do you have any tips to get this to work with sysbuild?

Thanks,

Koos

Parents
  • Hi, 

    I'm using this west command in a nRF Connect command line on v2.7.0:

    west build -d ${targetDir} -- --preset ${presetName}

    Add "--sysbuild" into your command as

    west build -d ${targetDir} --sysbuild -- --preset ${presetName}

    See Building with sysbuild documentation.

    Regards,
    Amanda H.

  • Hi Amanda,

    Forgot to mention, but I already tried that, it gives me the following error:

    WARNING: This looks like a fresh build and BOARD is unknown; so it probably won't work. To fix, use --board=<your-board>.
    Note: to silence the above message, run 'west config build.board_warn false'
    -- west build: generating a build system
    CMake Error: Could not read presets from /opt/nordic/ncs/v2.7.0/zephyr/share/sysbuild:
    File not found: /opt/nordic/ncs/v2.7.0/zephyr/share/sysbuild/CMakePresets.json
    FATAL ERROR: command exited with status 1: /opt/homebrew/bin/cmake -DWEST_PYTHON=/opt/nordic/ncs/toolchains/f8037e9b83/opt/[email protected]/bin/python3.9 -B/Users/koos/Documents/projects/***/***_fw/app/build_release_test -GNinja --preset build_***_release -S/opt/nordic/ncs/v2.7.0/zephyr/share/sysbuild -DAPP_DIR:PATH=/Users/koos/Documents/projects/***/***_fw/app

    How did you get that command to work?

    Kind regards,

    Koos

Reply
  • Hi Amanda,

    Forgot to mention, but I already tried that, it gives me the following error:

    WARNING: This looks like a fresh build and BOARD is unknown; so it probably won't work. To fix, use --board=<your-board>.
    Note: to silence the above message, run 'west config build.board_warn false'
    -- west build: generating a build system
    CMake Error: Could not read presets from /opt/nordic/ncs/v2.7.0/zephyr/share/sysbuild:
    File not found: /opt/nordic/ncs/v2.7.0/zephyr/share/sysbuild/CMakePresets.json
    FATAL ERROR: command exited with status 1: /opt/homebrew/bin/cmake -DWEST_PYTHON=/opt/nordic/ncs/toolchains/f8037e9b83/opt/[email protected]/bin/python3.9 -B/Users/koos/Documents/projects/***/***_fw/app/build_release_test -GNinja --preset build_***_release -S/opt/nordic/ncs/v2.7.0/zephyr/share/sysbuild -DAPP_DIR:PATH=/Users/koos/Documents/projects/***/***_fw/app

    How did you get that command to work?

    Kind regards,

    Koos

Children
Related