Trouble migrating from NCS 2.6 to 2.8

Due to issues with the wifi stack, I have to move my project from 2.6 to 2.8.

I downloaded the new tools set (toolchains\cf2149caf2) and new nordic connect version 2.8.0 as per

https://docs.nordicsemi.com/bundle/ncs-latest/page/nrf/installation/updating.html

I read the migration guides for 2.7 and 2.8, and the 'using sysbuild for multi-image builds guides:

https://docs.nordicsemi.com/bundle/ncs-latest/page/zephyr/build/sysbuild/index.html#sysbuild

https://docs.nordicsemi.com/bundle/ncs-latest/page/nrf/releases_and_maturity/migration/migration_sysbuild.html

https://docs.nordicsemi.com/bundle/ncs-latest/page/nrf/releases_and_maturity/migration/migration_guide_2.8.html

Mostly this gave me a headache.

I created sysbuild.conf (at the root where I run west - is this right?), and filled in the stuff from the migration guides for mcuboot and nrf70 support.
# MCU boot config now handled by sysbuild
SB_CONFIG_BOOTLOADER_MCUBOOT=y
SB_CONFIG_MCUBOOT_BOOTLOADER_MODE_SWAP_WITHOUT_SCRATCH=y
SB_CONFIG_MCUBOOT_GENERATE_UNSIGNED_IMAGE=y

SB_CONFIG_NETCORE_HCI_IPC=y
SB_CONFIG_NETCORE_APP_UPDATE=y
SB_CONFIG_BOOT_SIGNATURE_TYPE_ECDSA_P256=y
SB_CONFIG_BOOT_SIGNATURE_KEY_FILE="/work/dev/if-device-nrf53/keys/bootloader_priv-ecdsa256.pem"
#CONFIG_MCUBOOT_SIGNATURE_KEY_FILE="/work/dev/if-device-nrf53/keys/bootloader_priv-ecdsa256.pem"

SB_CONFIG_MCUBOOT_BOOTLOADER_MODE_SWAP_WITHOUT_SCRATCH=y

# nrf7002 firmware handled by sysbuild
SB_CONFIG_WIFI_NRF70=y
SB_CONFIG_WIFI_NRF70_SYSTEM_MODE=y
#SB_CONFIG_WIFI_PATCHES_EXT_FLASH_XIP=y     later

# build of dfu packages
SB_CONFIG_DFU_MULTI_IMAGE_PACKAGE_BUILD=y
SB_CONFIG_DFU_MULTI_IMAGE_PACKAGE_APP=y
SB_CONFIG_DFU_MULTI_IMAGE_PACKAGE_NET=y
SB_CONFIG_DFU_MULTI_IMAGE_PACKAGE_WIFI_FW_PATCH=y

SB_CONFIG_DFU_ZIP=y
SB_CONFIG_DFU_ZIP_APP=y
SB_CONFIG_DFU_ZIP_NET=y
SB_CONFIG_DFU_ZIP_WIFI_FW_PATCH=y

# put slot2 in external flash
SB_CONFIG_PARTITION_MANAGER=y
SB_CONFIG_PM_MCUBOOT_PAD=y
SB_CONFIG_PM_EXTERNAL_FLASH_MCUBOOT_SECONDARY=y
I updated my prj.conf for the changes to nrf70 config option names
I created sysbuild/mcuboot and copied in the prj.conf from the previous child_image/mcuboot.conf
There was already a sysbuild/hci_ipc/prj.conf, I updated it with changes I had made to child_image/hci_ipc.conf 

Then I set west to use my board and sysbuild and try to build:

> west config build.board cc1medv1_nrf5340_cpuapp
> west config build.sysbuild True
> west build --build-dir cc1-med/build cc1-med --board cc1medv1_nrf5340_cpuapp --pristine -DBOARD_ROOT=%CD%
This got me cmake failing.
-- west build: making build dir C:\work\dev\if-device-nrf53\cc1-med\build pristine
-- west build: generating a build system
Loading Zephyr module(s) (Zephyr base): sysbuild_default
-- Found Python3: C:/ncs/toolchains/2d382dcd92/opt/bin/python.exe (found suitable version "3.12.4", minimum required is "3.8") found components: Interpreter
-- Cache files will be written to: C:/ncs/v2.8.0/zephyr/.cache
-- Found west (found suitable version "1.2.0", minimum required is "0.14.0")
-- Board: cc1medv1_nrf5340_cpuapp
Parsing C:/work/dev/if-device-nrf53/cc1-med/Kconfig.sysbuild
Loaded configuration 'C:/work/dev/if-device-nrf53/cc1-med/build/_sysbuild/empty.conf'
Merged configuration 'C:/work/dev/if-device-nrf53/cc1-med/build/_sysbuild/empty.conf'
Configuration saved to 'C:/work/dev/if-device-nrf53/cc1-med/build/zephyr/.config'
Kconfig header saved to 'C:/work/dev/if-device-nrf53/cc1-med/build/_sysbuild/autoconf.h'
CMake Error at C:/ncs/v2.8.0/nrf/sysbuild/CMakeLists.txt:117 (list):
  list GET given empty list
Call Stack (most recent call first):
  cmake/modules/sysbuild_extensions.cmake:583 (nrf_PRE_CMAKE)
  cmake/modules/sysbuild_extensions.cmake:583 (cmake_language)
  cmake/modules/sysbuild_images.cmake:16 (sysbuild_module_call)
  cmake/modules/sysbuild_default.cmake:20 (include)
  C:/ncs/v2.8.0/zephyr/share/zephyr-package/cmake/ZephyrConfig.cmake:75 (include)
  C:/ncs/v2.8.0/zephyr/share/zephyr-package/cmake/ZephyrConfig.cmake:92 (include_boilerplate)
  C:/ncs/v2.8.0/zephyr/share/sysbuild-package/cmake/SysbuildConfig.cmake:8 (include)
  template/CMakeLists.txt:10 (find_package)


--
   *****************************
   * Running CMake for cc1-med *
   *****************************

Loading Zephyr default modules (Zephyr base).
-- Application: C:/work/dev/if-device-nrf53/cc1-med
-- CMake version: 3.21.0
-- Using NCS Toolchain 2.8.20241106.194216054162 for building. (C:/ncs/toolchains/2d382dcd92/cmake)
-- Found Python3: C:/ncs/toolchains/2d382dcd92/opt/bin/python.exe (found suitable version "3.12.4", minimum required is "3.8") found components: Interpreter
-- Cache files will be written to: C:/ncs/v2.8.0/zephyr/.cache
-- Zephyr version: 3.7.99 (C:/ncs/v2.8.0/zephyr)
-- Found west (found suitable version "1.2.0", minimum required is "0.14.0")
-- Board: cc1medv1_nrf5340_cpuapp
-- Found host-tools: zephyr 0.16.8 (C:/ncs/toolchains/2d382dcd92/opt/zephyr-sdk)
-- Found toolchain: zephyr 0.16.8 (C:/ncs/toolchains/2d382dcd92/opt/zephyr-sdk)
-- Found Dtc: C:/ncs/toolchains/2d382dcd92/opt/bin/dtc.exe (found suitable version "1.4.7", minimum required is "1.4.6")

