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?

Reply
  • 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?

Children
  • 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?

  • 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
     
Related