3.1.1: Sysbuild picks system Python instead of venv Python — impossible to fix from user side

SDK: nRF Connect SDK v3.1.1 (Zephyr 4.1.99)
Build type: Out-of-tree (custom board `goride_centralstationen/nrf9160/ns`, external hw-conf, external modules)
Platform: macOS (Apple Silicon), but affects any OS with a system Python that doesn't allow pip installs

The Problem

Homebrew-installed Python 3.14 is the system `python3`. Per PEP 668, system-wide pip installs are blocked:


python3 -m pip install west
error: externally-managed-environment


Nordic/Zephyr docs instruct users to install west in a Python virtual environment. We have `venv-3.1.1` with Python 3.11 and west 1.5.0. Activating it and running `west build` works for the parent CMake — it finds the venv's Python 3.11 with west.

But sysbuild child images (mcuboot) ignore the venv entirely. They run `find_program("python3")` in a fresh subprocess, which finds the system Python 3.14 — which has no west and cannot have west installed. This causes a cascade failure:

1. `python.cmake` finds system Python 3.14 (no west)
2. `west.cmake` fails to import west from that Python
3. `zephyr_module.cmake:51` — `if(WEST ...)` is false → module discovery skipped
4. `ZEPHYR_NRF_MODULE_DIR` never set
5. `mcuboot/boot/zephyr/Kconfig:12` — `source "$(ZEPHYR_NRF_MODULE_DIR)/..."` fails

There is no user-side fix. The system Python cannot have west (PEP 668). The venv Python is correctly set up. Sysbuild just doesn't propagate it to child images.

Root Cause

`basic_settings.cmake:24-39` loads the sysbuild cache into **CMake target properties**:
```cmake
set_property(TARGET sysbuild_cache PROPERTY "${CMAKE_MATCH_1}" "${variable_value}")
```

`python.cmake:16` reads **CMake variables**:
```cmake
if(NOT DEFINED Python3_EXECUTABLE AND DEFINED WEST_PYTHON)
```

Target properties and CMake variables are separate namespaces. They never meet. The sysbuild cache correctly contains `Python3_EXECUTABLE:FILEPATH=.../venv-3.1.1/bin/python3` but child images never see it — they run `find_program()` fresh and get the system Python.

The `shared_cmake_variables_list` in `sysbuild_extensions.cmake:319` only passes `CMAKE_BUILD_TYPE` and `CMAKE_VERBOSE_MAKEFILE` as `-D` flags to child CMake. Python variables go through the broken target-property mechanism.

Steps to Reproduce

1. macOS with Homebrew Python (any version ≥ 3.12 with PEP 668)
2. Create a venv with an older Python that has west: `python3.11 -m venv venv && source venv/bin/activate && pip install west`
3. Any out-of-tree NCS project with sysbuild (mcuboot enabled): `SB_CONFIG_BOOTLOADER_MCUBOOT=y`
4. Build: `source venv/bin/activate && west build -b <custom-board>`
5. Parent CMake uses venv Python 3.11 (correct). Child mcuboot CMake uses system Python 3.14 (no west). Build fails.

Verified on reference `nrf9160dk/nrf9160/ns` board too — not board-specific.

Workarounds

None that don't involve breaking system package management or patching NCS:

- `--break-system-packages` to force west into system Python — violates PEP 668, Homebrew warns against it
- `brew unlink [email protected] && brew link [email protected] --force` — fragile, `brew upgrade` relinks newer Python
- Patch `basic_settings.cmake` (see below) — works but shouldn't be necessary

Proposed Fix

After line 39 in `zephyr/cmake/modules/basic_settings.cmake`, promote Python variables from target properties to CMake variables so `python.cmake` can see them:

```cmake
if(SYSBUILD)
get_property(_sb_python3 TARGET sysbuild_cache PROPERTY Python3_EXECUTABLE)
if(_sb_python3)
set(Python3_EXECUTABLE "${_sb_python3}")
endif()
get_property(_sb_west_python TARGET sysbuild_cache PROPERTY WEST_PYTHON)
if(_sb_west_python)
set(WEST_PYTHON "${_sb_west_python}")
endif()
get_property(_sb_python TARGET sysbuild_cache PROPERTY PYTHON_EXECUTABLE)
if(_sb_python)
set(PYTHON_EXECUTABLE "${_sb_python}")
endif()
unset(_sb_python3)
unset(_sb_west_python)
unset(_sb_python)
endif()
```

Files

- `zephyr/cmake/modules/basic_settings.cmake` — stores sysbuild cache as target properties (broken)
- `zephyr/cmake/modules/python.cmake:16-44` — reads CMake variables (never sees cache)
- `zephyr/cmake/modules/west.cmake:34-59` — tries `PYTHON_EXECUTABLE -c "import west"`, fails
- `zephyr/cmake/modules/zephyr_module.cmake:51` — `if(WEST OR ZEPHYR_MODULES)` gates module discovery
- `sysbuild_extensions.cmake:319-323` — `shared_cmake_variables_list` (too narrow)
- `mcuboot/boot/zephyr/Kconfig:12` — the failing source line

Related

- github.com/.../70258 — same class of bug, different trigger