-- Found BOARD.dts: C:/work/dev/if-device-nrf53/boards/arm/cc1medv1_nrf5340/cc1medv1_nrf5340_cpuapp.dts
'label' is marked as deprecated in 'properties:' in C:/ncs/v2.8.0/zephyr/dts/bindings\audio\nordic,nrf-pdm.yaml for node /soc/peripheral@50000000/pdm@26000.
devicetree error: gpio controller <Node /soc/peripheral@50000000/i2c@9000/mcp23017@20 in 'C:/ncs/v2.8.0/zephyr/misc/empty_file.c'> for <Node /soc/peripheral@50000000/pdm@26000/en in 'C:/ncs/v2.8.0/zephyr/misc/empty_file.c'> lacks binding
CMake Error at C:/ncs/v2.8.0/zephyr/cmake/modules/dts.cmake:295 (execute_process):
  execute_process failed command indexes:

    1: "Child return code: 1"

Call Stack (most recent call first):
  C:/ncs/v2.8.0/zephyr/cmake/modules/zephyr_default.cmake:133 (include)
  C:/ncs/v2.8.0/zephyr/share/zephyr-package/cmake/ZephyrConfig.cmake:66 (include)
  C:/ncs/v2.8.0/zep-- Configuring incomplete, errors occurred!
hyr/share/zephyr-package/cmake/ZephyrConfig.cmake:92 (include_boilerplate)
  CMakeLists.txt:8 (find_package)


CMake Error at cmake/modules/sysbuild_extensions.cmake:514 (message):
  CMake configure failed for Zephyr project: cc1-med

  Location: C:/work/dev/if-device-nrf53/cc1-med
Call Stack (most recent call first):
  cmake/modules/sysbuild_images.cmake:20 (ExternalZephyrProject_Cmake)
  cmake/modules/sysbuild_default.cmake:20 (include)
  C:/ncs/v2.8.0/zephyr/share/zephyr-package/cmake/ZephyrConfig.cmake:75 (include)
  C:/ncs/v2.8.0/zephyr/share/zephyr-package/cmake/ZephyrConfig.cmake:92 (include_boilerplate)
  C:/ncs/v2.8.0/zephyr/share/sysbuild-package/cmake/SysbuildConfig.cmake:8 (include)
  template/CMakeLists.txt:10 (find_package)