Parents
  • Hi,

    First, I can mention that we also provide the toolchain manager for you to install a toolchain, as an alternative solution to what you see here. See nrfutil toolchain-manager for more info on this.

    Then, when I try to set up a venv in python3.11, it builds both images in this python version.

    Steps:

    python3.11 -m venv venv
    source venv/bin/activate
    pip install west
    pip install -r nrf/scripts/requirements.txt
    pip install -r zephyr/scripts/requirements.txt
    pip install -r bootloader/mcuboot/scripts/requirements.txt

    And then the build logs:

    -- west build: generating a build system
    Loading Zephyr module(s) (Zephyr base): sysbuild_default
    -- Found Python3: /home/sihe/nrf_connect_sdk/zephyr/samples/hello_world/venv/bin/python3 (found suitable version "3.11.15", minimum required is "3.10") found components: Interpreter 
    -- Cache files will be written to: /home/sihe/.cache/zephyr
    -- Found west (found suitable version "1.5.0", minimum required is "0.14.0")
    -- Board: nrf52840dk, qualifiers: nrf52840
    Parsing /home/sihe/nrf_connect_sdk/zephyr/share/sysbuild/Kconfig
    Loaded configuration '/home/sihe/nrf_connect_sdk/zephyr/samples/hello_world/build/_sysbuild/empty.conf'
    Merged configuration '/home/sihe/nrf_connect_sdk/zephyr/samples/hello_world/sysbuild.conf'
    Configuration saved to '/home/sihe/nrf_connect_sdk/zephyr/samples/hello_world/build/zephyr/.config'
    Kconfig header saved to '/home/sihe/nrf_connect_sdk/zephyr/samples/hello_world/build/_sysbuild/autoconf.h'
    -- Sysbuild assigned MCUboot image IDs:
       * Application: 0
    -- 
       *****************************
       * Running CMake for mcuboot *
       *****************************
    
    Loading Zephyr default modules (Zephyr base).
    -- Application: /home/sihe/nrf_connect_sdk/bootloader/mcuboot/boot/zephyr
    -- CMake version: 3.28.3
    -- Found Python3: /home/sihe/nrf_connect_sdk/zephyr/samples/hello_world/venv/bin/python3 (found suitable version "3.11.15", minimum required is "3.10") found components: Interpreter 
    -- Cache files will be written to: /home/sihe/.cache/zephyr
    -- Zephyr version: 4.3.99 (/home/sihe/nrf_connect_sdk/zephyr)
    -- Found west (found suitable version "1.5.0", minimum required is "0.14.0")
    -- Board: nrf52840dk, qualifiers: nrf52840
    -- ZEPHYR_TOOLCHAIN_VARIANT not set, trying to locate Zephyr SDK
    -- Found host-tools: zephyr 0.17.4 (/home/sihe/zephyr-sdk-0.17.4)
    -- Found toolchain: zephyr 0.17.4 (/home/sihe/zephyr-sdk-0.17.4)
    -- Found Dtc: /home/sihe/zephyr-sdk-0.17.4/sysroots/x86_64-pokysdk-linux/usr/bin/dtc (found suitable version "1.7.0", minimum required is "1.4.6") 
    -- Found BOARD.dts: /home/sihe/nrf_connect_sdk/zephyr/boards/nordic/nrf52840dk/nrf52840dk_nrf52840.dts
    -- Found devicetree overlay: /home/sihe/nrf_connect_sdk/bootloader/mcuboot/boot/zephyr/app.overlay
    -- Generated zephyr.dts: /home/sihe/nrf_connect_sdk/zephyr/samples/hello_world/build/mcuboot/zephyr/zephyr.dts
    -- Generated pickled edt: /home/sihe/nrf_connect_sdk/zephyr/samples/hello_world/build/mcuboot/zephyr/edt.pickle
    -- Generated devicetree_generated.h: /home/sihe/nrf_connect_sdk/zephyr/samples/hello_world/build/mcuboot/zephyr/include/generated/zephyr/devicetree_generated.h
    Parsing /home/sihe/nrf_connect_sdk/bootloader/mcuboot/boot/zephyr/Kconfig
    Loaded configuration '/home/sihe/nrf_connect_sdk/zephyr/boards/nordic/nrf52840dk/nrf52840dk_nrf52840_defconfig'
    Merged configuration '/home/sihe/nrf_connect_sdk/bootloader/mcuboot/boot/zephyr/prj.conf'
    Merged configuration '/home/sihe/nrf_connect_sdk/bootloader/mcuboot/boot/zephyr/boards/nrf52840dk_nrf52840.conf'
    Merged configuration '/home/sihe/nrf_connect_sdk/zephyr/samples/hello_world/build/mcuboot/zephyr/.config.sysbuild'
    Configuration saved to '/home/sihe/nrf_connect_sdk/zephyr/samples/hello_world/build/mcuboot/zephyr/.config'
    Kconfig header saved to '/home/sihe/nrf_connect_sdk/zephyr/samples/hello_world/build/mcuboot/zephyr/include/generated/zephyr/autoconf.h'
    -- Found GnuLd: /home/sihe/zephyr-sdk-0.17.4/arm-zephyr-eabi/arm-zephyr-eabi/bin/ld.bfd (found version "2.38") 
    -- The C compiler identification is GNU 12.2.0
    -- The CXX compiler identification is GNU 12.2.0
    -- The ASM compiler identification is GNU
    -- Found assembler: /home/sihe/zephyr-sdk-0.17.4/arm-zephyr-eabi/bin/arm-zephyr-eabi-gcc
    CMake Warning at /home/sihe/nrf_connect_sdk/nrf/lib/flash_patch/CMakeLists.txt:8 (message):
      
    
            ----------------------------------------------------------
            --- WARNING: To maintain the integrity of secure boot, ---
            --- enable CONFIG_DISABLE_FLASH_PATCH in production.   ---
            ----------------------------------------------------------
    
    
    -- Using ccache: /usr/bin/ccache
    -- Found gen_kobject_list: /home/sihe/nrf_connect_sdk/zephyr/scripts/build/gen_kobject_list.py
    MCUBoot bootloader key file: /home/sihe/nrf_connect_sdk/bootloader/mcuboot/root-ec-p256.pem
    CMake Warning at CMakeLists.txt:447 (message):
      WARNING: Using default MCUboot signing key file, this file is for debug use
      only and is not secure!
    
    
    -- Configuring done (3.2s)
    -- Generating done (0.0s)
    -- Build files have been written to: /home/sihe/nrf_connect_sdk/zephyr/samples/hello_world/build/mcuboot
    -- 
       *********************************
       * Running CMake for hello_world *
       *********************************
    
    Loading Zephyr default modules (Zephyr base).
    -- Application: /home/sihe/nrf_connect_sdk/zephyr/samples/hello_world
    -- CMake version: 3.28.3
    -- Found Python3: /home/sihe/nrf_connect_sdk/zephyr/samples/hello_world/venv/bin/python3 (found suitable version "3.11.15", minimum required is "3.10") found components: Interpreter 
    -- Cache files will be written to: /home/sihe/.cache/zephyr
    -- Zephyr version: 4.3.99 (/home/sihe/nrf_connect_sdk/zephyr)
    -- Found west (found suitable version "1.5.0", minimum required is "0.14.0")
    -- Board: nrf52840dk, qualifiers: nrf52840
    -- ZEPHYR_TOOLCHAIN_VARIANT not set, trying to locate Zephyr SDK
    -- Found host-tools: zephyr 0.17.4 (/home/sihe/zephyr-sdk-0.17.4)
    -- Found toolchain: zephyr 0.17.4 (/home/sihe/zephyr-sdk-0.17.4)
    -- Found Dtc: /home/sihe/zephyr-sdk-0.17.4/sysroots/x86_64-pokysdk-linux/usr/bin/dtc (found suitable version "1.7.0", minimum required is "1.4.6") 
    -- Found BOARD.dts: /home/sihe/nrf_connect_sdk/zephyr/boards/nordic/nrf52840dk/nrf52840dk_nrf52840.dts
    -- Generated zephyr.dts: /home/sihe/nrf_connect_sdk/zephyr/samples/hello_world/build/hello_world/zephyr/zephyr.dts
    -- Generated pickled edt: /home/sihe/nrf_connect_sdk/zephyr/samples/hello_world/build/hello_world/zephyr/edt.pickle
    -- Generated devicetree_generated.h: /home/sihe/nrf_connect_sdk/zephyr/samples/hello_world/build/hello_world/zephyr/include/generated/zephyr/devicetree_generated.h
    
    warning: UPDATEABLE_IMAGE_NUMBER (defined at
    /home/sihe/nrf_connect_sdk/nrf/modules/../samples/common/mcumgr_bt_ota_dfu/Kconfig:87,
    subsys/dfu/Kconfig:97) was assigned the value '1' but got the value ''. Check these unsatisfied
    dependencies: (((BOARD_THINGY53_NRF5340_CPUAPP || BOARD_THINGY53_NRF5340_CPUAPP_NS) &&
    SOC_SERIES_NRF53 && NCS_SAMPLE_MCUMGR_BT_OTA_DFU) || (!MCUBOOT && IMG_MANAGER)) (=n). See
    http://docs.zephyrproject.org/latest/kconfig.html#CONFIG_UPDATEABLE_IMAGE_NUMBER and/or look up
    UPDATEABLE_IMAGE_NUMBER in the menuconfig/guiconfig interface. The Application Development Primer,
    Setting Configuration Values, and Kconfig - Tips and Best Practices sections of the manual might be
    helpful too.
    
    
    warning: MCUBOOT_UPDATE_FOOTER_SIZE (defined at subsys/dfu/Kconfig:55) was assigned the value
    '0x2000' but got the value ''. Check these unsatisfied dependencies: MCUBOOT_IMG_MANAGER (=n),
    IMG_MANAGER (=n). See
    http://docs.zephyrproject.org/latest/kconfig.html#CONFIG_MCUBOOT_UPDATE_FOOTER_SIZE and/or look up
    MCUBOOT_UPDATE_FOOTER_SIZE in the menuconfig/guiconfig interface. The Application Development
    Primer, Setting Configuration Values, and Kconfig - Tips and Best Practices sections of the manual
    might be helpful too.
    
    Parsing /home/sihe/nrf_connect_sdk/zephyr/Kconfig
    Loaded configuration '/home/sihe/nrf_connect_sdk/zephyr/boards/nordic/nrf52840dk/nrf52840dk_nrf52840_defconfig'
    Merged configuration '/home/sihe/nrf_connect_sdk/zephyr/samples/hello_world/prj.conf'
    Merged configuration '/home/sihe/nrf_connect_sdk/zephyr/samples/hello_world/build/hello_world/zephyr/.config.sysbuild'
    Configuration saved to '/home/sihe/nrf_connect_sdk/zephyr/samples/hello_world/build/hello_world/zephyr/.config'
    Kconfig header saved to '/home/sihe/nrf_connect_sdk/zephyr/samples/hello_world/build/hello_world/zephyr/include/generated/zephyr/autoconf.h'
    -- Found GnuLd: /home/sihe/zephyr-sdk-0.17.4/arm-zephyr-eabi/arm-zephyr-eabi/bin/ld.bfd (found version "2.38") 
    -- The C compiler identification is GNU 12.2.0
    -- The CXX compiler identification is GNU 12.2.0
    -- The ASM compiler identification is GNU
    -- Found assembler: /home/sihe/zephyr-sdk-0.17.4/arm-zephyr-eabi/bin/arm-zephyr-eabi-gcc
    -- Using ccache: /usr/bin/ccache
    -- Found gen_kobject_list: /home/sihe/nrf_connect_sdk/zephyr/scripts/build/gen_kobject_list.py
    -- Including signing script: /home/sihe/nrf_connect_sdk/nrf/cmake/sysbuild/image_signing.cmake
    -- Configuring done (3.1s)
    -- Generating done (0.0s)
    -- Build files have been written to: /home/sihe/nrf_connect_sdk/zephyr/samples/hello_world/build/hello_world
    CMake Warning at /home/sihe/nrf_connect_sdk/nrf/cmake/sysbuild/partition_manager.cmake:119 (message):
      
    
            ---------------------------------------------------------------------
            --- WARNING: Using a bootloader without pm_static.yml.            ---
            --- There are cases where a deployed product can consist of       ---
            --- multiple images, and only a subset of these images can be     ---
            --- upgraded through a firmware update mechanism. In such cases,  ---
            --- the upgradable images must have partitions that are static    ---
            --- and are matching the partition map used by the bootloader     ---
            --- programmed onto the device.                                   ---
            ---------------------------------------------------------------------
            
    
    Call Stack (most recent call first):
      /home/sihe/nrf_connect_sdk/nrf/cmake/sysbuild/partition_manager.cmake:639 (partition_manager)
      /home/sihe/nrf_connect_sdk/nrf/sysbuild/CMakeLists.txt:972 (include)
      cmake/modules/sysbuild_extensions.cmake:808 (nrf_POST_CMAKE)
      cmake/modules/sysbuild_extensions.cmake:808 (cmake_language)
      cmake/modules/sysbuild_images.cmake:46 (sysbuild_module_call)
      cmake/modules/sysbuild_default.cmake:21 (include)
      /home/sihe/nrf_connect_sdk/zephyr/share/zephyr-package/cmake/ZephyrConfig.cmake:75 (include)
      /home/sihe/nrf_connect_sdk/zephyr/share/zephyr-package/cmake/ZephyrConfig.cmake:92 (include_boilerplate)
      /home/sihe/nrf_connect_sdk/zephyr/share/sysbuild-package/cmake/SysbuildConfig.cmake:8 (include)
      template/CMakeLists.txt:10 (find_package)
    
    
    -- Configuring done (8.1s)
    -- Generating done (0.0s)
    -- Build files have been written to: /home/sihe/nrf_connect_sdk/zephyr/samples/hello_world/build
    -- west build: building application
    [9/20] Performing build step for 'mcuboot'
    [1/199] Preparing syscall dependency handling
    
    [8/199] Generating include/generated/zephyr/version.h
    -- Zephyr version: 4.3.99 (/home/sihe/nrf_connect_sdk/zephyr), build: ncs-v3.2.0-rc1-9912-g4b6df5ff11b1
    [199/199] Linking C executable zephyr/zephyr.elf
    Memory region         Used Size  Region Size  %age Used
               FLASH:       32372 B        48 KB     65.86%
                 RAM:       16640 B       256 KB      6.35%
            IDT_LIST:          0 GB        32 KB      0.00%
    Generating files from /home/sihe/nrf_connect_sdk/zephyr/samples/hello_world/build/mcuboot/zephyr/zephyr.elf for board: nrf52840dk/nrf52840
    [11/20] Performing build step for 'hello_world'
    [0/1] Re-running CMake...
    Loading Zephyr default modules (Zephyr base (cached)).
    -- Application: /home/sihe/nrf_connect_sdk/zephyr/samples/hello_world
    -- CMake version: 3.28.3
    -- Cache files will be written to: /home/sihe/.cache/zephyr
    -- Zephyr version: 4.3.99 (/home/sihe/nrf_connect_sdk/zephyr)
    -- Found west (found suitable version "1.5.0", minimum required is "0.14.0")
    -- Board: nrf52840dk, qualifiers: nrf52840
    -- Found host-tools: zephyr 0.17.4 (/home/sihe/zephyr-sdk-0.17.4)
    -- Found toolchain: zephyr 0.17.4 (/home/sihe/zephyr-sdk-0.17.4)
    -- Found BOARD.dts: /home/sihe/nrf_connect_sdk/zephyr/boards/nordic/nrf52840dk/nrf52840dk_nrf52840.dts
    -- Generated zephyr.dts: /home/sihe/nrf_connect_sdk/zephyr/samples/hello_world/build/hello_world/zephyr/zephyr.dts
    -- Generated pickled edt: /home/sihe/nrf_connect_sdk/zephyr/samples/hello_world/build/hello_world/zephyr/edt.pickle
    -- Generated devicetree_generated.h: /home/sihe/nrf_connect_sdk/zephyr/samples/hello_world/build/hello_world/zephyr/include/generated/zephyr/devicetree_generated.h
    Parsing /home/sihe/nrf_connect_sdk/zephyr/Kconfig
    Loaded configuration '/home/sihe/nrf_connect_sdk/zephyr/samples/hello_world/build/hello_world/zephyr/.config'
    Merged configuration '/home/sihe/nrf_connect_sdk/zephyr/samples/hello_world/build/hello_world/zephyr/.config.sysbuild'
    No change to configuration in '/home/sihe/nrf_connect_sdk/zephyr/samples/hello_world/build/hello_world/zephyr/.config'
    No change to Kconfig header in '/home/sihe/nrf_connect_sdk/zephyr/samples/hello_world/build/hello_world/zephyr/include/generated/zephyr/autoconf.h'
    -- Using ccache: /usr/bin/ccache
    -- Found gen_kobject_list: /home/sihe/nrf_connect_sdk/zephyr/scripts/build/gen_kobject_list.py
    -- Including signing script: /home/sihe/nrf_connect_sdk/nrf/cmake/sysbuild/image_signing.cmake
    -- Configuring done (3.0s)
    -- Generating done (0.0s)
    -- Build files have been written to: /home/sihe/nrf_connect_sdk/zephyr/samples/hello_world/build/hello_world
    [1/168] Preparing syscall dependency handling
    
    [6/168] Generating include/generated/zephyr/version.h
    -- Zephyr version: 4.3.99 (/home/sihe/nrf_connect_sdk/zephyr), build: ncs-v3.2.0-rc1-9912-g4b6df5ff11b1
    [168/168] Linking C executable zephyr/zephyr.elf
    Memory region         Used Size  Region Size  %age Used
               FLASH:       23688 B     499200 B      4.75%
                 RAM:        6528 B       256 KB      2.49%
            IDT_LIST:          0 GB        32 KB      0.00%
    Generating files from /home/sihe/nrf_connect_sdk/zephyr/samples/hello_world/build/hello_world/zephyr/zephyr.elf for board: nrf52840dk/nrf52840
    image.py: sign the payload
    image.py: sign the payload
    [20/20] Generating ../merged.hex
    

    And locally on my ubuntu PC, I got

    $ python --version
    Python 3.12.3
    

    Granted, I do test this on ubuntu and mac, but I would at least hope that the venv behaviour should be the same, right?

    Regards,
    Sigurd Hellesvik

Reply
  • Hi,

    First, I can mention that we also provide the toolchain manager for you to install a toolchain, as an alternative solution to what you see here. See nrfutil toolchain-manager for more info on this.

    Then, when I try to set up a venv in python3.11, it builds both images in this python version.

    Steps:

    python3.11 -m venv venv
    source venv/bin/activate
    pip install west
    pip install -r nrf/scripts/requirements.txt
    pip install -r zephyr/scripts/requirements.txt
    pip install -r bootloader/mcuboot/scripts/requirements.txt

    And then the build logs:

    -- west build: generating a build system
    Loading Zephyr module(s) (Zephyr base): sysbuild_default
    -- Found Python3: /home/sihe/nrf_connect_sdk/zephyr/samples/hello_world/venv/bin/python3 (found suitable version "3.11.15", minimum required is "3.10") found components: Interpreter 
    -- Cache files will be written to: /home/sihe/.cache/zephyr
    -- Found west (found suitable version "1.5.0", minimum required is "0.14.0")
    -- Board: nrf52840dk, qualifiers: nrf52840
    Parsing /home/sihe/nrf_connect_sdk/zephyr/share/sysbuild/Kconfig
    Loaded configuration '/home/sihe/nrf_connect_sdk/zephyr/samples/hello_world/build/_sysbuild/empty.conf'
    Merged configuration '/home/sihe/nrf_connect_sdk/zephyr/samples/hello_world/sysbuild.conf'
    Configuration saved to '/home/sihe/nrf_connect_sdk/zephyr/samples/hello_world/build/zephyr/.config'
    Kconfig header saved to '/home/sihe/nrf_connect_sdk/zephyr/samples/hello_world/build/_sysbuild/autoconf.h'
    -- Sysbuild assigned MCUboot image IDs:
       * Application: 0
    -- 
       *****************************
       * Running CMake for mcuboot *
       *****************************
    
    Loading Zephyr default modules (Zephyr base).
    -- Application: /home/sihe/nrf_connect_sdk/bootloader/mcuboot/boot/zephyr
    -- CMake version: 3.28.3
    -- Found Python3: /home/sihe/nrf_connect_sdk/zephyr/samples/hello_world/venv/bin/python3 (found suitable version "3.11.15", minimum required is "3.10") found components: Interpreter 
    -- Cache files will be written to: /home/sihe/.cache/zephyr
    -- Zephyr version: 4.3.99 (/home/sihe/nrf_connect_sdk/zephyr)
    -- Found west (found suitable version "1.5.0", minimum required is "0.14.0")
    -- Board: nrf52840dk, qualifiers: nrf52840
    -- ZEPHYR_TOOLCHAIN_VARIANT not set, trying to locate Zephyr SDK
    -- Found host-tools: zephyr 0.17.4 (/home/sihe/zephyr-sdk-0.17.4)
    -- Found toolchain: zephyr 0.17.4 (/home/sihe/zephyr-sdk-0.17.4)
    -- Found Dtc: /home/sihe/zephyr-sdk-0.17.4/sysroots/x86_64-pokysdk-linux/usr/bin/dtc (found suitable version "1.7.0", minimum required is "1.4.6") 
    -- Found BOARD.dts: /home/sihe/nrf_connect_sdk/zephyr/boards/nordic/nrf52840dk/nrf52840dk_nrf52840.dts
    -- Found devicetree overlay: /home/sihe/nrf_connect_sdk/bootloader/mcuboot/boot/zephyr/app.overlay
    -- Generated zephyr.dts: /home/sihe/nrf_connect_sdk/zephyr/samples/hello_world/build/mcuboot/zephyr/zephyr.dts
    -- Generated pickled edt: /home/sihe/nrf_connect_sdk/zephyr/samples/hello_world/build/mcuboot/zephyr/edt.pickle
    -- Generated devicetree_generated.h: /home/sihe/nrf_connect_sdk/zephyr/samples/hello_world/build/mcuboot/zephyr/include/generated/zephyr/devicetree_generated.h
    Parsing /home/sihe/nrf_connect_sdk/bootloader/mcuboot/boot/zephyr/Kconfig
    Loaded configuration '/home/sihe/nrf_connect_sdk/zephyr/boards/nordic/nrf52840dk/nrf52840dk_nrf52840_defconfig'
    Merged configuration '/home/sihe/nrf_connect_sdk/bootloader/mcuboot/boot/zephyr/prj.conf'
    Merged configuration '/home/sihe/nrf_connect_sdk/bootloader/mcuboot/boot/zephyr/boards/nrf52840dk_nrf52840.conf'
    Merged configuration '/home/sihe/nrf_connect_sdk/zephyr/samples/hello_world/build/mcuboot/zephyr/.config.sysbuild'
    Configuration saved to '/home/sihe/nrf_connect_sdk/zephyr/samples/hello_world/build/mcuboot/zephyr/.config'
    Kconfig header saved to '/home/sihe/nrf_connect_sdk/zephyr/samples/hello_world/build/mcuboot/zephyr/include/generated/zephyr/autoconf.h'
    -- Found GnuLd: /home/sihe/zephyr-sdk-0.17.4/arm-zephyr-eabi/arm-zephyr-eabi/bin/ld.bfd (found version "2.38") 
    -- The C compiler identification is GNU 12.2.0
    -- The CXX compiler identification is GNU 12.2.0
    -- The ASM compiler identification is GNU
    -- Found assembler: /home/sihe/zephyr-sdk-0.17.4/arm-zephyr-eabi/bin/arm-zephyr-eabi-gcc
    CMake Warning at /home/sihe/nrf_connect_sdk/nrf/lib/flash_patch/CMakeLists.txt:8 (message):
      
    
            ----------------------------------------------------------
            --- WARNING: To maintain the integrity of secure boot, ---
            --- enable CONFIG_DISABLE_FLASH_PATCH in production.   ---
            ----------------------------------------------------------
    
    
    -- Using ccache: /usr/bin/ccache
    -- Found gen_kobject_list: /home/sihe/nrf_connect_sdk/zephyr/scripts/build/gen_kobject_list.py
    MCUBoot bootloader key file: /home/sihe/nrf_connect_sdk/bootloader/mcuboot/root-ec-p256.pem
    CMake Warning at CMakeLists.txt:447 (message):
      WARNING: Using default MCUboot signing key file, this file is for debug use
      only and is not secure!
    
    
    -- Configuring done (3.2s)
    -- Generating done (0.0s)
    -- Build files have been written to: /home/sihe/nrf_connect_sdk/zephyr/samples/hello_world/build/mcuboot
    -- 
       *********************************
       * Running CMake for hello_world *
       *********************************
    
    Loading Zephyr default modules (Zephyr base).
    -- Application: /home/sihe/nrf_connect_sdk/zephyr/samples/hello_world
    -- CMake version: 3.28.3
    -- Found Python3: /home/sihe/nrf_connect_sdk/zephyr/samples/hello_world/venv/bin/python3 (found suitable version "3.11.15", minimum required is "3.10") found components: Interpreter 
    -- Cache files will be written to: /home/sihe/.cache/zephyr
    -- Zephyr version: 4.3.99 (/home/sihe/nrf_connect_sdk/zephyr)
    -- Found west (found suitable version "1.5.0", minimum required is "0.14.0")
    -- Board: nrf52840dk, qualifiers: nrf52840
    -- ZEPHYR_TOOLCHAIN_VARIANT not set, trying to locate Zephyr SDK
    -- Found host-tools: zephyr 0.17.4 (/home/sihe/zephyr-sdk-0.17.4)
    -- Found toolchain: zephyr 0.17.4 (/home/sihe/zephyr-sdk-0.17.4)
    -- Found Dtc: /home/sihe/zephyr-sdk-0.17.4/sysroots/x86_64-pokysdk-linux/usr/bin/dtc (found suitable version "1.7.0", minimum required is "1.4.6") 
    -- Found BOARD.dts: /home/sihe/nrf_connect_sdk/zephyr/boards/nordic/nrf52840dk/nrf52840dk_nrf52840.dts
    -- Generated zephyr.dts: /home/sihe/nrf_connect_sdk/zephyr/samples/hello_world/build/hello_world/zephyr/zephyr.dts
    -- Generated pickled edt: /home/sihe/nrf_connect_sdk/zephyr/samples/hello_world/build/hello_world/zephyr/edt.pickle
    -- Generated devicetree_generated.h: /home/sihe/nrf_connect_sdk/zephyr/samples/hello_world/build/hello_world/zephyr/include/generated/zephyr/devicetree_generated.h
    
    warning: UPDATEABLE_IMAGE_NUMBER (defined at
    /home/sihe/nrf_connect_sdk/nrf/modules/../samples/common/mcumgr_bt_ota_dfu/Kconfig:87,
    subsys/dfu/Kconfig:97) was assigned the value '1' but got the value ''. Check these unsatisfied
    dependencies: (((BOARD_THINGY53_NRF5340_CPUAPP || BOARD_THINGY53_NRF5340_CPUAPP_NS) &&
    SOC_SERIES_NRF53 && NCS_SAMPLE_MCUMGR_BT_OTA_DFU) || (!MCUBOOT && IMG_MANAGER)) (=n). See
    http://docs.zephyrproject.org/latest/kconfig.html#CONFIG_UPDATEABLE_IMAGE_NUMBER and/or look up
    UPDATEABLE_IMAGE_NUMBER in the menuconfig/guiconfig interface. The Application Development Primer,
    Setting Configuration Values, and Kconfig - Tips and Best Practices sections of the manual might be
    helpful too.
    
    
    warning: MCUBOOT_UPDATE_FOOTER_SIZE (defined at subsys/dfu/Kconfig:55) was assigned the value
    '0x2000' but got the value ''. Check these unsatisfied dependencies: MCUBOOT_IMG_MANAGER (=n),
    IMG_MANAGER (=n). See
    http://docs.zephyrproject.org/latest/kconfig.html#CONFIG_MCUBOOT_UPDATE_FOOTER_SIZE and/or look up
    MCUBOOT_UPDATE_FOOTER_SIZE in the menuconfig/guiconfig interface. The Application Development
    Primer, Setting Configuration Values, and Kconfig - Tips and Best Practices sections of the manual
    might be helpful too.
    
    Parsing /home/sihe/nrf_connect_sdk/zephyr/Kconfig
    Loaded configuration '/home/sihe/nrf_connect_sdk/zephyr/boards/nordic/nrf52840dk/nrf52840dk_nrf52840_defconfig'
    Merged configuration '/home/sihe/nrf_connect_sdk/zephyr/samples/hello_world/prj.conf'
    Merged configuration '/home/sihe/nrf_connect_sdk/zephyr/samples/hello_world/build/hello_world/zephyr/.config.sysbuild'
    Configuration saved to '/home/sihe/nrf_connect_sdk/zephyr/samples/hello_world/build/hello_world/zephyr/.config'
    Kconfig header saved to '/home/sihe/nrf_connect_sdk/zephyr/samples/hello_world/build/hello_world/zephyr/include/generated/zephyr/autoconf.h'
    -- Found GnuLd: /home/sihe/zephyr-sdk-0.17.4/arm-zephyr-eabi/arm-zephyr-eabi/bin/ld.bfd (found version "2.38") 
    -- The C compiler identification is GNU 12.2.0
    -- The CXX compiler identification is GNU 12.2.0
    -- The ASM compiler identification is GNU
    -- Found assembler: /home/sihe/zephyr-sdk-0.17.4/arm-zephyr-eabi/bin/arm-zephyr-eabi-gcc
    -- Using ccache: /usr/bin/ccache
    -- Found gen_kobject_list: /home/sihe/nrf_connect_sdk/zephyr/scripts/build/gen_kobject_list.py
    -- Including signing script: /home/sihe/nrf_connect_sdk/nrf/cmake/sysbuild/image_signing.cmake
    -- Configuring done (3.1s)
    -- Generating done (0.0s)
    -- Build files have been written to: /home/sihe/nrf_connect_sdk/zephyr/samples/hello_world/build/hello_world
    CMake Warning at /home/sihe/nrf_connect_sdk/nrf/cmake/sysbuild/partition_manager.cmake:119 (message):
      
    
            ---------------------------------------------------------------------
            --- WARNING: Using a bootloader without pm_static.yml.            ---
            --- There are cases where a deployed product can consist of       ---
            --- multiple images, and only a subset of these images can be     ---
            --- upgraded through a firmware update mechanism. In such cases,  ---
            --- the upgradable images must have partitions that are static    ---
            --- and are matching the partition map used by the bootloader     ---
            --- programmed onto the device.                                   ---
            ---------------------------------------------------------------------
            
    
    Call Stack (most recent call first):
      /home/sihe/nrf_connect_sdk/nrf/cmake/sysbuild/partition_manager.cmake:639 (partition_manager)
      /home/sihe/nrf_connect_sdk/nrf/sysbuild/CMakeLists.txt:972 (include)
      cmake/modules/sysbuild_extensions.cmake:808 (nrf_POST_CMAKE)
      cmake/modules/sysbuild_extensions.cmake:808 (cmake_language)
      cmake/modules/sysbuild_images.cmake:46 (sysbuild_module_call)
      cmake/modules/sysbuild_default.cmake:21 (include)
      /home/sihe/nrf_connect_sdk/zephyr/share/zephyr-package/cmake/ZephyrConfig.cmake:75 (include)
      /home/sihe/nrf_connect_sdk/zephyr/share/zephyr-package/cmake/ZephyrConfig.cmake:92 (include_boilerplate)
      /home/sihe/nrf_connect_sdk/zephyr/share/sysbuild-package/cmake/SysbuildConfig.cmake:8 (include)
      template/CMakeLists.txt:10 (find_package)
    
    
    -- Configuring done (8.1s)
    -- Generating done (0.0s)
    -- Build files have been written to: /home/sihe/nrf_connect_sdk/zephyr/samples/hello_world/build
    -- west build: building application
    [9/20] Performing build step for 'mcuboot'
    [1/199] Preparing syscall dependency handling
    
    [8/199] Generating include/generated/zephyr/version.h
    -- Zephyr version: 4.3.99 (/home/sihe/nrf_connect_sdk/zephyr), build: ncs-v3.2.0-rc1-9912-g4b6df5ff11b1
    [199/199] Linking C executable zephyr/zephyr.elf
    Memory region         Used Size  Region Size  %age Used
               FLASH:       32372 B        48 KB     65.86%
                 RAM:       16640 B       256 KB      6.35%
            IDT_LIST:          0 GB        32 KB      0.00%
    Generating files from /home/sihe/nrf_connect_sdk/zephyr/samples/hello_world/build/mcuboot/zephyr/zephyr.elf for board: nrf52840dk/nrf52840
    [11/20] Performing build step for 'hello_world'
    [0/1] Re-running CMake...
    Loading Zephyr default modules (Zephyr base (cached)).
    -- Application: /home/sihe/nrf_connect_sdk/zephyr/samples/hello_world
    -- CMake version: 3.28.3
    -- Cache files will be written to: /home/sihe/.cache/zephyr
    -- Zephyr version: 4.3.99 (/home/sihe/nrf_connect_sdk/zephyr)
    -- Found west (found suitable version "1.5.0", minimum required is "0.14.0")
    -- Board: nrf52840dk, qualifiers: nrf52840
    -- Found host-tools: zephyr 0.17.4 (/home/sihe/zephyr-sdk-0.17.4)
    -- Found toolchain: zephyr 0.17.4 (/home/sihe/zephyr-sdk-0.17.4)
    -- Found BOARD.dts: /home/sihe/nrf_connect_sdk/zephyr/boards/nordic/nrf52840dk/nrf52840dk_nrf52840.dts
    -- Generated zephyr.dts: /home/sihe/nrf_connect_sdk/zephyr/samples/hello_world/build/hello_world/zephyr/zephyr.dts
    -- Generated pickled edt: /home/sihe/nrf_connect_sdk/zephyr/samples/hello_world/build/hello_world/zephyr/edt.pickle
    -- Generated devicetree_generated.h: /home/sihe/nrf_connect_sdk/zephyr/samples/hello_world/build/hello_world/zephyr/include/generated/zephyr/devicetree_generated.h
    Parsing /home/sihe/nrf_connect_sdk/zephyr/Kconfig
    Loaded configuration '/home/sihe/nrf_connect_sdk/zephyr/samples/hello_world/build/hello_world/zephyr/.config'
    Merged configuration '/home/sihe/nrf_connect_sdk/zephyr/samples/hello_world/build/hello_world/zephyr/.config.sysbuild'
    No change to configuration in '/home/sihe/nrf_connect_sdk/zephyr/samples/hello_world/build/hello_world/zephyr/.config'
    No change to Kconfig header in '/home/sihe/nrf_connect_sdk/zephyr/samples/hello_world/build/hello_world/zephyr/include/generated/zephyr/autoconf.h'
    -- Using ccache: /usr/bin/ccache
    -- Found gen_kobject_list: /home/sihe/nrf_connect_sdk/zephyr/scripts/build/gen_kobject_list.py
    -- Including signing script: /home/sihe/nrf_connect_sdk/nrf/cmake/sysbuild/image_signing.cmake
    -- Configuring done (3.0s)
    -- Generating done (0.0s)
    -- Build files have been written to: /home/sihe/nrf_connect_sdk/zephyr/samples/hello_world/build/hello_world
    [1/168] Preparing syscall dependency handling
    
    [6/168] Generating include/generated/zephyr/version.h
    -- Zephyr version: 4.3.99 (/home/sihe/nrf_connect_sdk/zephyr), build: ncs-v3.2.0-rc1-9912-g4b6df5ff11b1
    [168/168] Linking C executable zephyr/zephyr.elf
    Memory region         Used Size  Region Size  %age Used
               FLASH:       23688 B     499200 B      4.75%
                 RAM:        6528 B       256 KB      2.49%
            IDT_LIST:          0 GB        32 KB      0.00%
    Generating files from /home/sihe/nrf_connect_sdk/zephyr/samples/hello_world/build/hello_world/zephyr/zephyr.elf for board: nrf52840dk/nrf52840
    image.py: sign the payload
    image.py: sign the payload
    [20/20] Generating ../merged.hex
    

    And locally on my ubuntu PC, I got

    $ python --version
    Python 3.12.3
    

    Granted, I do test this on ubuntu and mac, but I would at least hope that the venv behaviour should be the same, right?

    Regards,
    Sigurd Hellesvik

Children
No Data
Related