-- Configuring incomplete, errors occurred!
See also "C:/work/dev/if-device-nrf53/cc1-med/build/CMakeFiles/CMakeOutput.log".
←[91mFATAL ERROR: command exited with status 1: 'C:\ncs\toolchains\2d382dcd92\opt\bin\cmake.EXE' -DWEST_PYTHON=C:/ncs/toolchains/2d382dcd92/opt/bin/python.exe '-BC:\work\dev\if-device-nrf53\cc1-med\build' -GNinja -DBOARD=cc1medv1_nrf5340_cpuapp '-DBOARD_ROOT=C:\work\dev\if-device-nrf53' '-SC:\ncs\v2.8.0\zephyr\share\sysbuild' '-DAPP_DIR:PATH=C:\work\dev\if-device-nrf53\cc1-med'
The DTS also seems to now fail (didn't with 2.6) with:
devicetree error: gpio controller <Node /soc/peripheral@50000000/i2c@9000/mcp23017@20 in 'C:/ncs/v2.8.0/zephyr/misc/empty_file.c'> for <Node /soc/peripheral@50000000/pdm@26000/en in 'C:/ncs/v2.8.0/zephyr/misc/empty_file.c'> lacks binding
 
Now I'm stuck....I'll look at the DTS thing tomorrow... I think I already knew that the DTS stuff had changed 2.6 to 2.8... but the migration guide doesn't reference it as far as I can see?
Parents
  • 1st error: sysbuild.conf goes int he build target sub directory.

    This generates many kconfig errors:

    -  the DFU building part is now complex... remove for later

    - the option noted int he migration guide SB_CONFIG_PM_MCUBOOT_PAD requires a hex value - but no explanation of what this option is for that I can find (both the nordic site and zephyr search options find no responses...). set to 0x200 as a likely value

    - option SB_CONFIG_MCUBOOT_BOOTLOADER_MODE_SWAP_WITHOUT_SCRATCH=y as noted in the migration guide is rejected as unknown

    - and the option SB_CONFIG_NETCORE_HCI_IPC gets a warning, with a handy link that leads to a search page... that doesn't find that option..

    And again, the CMake fails with a useless error that doesn't give any indication of what is causing the issue....

    -- west build: making build dir C:\work\dev\if-device-nrf53\cc1-med\build pristine
    -- west build: generating a build system
    Loading Zephyr module(s) (Zephyr base): sysbuild_default
    -- Found Python3: C:/ncs/toolchains/2d382dcd92/opt/bin/python.exe (found suitable version "3.12.4", minimum required is "3.8") found components: Interpreter
    -- Cache files will be written to: C:/ncs/v2.8.0/zephyr/.cache
    -- Found west (found suitable version "1.2.0", minimum required is "0.14.0")
    -- Board: cc1medv1_nrf5340_cpuapp

    warning: The choice symbol NETCORE_HCI_IPC (defined at
    C:/ncs/v2.8.0/nrf/sysbuild\Kconfig.netcore:90) was selected (set =y), but no symbol ended up as the
    choice selection. See docs.zephyrproject.org/.../kconfig.html
    and/or look up NETCORE_HCI_IPC 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 C:/work/dev/if-device-nrf53/cc1-med/Kconfig.sysbuild
    Loaded configuration 'C:/work/dev/if-device-nrf53/cc1-med/build/_sysbuild/empty.conf'
    Merged configuration 'C:/work/dev/if-device-nrf53/cc1-med/sysbuild.conf'
    Configuration saved to 'C:/work/dev/if-device-nrf53/cc1-med/build/zephyr/.config'
    Kconfig header saved to 'C:/work/dev/if-device-nrf53/cc1-med/build/_sysbuild/autoconf.h'
    CMake Error at C:/ncs/v2.8.0/nrf/sysbuild/CMakeLists.txt:117 (list):
    list GET given empty list
    Call Stack (most recent call first):
    cmake/modules/sysbuild_extensions.cmake:583 (nrf_PRE_CMAKE)
    cmake/modules/sysbuild_extensions.cmake:583 (cmake_language)
    cmake/modules/sysbuild_images.cmake:16 (sysbuild_module_call)
    cmake/modules/sysbuild_default.cmake:20 (include)
    C:/ncs/v2.8.0/zephyr/share/zephyr-package/cmake/ZephyrConfig.cmake:75 (include)
    C:/ncs/v2.8.0/zephyr/share/zephyr-package/cmake/ZephyrConfig.cmake:92 (include_boilerplate)
    C:/ncs/v2.8.0/zephyr/share/sysbuild-package/cmake/SysbuildConfig.cmake:8 (include)
    template/CMakeLists.txt:10 (find_package)

    What is missing?

  • I tried to build the wifi 'sta' sample (copied from the ncs 2.8.0 tree). This fails with the same errors...

    C:\work\dev\if-device-nrf53>west build --build-dir wifi_sta_28/build wifi_sta_28 --board cc1medv1_nrf5340_cpuapp --pristine -DBOARD_ROOT=%CD%
    -- west build: making build dir C:\work\dev\if-device-nrf53\wifi_sta_28\build pristine
    -- west build: generating a build system
    Loading Zephyr module(s) (Zephyr base): sysbuild_default
    -- Found Python3: C:/ncs/toolchains/2d382dcd92/opt/bin/python.exe (found suitable version "3.12.4", minimum required is "3.8") found components: Interpreter
    -- Cache files will be written to: C:/ncs/v2.8.0/zephyr/.cache
    -- Found west (found suitable version "1.2.0", minimum required is "0.14.0")
    -- Board: cc1medv1_nrf5340_cpuapp
    Parsing C:/ncs/v2.8.0/zephyr/share/sysbuild/Kconfig
    Loaded configuration 'C:/work/dev/if-device-nrf53/wifi_sta_28/build/_sysbuild/empty.conf'
    Merged configuration 'C:/work/dev/if-device-nrf53/wifi_sta_28/sysbuild.conf'
    Configuration saved to 'C:/work/dev/if-device-nrf53/wifi_sta_28/build/zephyr/.config'
    Kconfig header saved to 'C:/work/dev/if-device-nrf53/wifi_sta_28/build/_sysbuild/autoconf.h'
    CMake Error at C:/ncs/v2.8.0/nrf/sysbuild/CMakeLists.txt:117 (list):
    list GET given empty list
    Call Stack (most recent call first):
    cmake/modules/sysbuild_extensions.cmake:583 (nrf_PRE_CMAKE)
    cmake/modules/sysbuild_extensions.cmake:583 (cmake_language)
    cmake/modules/sysbuild_images.cmake:16 (sysbuild_module_call)
    cmake/modules/sysbuild_default.cmake:20 (include)
    C:/ncs/v2.8.0/zephyr/share/zephyr-package/cmake/ZephyrConfig.cmake:75 (include)
    C:/ncs/v2.8.0/zephyr/share/zephyr-package/cmake/ZephyrConfig.cmake:92 (include_boilerplate)
    C:/ncs/v2.8.0/zephyr/share/sysbuild-package/cmake/SysbuildConfig.cmake:8 (include)
    template/CMakeLists.txt:10 (find_package)

    What is not correctly installed here?

  • This error is caused by my board not being migrated to HWMv2 (despite the migration guide here https://docs.nordicsemi.com/bundle/ncs-latest/page/nrf/releases_and_maturity/migration/migration_hwmv2.html explicitly stating that OOT boards do not need to be migrated....)

    Once the board is fixed up  to HWMv2, and the build command references the board as board/soc/variant instead of borad_soc_variant (thanks a lot for a meaningless change...) the 'sta' sample gets a lot further (it now has dependances on LEDs in the DTS it seems)

    I also had to update my MCP23017 DTS reference to be compatible="microchip,mcp23017" instead of mcp23xxx to let the DTS compile (why? don't know) for this error:

    devicetree error: gpio controller <Node /soc/peripheral@50000000/i2c@9000/mcp23017@20 in 'C:/ncs/v2.8.0/zephyr/misc/empty_file.c'> for <Node /soc/peripheral@50000000/pdm@26000/en in 'C:/ncs/v2.8.0/zephyr/misc/empty_file.c'> lacks binding

    Now its:
        ioexp0: mcp23017@20 {
            status = "okay";
            compatible = "microchip,mcp23017";
            reg = < 0x20 >;
            gpio-controller;
            ngpios = < 16 >;
            #gpio-cells = < 2 >;
            int-gpios = <&gpio1 15 GPIO_ACTIVE_LOW>;        // P1.15 interupt from ioexpander
        };
    in case anyone else gets stuck at this one...
    My application build is still broken, due to 'KConfig warnings'. Pity it doesnt say which ones:


    warning: BOOT_USB_DFU_WAIT_DELAY_MS (defined at
    C:/ncs/v2.8.0/bootloader/mcuboot/boot/zephyr/Kconfig:759) was assigned the value '5000' but got the
    value ''. Check these unsatisfied dependencies: BOOT_USB_DFU_WAIT (=n). See
    docs.zephyrproject.org/.../kconfig.html and/or look up
    BOOT_USB_DFU_WAIT_DELAY_MS 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: BOOT_SERIAL_WAIT_FOR_DFU_TIMEOUT (defined at
    C:/ncs/v2.8.0/bootloader/mcuboot/boot/zephyr\Kconfig.serial_recovery:160) was assigned the value
    '5000' but got the value ''. Check these unsatisfied dependencies: BOOT_SERIAL_WAIT_FOR_DFU (=n),
    MCUBOOT_SERIAL (=n). See
    docs.zephyrproject.org/.../kconfig.html and/or
    look up BOOT_SERIAL_WAIT_FOR_DFU_TIMEOUT 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: USB_DEVICE_PRODUCT (defined at C:/ncs/v2.8.0/bootloader/mcuboot/boot/zephyr/Kconfig:1014,
    subsys/usb/device/Kconfig:37) was assigned the value 'Infrafon CC2-WDD' but got the value 'MCUBOOT'.
    See docs.zephyrproject.org/.../kconfig.html and/or look up
    USB_DEVICE_PRODUCT 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: BOOTLOADER_MCUBOOT (defined at C:/ncs/v2.8.0/nrf/modules/trusted-
    firmware-m\Kconfig.tfm.defconfig:90, modules/Kconfig.mcuboot:13) was assigned the value 'y' but got
    the value 'n'. Check these unsatisfied dependencies: (BUILD_WITH_TFM || !MCUBOOT) (=n). See
    docs.zephyrproject.org/.../kconfig.html and/or look up
    BOOTLOADER_MCUBOOT 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: LOG_BACKEND_UART (defined at subsys/logging\backends\Kconfig.uart:4) was assigned the value
    'y' but got the value 'n'. Check these unsatisfied dependencies: (!LOG_MODE_MINIMAL) (=n). See
    docs.zephyrproject.org/.../kconfig.html and/or look up
    LOG_BACKEND_UART in the menuconfig/guiconfig interface. The Application Development Primer, Setting
    Configuration Values, and Kconfig - Tips and Best PracticesParsing C:/ncs/v2.8.0/bootloader/mcuboot/boot/zephyr/Kconfig
    sections of the manual might be helpful
    too.


    warning: USB_DEVICE_VID (defined at subsys/usb/device/Kconfig:19) was assigned the value '0x16D0'
    but got the value ''. Check these unsatisfied dependencies: USB_DEVICE_STACK (=n). See
    docs.zephyrproject.org/.../kconfig.html and/or look up
    USB_DEVICE_VID 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: USB_DEVICE_PID (defined at subsys/usb/device/Kconfig:25) was assigned the value '0x138F'
    but got the value ''. Check these unsatisfied dependencies: USB_DEVICE_STACK (=n). See
    docs.zephyrproject.org/.../kconfig.html and/or look up
    USB_DEVICE_PID 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.


    waLoaded configuration 'C:/work/dev/if-device-nrf53/boards/infrafon/cc2v1/cc2v1_nrf5340_cpuapp_defconfig'
    Merged configuration 'C:/work/dev/if-device-nrf53/cc1-med/sysbuild/mcuboot/prj.conf'
    Merged configuration 'C:/ncs/v2.8.0/nrf/subsys/partition_manager/ext_flash_mcuboot_secondary.conf'
    Merged configuration 'C:/work/dev/if-device-nrf53/cc1-med/build/mcuboot/zephyr/.config.sysbuild'
    rning: The choice symbol MCUBOOT_BOOTLOADER_MODE_SWAP_WITHOUT_SCRATCH (defined at
    modules/Kconfig.mcuboot:164) was selected (set =y), but no symbol ended up as the choice selection.
    See docs.zephyrproject.org/.../kconfig.html
    RATCH and/or look up MCUBOOT_BOOTLOADER_MODE_SWAP_WITHOUT_SCRATCH 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: The choice symbol USB_DRIVER_LOG_LEVEL_ERR (defined at
    subsys/logging/Kconfig.template.log_config:11) was selected (set =y), but no symbol ended up as the
    choice selection. See
    docs.zephyrproject.org/.../kconfig.html and/or look up
    USB_DRIVER_LOG_LEVEL_ERR 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: FLASH_MAP (defined at subsys/storage/flash_map/Kconfig:10) has direct dependencies FLASH_HAS_DRIVER_ENABLED with value n, but is currently being y-selected by the following symbols:
    - MCUBOOT_DEVICE_SETTINGS (defined at C:/ncs/v2.8.0/bootloader/mcuboot/boot/zephyr/Kconfig:977), with value y, direct dependencies y (value: y)

    error: Aborting due to Kconfig warnings
  • The kconfig warning that causes trhe mcuboot build to fail is for kconfig setting that are NOT in my sysbuid/mcuboot/prj.conf file :

    Parsing C:/ncs/v2.8.0/bootloader/mcuboot/boot/zephyr/Kconfig
    warning: FLASH_MAP (defined at subsys/storage/flash_map/Kconfig:10) has direct dependencies FLASH_HAS_DRIVER_ENABLED with value n, but is currently being y-selected by the following symbols:
     - MCUBOOT_DEVICE_SETTINGS (defined at C:/ncs/v2.8.0/bootloader/mcuboot/boot/zephyr/Kconfig:977), with value y, direct dependencies y (value: y)Loaded configuration 'C:/work/dev/if-device-nrf53/boards/infrafon/cc2v1/cc2v1_nrf5340_cpuapp_defconfig'
    Merged configuration 'C:/work/dev/if-device-nrf53/cc1-med/sysbuild/mcuboot/prj.conf'
    Merged configuration 'C:/ncs/v2.8.0/nrf/subsys/partition_manager/ext_flash_mcuboot_secondary.conf'
    Merged configuration 'C:/work/dev/if-device-nrf53/cc1-med/build/mcuboot/zephyr/.config.sysbuild'
    
    
    error: Aborting due to Kconfig warnings
    
    CMake Error at C:/ncs/v2.8.0/zephyr/cmake/modules/kconfig.cmake:396 (message):
      command failed with return code: 1
    Call Stack (most recent call first):
      C:/ncs/v2.8.0/nrf/cmake/modules/kconfig.cmake:29 (include)
      C:/ncs/v2.8.0/zephyr/cmake/modules/zephyr_default.cmake:133 (include)
      C:/ncs/v2.8.0/zephyr/share/zephyr-package/cmake/ZephyrConfig.cmake:66 (include)
      C:/ncs/v2.8.0/zephyr/share/zephyr-package/cmake/ZephyrConfig.cmake:92 (include_boilerplate)
      CMakeLists.txt:12 (find_package)
    
    -- Configuring incomplete, errors occurred!
    
    CMake Error at cmake/modules/sysbuild_extensions.cmake:514 (message):
      CMake configure failed for Zephyr project: mcuboot
    

    How can I fix this?

Reply
  • The kconfig warning that causes trhe mcuboot build to fail is for kconfig setting that are NOT in my sysbuid/mcuboot/prj.conf file :

    Parsing C:/ncs/v2.8.0/bootloader/mcuboot/boot/zephyr/Kconfig
    warning: FLASH_MAP (defined at subsys/storage/flash_map/Kconfig:10) has direct dependencies FLASH_HAS_DRIVER_ENABLED with value n, but is currently being y-selected by the following symbols:
     - MCUBOOT_DEVICE_SETTINGS (defined at C:/ncs/v2.8.0/bootloader/mcuboot/boot/zephyr/Kconfig:977), with value y, direct dependencies y (value: y)Loaded configuration 'C:/work/dev/if-device-nrf53/boards/infrafon/cc2v1/cc2v1_nrf5340_cpuapp_defconfig'
    Merged configuration 'C:/work/dev/if-device-nrf53/cc1-med/sysbuild/mcuboot/prj.conf'
    Merged configuration 'C:/ncs/v2.8.0/nrf/subsys/partition_manager/ext_flash_mcuboot_secondary.conf'
    Merged configuration 'C:/work/dev/if-device-nrf53/cc1-med/build/mcuboot/zephyr/.config.sysbuild'
    
    
    error: Aborting due to Kconfig warnings
    
    CMake Error at C:/ncs/v2.8.0/zephyr/cmake/modules/kconfig.cmake:396 (message):
      command failed with return code: 1
    Call Stack (most recent call first):
      C:/ncs/v2.8.0/nrf/cmake/modules/kconfig.cmake:29 (include)
      C:/ncs/v2.8.0/zephyr/cmake/modules/zephyr_default.cmake:133 (include)
      C:/ncs/v2.8.0/zephyr/share/zephyr-package/cmake/ZephyrConfig.cmake:66 (include)
      C:/ncs/v2.8.0/zephyr/share/zephyr-package/cmake/ZephyrConfig.cmake:92 (include_boilerplate)
      CMakeLists.txt:12 (find_package)
    
    -- Configuring incomplete, errors occurred!
    
    CMake Error at cmake/modules/sysbuild_extensions.cmake:514 (message):
      CMake configure failed for Zephyr project: mcuboot
    

    How can I fix this?

Children
  • Hi,

    I see you've started looking into this quite a bit since yesterday, but I'll start with breaking down the abstraction layer a bit w.r.t sysbuild and the change from using parent/child images. This level of understanding is most likely where you're already at, but I'm doing it to ensure we're on the same page.

    In nRF Connect SDK we've previously used the child and parent-image system to manage multi-image builds such as for instance the nRF5340 which has both an image for the application core, for the network core (hci_rpmsg) and in most cases an image for a bootloader (mcuboot). To match what is used in Zephyr, the migration to sysbuild was done and thus in turn deprecating child and parent images in favour of companion images instead. I.e it is as good as the same, but different to comply with the norm in the Zephyr RTOS.

    What you previously had within <your_project>/child_images/mcuboot.conf is now present within <your_project>/sysbuild/mcuboot.conf as shown in this sample: https://github.com/nrfconnect/sdk-zephyr/tree/main/samples/sysbuild/with_mcuboot/sysbuild and what you had in prj.conf that is related to adding multi-images is now within sysbuild.conf.

    I created sysbuild.conf (at the root where I run west - is this right?),

    Yes, this is correct. The second big thing is as you mention sysbuild.conf. Since the build system is changed to use sysbuild, it's now sysbuild that manages your multiple images, and it is within sysbuild.conf you need to add configurations to enable said additional images (such as MCUboot through SB_CONFIG_BOOTLOADER_MCUBOOT=y).

    The third big thing that has happened is the migration from hardware model 1 to hardware model 2 (which you've referred to), and the third big thing is the sysbuild.conf

    Next to your work from today:

    It's a bit hard to separate build logs from questions, could you edit the 3 earliest replies to use "insert -> code" insert for whats from the build log and the rest outside?

    BrianW said:
    How can I fix this?

    Do you have SB_CONFIG_BOOTLOADER_MCUBOOT=y within sysbuild.conf or is it just within sysbuild/mcuboot.conf?

    Kind regards,
    Andreas

  • Hi Andreas

    Ok. Lets start with the migration to HWMv2. I have managed to rename/update my board files so that doing west boards can see the board, and that it manages to do the dtc part.

    I have 3 issues I think here:

    1/ warnings about depreciated labels

    -- Found BOARD.dts: C:/work/dev/if-device-nrf53/boards/infrafon/cc2v1/cc2v1_nrf5340_cpuapp.dts
    'label' is marked as deprecated in 'properties:' in C:/ncs/v2.8.0/zephyr/dts/bindings\audio\nordic,nrf-pdm.yaml for node /soc/peripheral@50000000/pdm@26000.
    'label' is marked as deprecated in 'properties:' in C:/ncs/v2.8.0/zephyr/dts/bindings\i2s\nordic,nrf-i2s.yaml for node /soc/peripheral@50000000/i2s@28000.

    I can ignore these, yes?

    2/ a more serious looking warning, but related (as far as I can tell) to dts definitions in the SDK

    -- Including generated dts.cmake file: C:/work/dev/if-device-nrf53/cc1-med/build/mcuboot/zephyr/dts.cmake
    CMake Warning at C:/ncs/v2.8.0/zephyr/cmake/modules/dts.cmake:389 (message):
      dtc raised one or more warnings:
    
      <stdout>: Warning (avoid_unnecessary_addr_size):
      /soc/peripheral@50000000/i2s@28000: unnecessary #address-cells/#size-cells
      without "ranges" or child "reg" property
    
    Call Stack (most recent call first):
      C:/ncs/v2.8.0/zephyr/cmake/modules/zephyr_default.cmake:133 (include)
      C:/ncs/v2.8.0/zephyr/share/zephyr-package/cmake/ZephyrConfig.cmake:66 (include)
      C:/ncs/v2.8.0/zephyr/share/zephyr-package/cmake/ZephyrConfig.cmake:92 (include_boilerplate)
      CMakeLists.txt:12 (find_package)
    
    

    The dtsi file that defines the i2s reg and address-cells for the controller is in the SDK: file zephyr/dts/arm/noridc/nrf5340_cpuapp_peripherals.dtsi :

    i2s0: i2s@28000 {
        compatible = "nordic,nrf-i2s";
        #address-cells = <1>;
        #size-cells = <0>;
        reg = <0x28000 0x1000>;
        interrupts = <40 NRF_DEFAULT_IRQ_PRIORITY>;
        status = "disabled";
    };
     
    My dts just enables it and adds pinctrl definition, as well as a gpio used for the sdmode of the amp.
    &i2s0 {          
        status = "okay";
        compatible = "nordic,nrf-i2s";
        label="I2S audio out MAX98357A";
        pinctrl-0 = <&i2s0_default>;
        pinctrl-1 = <&i2s0_sleep>;
        pinctrl-names = "default", "sleep";
        i2s_sdmode: sdmode {
            compatible = "nordic,gpio-pins";
            gpios = <&gpio1 14 GPIO_ACTIVE_HIGH>;        // P1.14
        };
    };
    Is there a way for me to 'correct' the warning for the base definition?
    3/ enabling the PDM driver 
    My DTS has the PDM defined as:
    &pdm0 {          
        status = "okay";
        compatible = "nordic,nrf-pdm";
        label="PDM micro in";
        pinctrl-0 = <&pdm0_default>;
        pinctrl-1 = <&pdm0_sleep>;
        pinctrl-names = "default", "sleep";
        pdm_en: en {
            compatible = "nordic,gpio-pins";
            gpios = <&ioexp0 12 GPIO_ACTIVE_HIGH>;        // GPB.04
        };
    };
    This doesn't cause an issue for the dtc, but I saw a problem for KConfig which didn't like having CONFIG_NRFX_PDM=y (which was ok for v2.6). Do I need to evolve something in the dts to allow me to define the CONFIG to include the PDM driver?
    btw, I updated the nrf7002/wifi bits of the DTS, and it now accepts that the DTS has a valid wifi DT to let the wifi stuff in prj.conf be accepted.
    thanks
     
  • Now for sysbuild with mcuboot. btw, if I build without sysbuild (build.sysbuild=False), then the KConfig part gives some warnings buit gets further. With sysbuild, it breaks at the KConfig checking stage.

    What you previously had within <your_project>/child_images/mcuboot.conf is now present within <your_project>/sysbuild/mcuboot.conf

    Ok, I see the example has the file called mcuboot.conf, however if I name it that then I get:

    CMake Error at C:/ncs/v2.8.0/zephyr/cmake/modules/extensions.cmake:2861 (message):
      No prj.conf file(s) was found in the
      C:/work/dev/if-device-nrf53/cc1-med/sysbuild/mcuboot folder(s), please read
      the Zephyr documentation on application development.

    So I will name it prj.conf.

    Do you have SB_CONFIG_BOOTLOADER_MCUBOOT=y within sysbuild.conf or is it just within sysbuild/mcuboot.conf?

    In sysbuild.conf : 

    # MCU boot config now handled by sysbuild
    SB_CONFIG_BOOTLOADER_MCUBOOT=y
    #SB_CONFIG_MCUBOOT_BOOTLOADER_MODE_SWAP_WITHOUT_SCRATCH=y
    #SB_CONFIG_MCUBOOT_GENERATE_UNSIGNED_IMAGE=y
    
    SB_CONFIG_NETCORE_HCI_IPC=y
    #SB_CONFIG_NETCORE_APP_UPDATE=y
    SB_CONFIG_BOOT_SIGNATURE_TYPE_ECDSA_P256=y
    SB_CONFIG_BOOT_SIGNATURE_KEY_FILE="/work/dev/if-device-nrf53/keys/bootloader_priv-ecdsa256.pem"
    #CONFIG_MCUBOOT_SIGNATURE_KEY_FILE="/work/dev/if-device-nrf53/keys/bootloader_priv-ecdsa256.pem"
    
    # nrf7002 firmware handled by sysbuild
    SB_CONFIG_WIFI_NRF70=y
    SB_CONFIG_WIFI_NRF70_SYSTEM_MODE=y
    
    # todo get dfu packaging to work
    #SB_CONFIG_WIFI_PATCHES_EXT_FLASH_XIP=y
    
    # build of dfu packages
    #SB_CONFIG_SUPPORT_NETCORE=y
    #SB_CONFIG_SECURE_BOOT=y
    #SB_CONFIG_SECURE_BOOT_NETCORE=y
    
    #SB_CONFIG_DFU_MULTI_IMAGE_PACKAGE_BUILD=y
    #SB_CONFIG_DFU_MULTI_IMAGE_PACKAGE_APP=y
    #SB_CONFIG_DFU_MULTI_IMAGE_PACKAGE_NET=y
    #SB_CONFIG_DFU_MULTI_IMAGE_PACKAGE_WIFI_FW_PATCH=y
    
    #SB_CONFIG_DFU_ZIP=y
    #SB_CONFIG_DFU_ZIP_APP=y
    #SB_CONFIG_DFU_ZIP_NET=y
    #SB_CONFIG_DFU_ZIP_WIFI_FW_PATCH=y
    
    # put slot2 in external flash
    SB_CONFIG_PARTITION_MANAGER=y
    SB_CONFIG_PM_MCUBOOT_PAD=0x200
    SB_CONFIG_PM_EXTERNAL_FLASH_MCUBOOT_SECONDARY=y
    

    And my sysbuild/mcuboot/prj.conf:

    # mcuboot serial recovery makes image too big for flash space... TODO find more space
    CONFIG_MCUBOOT_SERIAL=n
    CONFIG_BOOT_SERIAL_CDC_ACM=n
    # Enable wait for DFU functionality at boot? 
    CONFIG_BOOT_SERIAL_WAIT_FOR_DFU=n
    #CONFIG_BOOT_SERIAL_WAIT_FOR_DFU_TIMEOUT=5000
    
    # DFU directly as special USB device? - nO, this required winusb zadig driver which then broke usb FS mounting...
    CONFIG_BOOT_USB_DFU_WAIT=n
    #CONFIG_BOOT_USB_DFU_WAIT_DELAY_MS=5000
    #CONFIG_USB_DEVICE_STACK=y
    #CONFIG_USB_DEVICE_PRODUCT="Infrafon CC2-WDD"
    # USB VID is MCS electronics, who sell individual PIDs. 0x138F is for CC2 purchases 25/08/2024
    #CONFIG_USB_DEVICE_VID=0x16D0
    #CONFIG_USB_DEVICE_PID=0x138F
    #CONFIG_USB_DRIVER_LOG_LEVEL_ERR=y
    
    CONFIG_BOOT_MAX_IMG_SECTORS=256
    CONFIG_FPROTECT=n
    
    # now handled by sysbuild
    #CONFIG_BOOTLOADER_MCUBOOT=y
    #CONFIG_BOOT_SIGNATURE_TYPE_ECDSA_P256=y
    #CONFIG_BOOT_SIGNATURE_KEY_FILE="/work/dev/if-device-nrf53/keys/bootloader_priv-ecdsa256.pem"
    #CONFIG_MCUBOOT_SIGNATURE_KEY_FILE="/work/dev/if-device-nrf53/keys/bootloader_priv-ecdsa256.pem"
    
    CONFIG_MCUBOOT_BOOTLOADER_MODE_SWAP_WITHOUT_SCRATCH=y
    CONFIG_MCUBOOT_SHELL=n
    
    CONFIG_DEBUG_COREDUMP=n
    CONFIG_DEBUG_COREDUMP_BACKEND_LOGGING=n
    CONFIG_DEBUG_COREDUMP_MEMORY_DUMP_MIN=n
    
    # Use minimal C library instead of the Picolib
    CONFIG_MINIMAL_LIBC=y
    
    CONFIG_DEBUG=n
    CONFIG_DEBUG_INFO=n
    # all functions in seperate sections so linker can discard unused code
    CONFIG_COMPILER_OPT="-Os"
    # -fdata-sections -ffunction-sections -Wl,--gc-sections -Wl,--strip-all"
    CONFIG_THREAD_NAME=n
    CONFIG_THREAD_ANALYZER=n
    CONFIG_THREAD_ANALYZER_USE_PRINTK=n
    CONFIG_THREAD_ANALYZER_AUTO=n
    CONFIG_SYS_HEAP_RUNTIME_STATS=n
    CONFIG_INIT_STACKS=n
    CONFIG_ASSERT=n
    CONFIG_ASSERT_VERBOSE=n
    CONFIG_ASSERT_NO_MSG_INFO=y
    CONFIG_ASSERT_NO_COND_INFO=y
    CONFIG_ASSERT_NO_FILE_INFO=y
    CONFIG_STACK_SENTINEL=n
    CONFIG_RESET_ON_FATAL_ERROR=y
    CONFIG_REBOOT=y
    
    # turn off serial and uart console to save space (later)
    CONFIG_CONSOLE=y
    CONFIG_CONSOLE_HANDLER=n
    CONFIG_SERIAL=y
    CONFIG_UART_CONSOLE=y
    CONFIG_STDOUT_CONSOLE=y
    
    # turn off log to save image size
    CONFIG_LOG=y
    CONFIG_LOG_MODE_MINIMAL=y
    CONFIG_LOG_MODE_IMMEDIATE=n
    #CONFIG_LOG_BACKEND_UART=y
    CONFIG_LOG_DEFAULT_LEVEL=3
    CONFIG_LOG_PRINTK=n
    CONFIG_SHELL=n
    CONFIG_SHELL_MINIMAL=n
    CONFIG_SHELL_LOG_BACKEND=n
    
    CONFIG_GPIO=n
    CONFIG_GPIO_MCP230XX=n
    
    CONFIG_USE_SEGGER_RTT=n
    CONFIG_I2C=n
    CONFIG_SPI=n
    
    CONFIG_BOOT_BANNER=n
    #CONFIG_TIMESLICING=n
    #CONFIG_MULTITHREADING=n
    CONFIG_TICKLESS_KERNEL=n
    CONFIG_TIMEOUT_64BIT=n
    CONFIG_NRF_ENABLE_ICACHE=n
    

    This stops "due to Kconfig warnings":

    -- west build: making build dir C:\work\dev\if-device-nrf53\cc1-med\build pristine
    -- west build: generating a build system
    Loading Zephyr module(s) (Zephyr base): sysbuild_default
    -- Found Python3: C:/ncs/toolchains/2d382dcd92/opt/bin/python.exe (found suitable version "3.12.4", minimum required is "3.8") found components: Interpreter
    -- Cache files will be written to: C:/ncs/v2.8.0/zephyr/.cache
    -- Found west (found suitable version "1.2.0", minimum required is "0.14.0")
    -- Board: cc2v1, qualifiers: nrf5340/cpuapp
    Parsing C:/work/dev/if-device-nrf53/cc1-med/Kconfig.sysbuild
    Loaded configuration 'C:/work/dev/if-device-nrf53/cc1-med/build/_sysbuild/empty.conf'
    Merged configuration 'C:/work/dev/if-device-nrf53/cc1-med/sysbuild.conf'
    Configuration saved to 'C:/work/dev/if-device-nrf53/cc1-med/build/zephyr/.config'
    Kconfig header saved to 'C:/work/dev/if-device-nrf53/cc1-med/build/_sysbuild/autoconf.h'
    --
       *****************************
       * Running CMake for mcuboot *
       *****************************
    
    Loading Zephyr default modules (Zephyr base).
    -- Application: C:/ncs/v2.8.0/bootloader/mcuboot/boot/zephyr
    -- CMake version: 3.21.0
    -- Using NCS Toolchain 2.8.20241106.194216054162 for building. (C:/ncs/toolchains/2d382dcd92/cmake)
    -- Found Python3: C:/ncs/toolchains/2d382dcd92/opt/bin/python.exe (found suitable version "3.12.4", minimum required is "3.8") found components: Interpreter
    -- Cache files will be written to: C:/ncs/v2.8.0/zephyr/.cache
    -- Zephyr version: 3.7.99 (C:/ncs/v2.8.0/zephyr)
    -- Found west (found suitable version "1.2.0", minimum required is "0.14.0")
    -- Board: cc2v1, qualifiers: nrf5340/cpuapp
    -- Found host-tools: zephyr 0.16.8 (C:/ncs/toolchains/2d382dcd92/opt/zephyr-sdk)
    -- Found toolchain: zephyr 0.16.8 (C:/ncs/toolchains/2d382dcd92/opt/zephyr-sdk)
    -- Found Dtc: C:/ncs/toolchains/2d382dcd92/opt/bin/dtc.exe (found suitable version "1.4.7", minimum required is "1.4.6")
    
    -- Found BOARD.dts: C:/work/dev/if-device-nrf53/boards/infrafon/cc2v1/cc2v1_nrf5340_cpuapp.dts
    'label' is marked as deprecated in 'properties:' in C:/ncs/v2.8.0/zephyr/dts/bindings\audio\nordic,nrf-pdm.yaml for node /soc/peripheral@50000000/pdm@26000.
    'label' is marked as deprecated in 'properties:' in C:/ncs/v2.8.0/zephyr/dts/bindings\i2s\nordic,nrf-i2s.yaml for node /soc/peripheral@50000000/i2s@28000.
    -- Generated zephyr.dts: C:/work/dev/if-device-nrf53/cc1-med/build/mcuboot/zephyr/zephyr.dts
    -- Generated devicetree_generated.h: C:/work/dev/if-device-nrf53/cc1-med/build/mcuboot/zephyr/include/generated/zephyr/devicetree_generated.h
    -- Including generated dts.cmake file: C:/work/dev/if-device-nrf53/cc1-med/build/mcuboot/zephyr/dts.cmake
    CMake Warning at C:/ncs/v2.8.0/zephyr/cmake/modules/dts.cmake:389 (message):
      dtc raised one or more warnings:
    
      <stdout>: Warning (avoid_unnecessary_addr_size):
      /soc/peripheral@50000000/i2s@28000: unnecessary #address-cells/#size-cells
      without "ranges" or child "reg" property
    
    Call Stack (most recent call first):
      C:/ncs/v2.8.0/zephyr/cmake/modules/zephyr_default.cmake:133 (include)
      C:/ncs/v2.8.0/zephyr/share/zephyr-package/cmake/ZephyrConfig.cmake:66 (include)
      C:/ncs/v2.8.0/zephyr/share/zephyr-package/cmake/ZephyrConfig.cmake:92 (include_boilerplate)
      CMakeLists.txt:12 (find_package)
    
    
    
    warning: The choice symbol MCUBOOT_BOOTLOADER_MODE_SWAP_WITHOUT_SCRATCH (defined at
    modules/Kconfig.mcuboot:164) was selected (set =y), but no symbol ended up as the choice selection.
    See http://docs.zephyrproject.org/latest/kconfig.html#CONFIG_MCUBOOT_BOOTLOADER_MODE_SWAP_WITHOUT_SC
    RATCH and/or look up MCUBOOT_BOOTLOADER_MODE_SWAP_WITHOUT_SCRATCH 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 C:/ncs/v2.8.0/bootloader/mcuboot/boot/zephyr/Kconfig
    warning: FLASH_MAP (defined at subsys/storage/flash_map/Kconfig:10) has direct dependencies FLASH_HAS_DRIVER_ENABLED with value n, but is currently being y-selected by the following symbols:
     - MCUBOOT_DEVICE_SETTINGS (defined at C:/ncs/v2.8.0/bootloader/mcuboot/boot/zephyr/Kconfig:977), with value y, direct dependencies y (value: y)Loaded configuration 'C:/work/dev/if-device-nrf53/boards/infrafon/cc2v1/cc2v1_nrf5340_cpuapp_defconfig'
    Merged configuration 'C:/work/dev/if-device-nrf53/cc1-med/sysbuild/mcuboot/prj.conf'
    Merged configuration 'C:/ncs/v2.8.0/nrf/subsys/partition_manager/ext_flash_mcuboot_secondary.conf'
    Merged configuration 'C:/work/dev/if-device-nrf53/cc1-med/build/mcuboot/zephyr/.config.sysbuild'
    
    
    error: Aborting due to Kconfig warnings
    
    CMake Error at C:/ncs/v2.8.0/zephyr/cmake/modules/kconfig.cmake:396 (message):
      command failed with return code: 1
    Call Stack (most recent call first):
      C:/ncs/v2.8.0/nrf/cmake/modules/kconfig.cmake:29 (include)
      C:/ncs/v2.8.0/zephyr/cmake/modules/zephyr_default.cmake:133 (include)
      C:/ncs/v2.8.0/zephyr/share/zephyr-package/cmake/ZephyrConfig.cmake:66 (include)
      C:/ncs/v2.8.0/zephyr/share/zephyr-package/cmake/ZephyrConfig.cmake:92 (include_boilerplate)
      CMakeLists.txt:12 (find_package)
    
    
    -- Configuring incomplete, errors occurred!
    CMake Error at cmake/modules/sysbuild_extensions.cmake:514 (message):
      CMake configure failed for Zephyr project: mcuboot
    
      Location: C:/ncs/v2.8.0/bootloader/mcuboot/boot/zephyr/
    Call Stack (most recent call first):
      cmake/modules/sysbuild_images.cmake:20 (ExternalZephyrProject_Cmake)
      cmake/modules/sysbuild_default.cmake:20 (include)
      C:/ncs/v2.8.0/zephyr/share/zephyr-package/cmake/ZephyrConfig.cmake:75 (include)
      C:/ncs/v2.8.0/zephyr/share/zephyr-package/cmake/ZephyrConfig.cmake:92 (include_boilerplate)
      C:/ncs/v2.8.0/zephyr/share/sysbuild-package/cmake/SysbuildConfig.cmake:8 (include)
      template/CMakeLists.txt:10 (find_package)
    
    
    -- Configuring incomplete, errors occurred!
    See also "C:/work/dev/if-device-nrf53/cc1-med/build/CMakeFiles/CMakeOutput.log".
    ←[91mFATAL ERROR: command exited with status 1: 'C:\ncs\toolchains\2d382dcd92\opt\bin\cmake.EXE' -DWEST_PYTHON=C:/ncs/toolchains/2d382dcd92/opt/bin/python.exe '-BC:\work\dev\if-device-nrf53\cc1-med\build' -GNinja -DBOARD=cc2v1/nrf5340/cpuapp '-DBOARD_ROOT=C:\work\dev\if-device-nrf53' '-SC:\ncs\v2.8.0\zephyr\share\sysbuild' '-DAPP_DIR:PATH=C:\work\dev\if-device-nrf53\cc1-med'
    ←[0m

    It seems it doesn't like something about the flash driver? But this worked fine in 2.6... and also I don't get this error if using child_images build system...

    Note I have a pm_static.yml to define my partitions as I have an external flash chip also - does this make a difference? (again, all fine on 2.6)

  • And, as I said, with the old childimage system it gets further thru the config process (does the CPUNET, and mcuboot, then gets (I assume) to app), and it stops with this:

    -- Target:  Generic/arm
    -- Machine: arm
    -- Looking for include file stdatomic.h
    -- Looking for include file stdatomic.h - found
    -- open-amp version: 1.6.1 (C:/ncs/v2.8.0/modules/lib/open-amp/open-amp)
    -- Host:    Windows/AMD64
    -- Target:  Generic/arm
    -- Machine: arm
    -- C_FLAGS :  -Wall -Wextra
    -- Looking for include file fcntl.h
    -- Looking for include file fcntl.h - found
    -- Setting build type to 'MinSizeRel' as none was specified.
    CMake Warning at C:/ncs/v2.8.0/zephyr/CMakeLists.txt:952 (message):
      No SOURCES given to Zephyr library: drivers__disk
    
      Excluding target from build.
    
    
    CMake Warning at C:/ncs/v2.8.0/zephyr/CMakeLists.txt:952 (message):
      No SOURCES given to Zephyr library: drivers__pwm
    
      Excluding target from build.
    
    
    CMake Warning at C:/ncs/v2.8.0/zephyr/CMakeLists.txt:2134 (message):
      __ASSERT() statements are globally ENABLED
    
    
    CMake Deprecation Warning at C:/ncs/v2.8.0/nrf/cmake/partition_manager.cmake:32 (message):
    
    
                ---------------------------------------------------------------------
                --- WARNING: Child and parent image functionality is deprecated   ---
                --- and should be replaced with sysbuild. Child and parent image  ---
                --- support remains only to allow existing customer applications  ---
                --- to build and allow porting to sysbuild, it is no longer       ---
                --- receiving updates or new features and it will not be possible ---
                --- to build using child/parent image at all in nRF Connect SDK   ---
                --- version 2.9 onwards.                                          ---
                ---------------------------------------------------------------------
    Call Stack (most recent call first):
      C:/ncs/v2.8.0/zephyr/cmake/modules/kernel.cmake:255 (include)
      C:/ncs/v2.8.0/zephyr/cmake/modules/zephyr_default.cmake:142 (include)
      C:/ncs/v2.8.0/zephyr/share/zephyr-package/cmake/ZephyrConfig.cmake:66 (include)
      C:/ncs/v2.8.0/zephyr/share/zephyr-package/cmake/ZephyrConfig.cmake:92 (include_boilerplate)
      CMakeLists.txt:8 (find_package)
    
    
    -- Found partition manager static configuration: C:/work/dev/if-device-nrf53/cc1-med/pm_static.yml
    Partition 'mcuboot' is not included in the dynamic resolving since it is statically defined.
    Partition 'mcuboot_pad' is not included in the dynamic resolving since it is statically defined.
    Partition 'mcuboot_primary_app' is not included in the dynamic resolving since it is statically defined.
    Partition 'mcuboot_primary' is not included in the dynamic resolving since it is statically defined.
    Partition 'nvs_storage' is not included in the dynamic resolving since it is statically defined.
    Partition 'mcuboot_secondary' is not included in the dynamic resolving since it is statically defined.
    Partition 'pcd_sram' is not included in the dynamic resolving since it is statically defined.
    Partition 'rpmsg_nrf53_sram' is not included in the dynamic resolving since it is statically defined.
    -- Configuring incomplete, errors occurred!
    See also "C:/work/dev/if-device-nrf53/cc1-med/build/CMakeFiles/CMakeOutput.log".
    See also "C:/work/dev/if-device-nrf53/cc1-med/build/CMakeFiles/CMakeError.log".
    ←[91mFATAL ERROR: command exited with status 1: 'C:\ncs\toolchains\2d382dcd92\opt\bin\cmake.EXE' -DWEST_PYTHON=C:/ncs/toolchains/2d382dcd92/opt/bin/python.exe '-BC:\work\dev\if-device-nrf53\cc1-med\build' -GNinja -DBOARD=cc2v1/nrf5340/cpuapp -DBOARD_ROOT=/work/dev/if-device-nrf53 '-SC:\work\dev\if-device-nrf53\cc1-med'
    ←[0m

    and in ther cc1-med/build/CMakeFiles/CMakeError.log it says:

    Compiling the C compiler identification source file "CMakeCCompilerId.c" failed.
    Compiler: C:/ncs/toolchains/2d382dcd92/opt/zephyr-sdk/arm-zephyr-eabi/bin/arm-zephyr-eabi-gcc.exe 
    Build flags: 
    Id flags:  
    
    The output was:
    1
    c:/ncs/toolchains/2d382dcd92/opt/zephyr-sdk/arm-zephyr-eabi/bin/../lib/gcc/arm-zephyr-eabi/12.2.0/../../../../arm-zephyr-eabi/bin/ld.exe: c:/ncs/toolchains/2d382dcd92/opt/zephyr-sdk/arm-zephyr-eabi/bin/../lib/gcc/arm-zephyr-eabi/12.2.0/../../../../arm-zephyr-eabi/lib\libc.a(lib_a-exit.o): in function `exit':
    exit.c:(.text.exit+0x34): undefined reference to `_exit'
    collect2.exe: error: ld returned 1 exit status
    
    
    Compiling the CXX compiler identification source file "CMakeCXXCompilerId.cpp" failed.
    Compiler: C:/ncs/toolchains/2d382dcd92/opt/zephyr-sdk/arm-zephyr-eabi/bin/arm-zephyr-eabi-gcc.exe 
    Build flags: 
    Id flags:  
    
    The output was:
    1
    c:/ncs/toolchains/2d382dcd92/opt/zephyr-sdk/arm-zephyr-eabi/bin/../lib/gcc/arm-zephyr-eabi/12.2.0/../../../../arm-zephyr-eabi/bin/ld.exe: c:/ncs/toolchains/2d382dcd92/opt/zephyr-sdk/arm-zephyr-eabi/bin/../lib/gcc/arm-zephyr-eabi/12.2.0/../../../../arm-zephyr-eabi/lib\libc.a(lib_a-exit.o): in function `exit':
    exit.c:(.text.exit+0x34): undefined reference to `_exit'
    collect2.exe: error: ld returned 1 exit status
    
    

    I don't understand?

  • It seems it doesn't like something about the flash driver? But this worked fine in 2.6... and also I don't get this error if using child_images build system...

    After diving into a maze of nasty twisty little KConfig dependancies, it seems this is because I need CONFIG_FLASH=y in the sysbuild/mcuboot/prj.conf. Previously this was configured just in the main prj.conf for the project.

    I'm thinking that with sysbuild the 'main app' prj.conf is NOT merged in with the mcuboot one, so this has to stand on its own?

Related