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?

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

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

Children
  • after finding the fix for the CONFIG_FLASH for the sysbuild, it also stops at this step. Can you explain why, given it seems to be using all the elements from the correct toolchain?

    Without a fix for this I am completely blocked.

  • The full build output:

    C:\work\dev\if-device-nrf53>west build --build-dir cc1-med/build cc1-med --board cc2v1/nrf5340/cpuapp --pristine -DBOARD_ROOT=/work/dev/if-device-nrf53
    -- 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)
    
    
    Parsing C:/ncs/v2.8.0/bootloader/mcuboot/boot/zephyr/Kconfig
    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'
    Configuration saved to 'C:/work/dev/if-device-nrf53/cc1-med/build/mcuboot/zephyr/.config'
    Kconfig header saved to 'C:/work/dev/if-device-nrf53/cc1-med/build/mcuboot/zephyr/include/generated/zephyr/autoconf.h'
    -- Found GnuLd: c:/ncs/toolchains/2d382dcd92/opt/zephyr-sdk/arm-zephyr-eabi/arm-zephyr-eabi/bin/ld.bfd.exe (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: C:/ncs/toolchains/2d382dcd92/opt/zephyr-sdk/arm-zephyr-eabi/bin/arm-zephyr-eabi-gcc.exe
    -- Setting build type to 'MinSizeRel' as none was specified.
    MCUBoot bootloader key file: /work/dev/if-device-nrf53/keys/bootloader_priv-ecdsa256.pem
    -- Configuring done
    -- Generating done
    -- Build files have been written to: C:/work/dev/if-device-nrf53/cc1-med/build/mcuboot
    --
       *****************************
       * Running CMake for hci_ipc *
       *****************************
    
    Loading Zephyr default modules (Zephyr base).
    -- Application: C:/ncs/v2.8.0/zephyr/samples/bluetooth/hci_ipc
    -- 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/cpunet
    -- 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_cpunet.dts
    -- Generated zephyr.dts: C:/work/dev/if-device-nrf53/cc1-med/build/hci_ipc/zephyr/zephyr.dts
    -- Generated devicetree_generated.h: C:/work/dev/if-device-nrf53/cc1-med/build/hci_ipc/zephyr/include/generated/zephyr/devicetree_generated.h
    -- Including generated dts.cmake file: C:/work/dev/if-device-nrf53/cc1-med/build/hci_ipc/zephyr/dts.cmake
    Parsing C:/ncs/v2.8.0/zephyr/Kconfig
    Loaded configuration 'C:/work/dev/if-device-nrf53/boards/infrafon/cc2v1/cc2v1_nrf5340_cpunet_defconfig'
    Merged configuration 'C:/work/dev/if-device-nrf53/cc1-med/sysbuild/hci_ipc/prj.conf'
    Merged configuration 'C:/work/dev/if-device-nrf53/cc1-med/build/hci_ipc/zephyr/.config.sysbuild'
    Configuration saved to 'C:/work/dev/if-device-nrf53/cc1-med/build/hci_ipc/zephyr/.config'
    Kconfig header saved to 'C:/work/dev/if-device-nrf53/cc1-med/build/hci_ipc/zephyr/include/generated/zephyr/autoconf.h'
    -- Found GnuLd: c:/ncs/toolchains/2d382dcd92/opt/zephyr-sdk/arm-zephyr-eabi/arm-zephyr-eabi/bin/ld.bfd.exe (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: C:/ncs/toolchains/2d382dcd92/opt/zephyr-sdk/arm-zephyr-eabi/bin/arm-zephyr-eabi-gcc.exe
    -- libmetal version: 1.6.0 (C:/ncs/v2.8.0/zephyr/samples/bluetooth/hci_ipc)
    -- Build type:
    -- Host:    Windows/AMD64
    -- 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.
    -- Configuring done
    -- Generating done
    -- Build files have been written to: C:/work/dev/if-device-nrf53/cc1-med/build/hci_ipc
    --
       *****************************
       * 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: 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/cc1-med/zephyr/zephyr.dts
    -- Generated devicetree_generated.h: C:/work/dev/if-device-nrf53/cc1-med/build/cc1-med/zephyr/include/generated/zephyr/devicetree_generated.h
    -- Including generated dts.cmake file: C:/work/dev/if-device-nrf53/cc1-med/build/cc1-med/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:8 (find_package)
    
    
    
    warning: NRF_SECURITY (defined at C:/ncs/v2.8.0/nrf\subsys\nrf_security/Kconfig:32) was assigned the
    value 'n' but got the value 'y'. See
    http://docs.zephyrproject.org/latest/kconfig.html#CONFIG_NRF_SECURITY and/or look up NRF_SECURITY 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: DISK_DRIVER_FLASH (defined at drivers/disk/Kconfig.flash:4) was assigned the value 'y' but
    got the value 'n'. Check these unsatisfied dependencies: DT_HAS_ZEPHYR_FLASH_DISK_ENABLED (=n). See
    http://docs.zephyrproject.org/latest/kconfig.html#CONFIG_DISK_DRIVER_FLASH and/or look up
    DISK_DRIVER_FLASH 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: Deprecated symbol MBEDTLS_LEGACY_CRYPTO_C is enabled.
    
    
    warning: Experimental symbol WIFI_READY_LIB is enabled.
    
    
    warning: Experimental symbol WIFI_NM_WPA_SUPPLICANT is enabled.
    
    
    warning: Experimental symbol WIFI_NM_WPA_SUPPLICANT is enabled.
    
    
    warning: Experimental symbol NRF_WIFI_RPU_RECOVERY is enabled.
    
    
    warning: Experimental symbol POSIX_ASYNCHRONOUS_IO is enabled.
    
    
    warning: Experimental symbol POSIX_DEVICE_IO is enabled.
    
    
    warning: Experimental symbol POSIX_FD_MGMT is enabled.
    
    
    warning: Experimental symbol POSIX_MULTI_PROCESS is enabled.
    
    
    warning: Experimental symbol POSIX_REALTIME_SIGNALS is enabled.
    
    
    warning: Experimental symbol POSIX_SIGNALS is enabled.
    
    
    warning: Experimental symbol NET_SOCKETS_SERVICE is enabled.
    
    Parsing C:/ncs/v2.8.0/zephyr/Kconfig
    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/prj.conf'
    Merged configuration 'C:/work/dev/if-device-nrf53/cc1-med/build/cc1-med/zephyr/.config.sysbuild'
    Configuration saved to 'C:/work/dev/if-device-nrf53/cc1-med/build/cc1-med/zephyr/.config'
    Kconfig header saved to 'C:/work/dev/if-device-nrf53/cc1-med/build/cc1-med/zephyr/include/generated/zephyr/autoconf.h'
    -- Found GnuLd: c:/ncs/toolchains/2d382dcd92/opt/zephyr-sdk/arm-zephyr-eabi/arm-zephyr-eabi/bin/ld.bfd.exe (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: C:/ncs/toolchains/2d382dcd92/opt/zephyr-sdk/arm-zephyr-eabi/bin/arm-zephyr-eabi-gcc.exe
    =========== Generating psa_crypto_config ===============
    Backup: CONFIG_MBEDTLS_PSA_CRYPTO_SPM: False
    Backup: CONFIG_MBEDTLS_PSA_CRYPTO_C: True
    Backup: CONFIG_MBEDTLS_PSA_CRYPTO_KEY_ID_ENCODES_OWNER: False
    Backup: CONFIG_MBEDTLS_PLATFORM_SETUP_TEARDOWN_ALT: False
    Backup: CONFIG_MBEDTLS_THREADING: False
    Backup: CONFIG_MBEDTLS_THREADING_ALT: True
    =========== Checkpoint: backup ===============
    Restore: CONFIG_MBEDTLS_PSA_CRYPTO_SPM: False
    Restore: CONFIG_MBEDTLS_PSA_CRYPTO_C: True
    Restore: CONFIG_MBEDTLS_PSA_CRYPTO_KEY_ID_ENCODES_OWNER: False
    Restore: CONFIG_MBEDTLS_PLATFORM_SETUP_TEARDOWN_ALT: False
    Restore: CONFIG_MBEDTLS_THREADING: False
    Restore: CONFIG_MBEDTLS_THREADING_ALT: True
    =========== End psa_crypto_config ===============
    =========== Generating psa_crypto_library_config ===============
    Backup: CONFIG_MBEDTLS_PSA_CRYPTO_C: True
    Backup: CONFIG_MBEDTLS_PSA_CRYPTO_KEY_ID_ENCODES_OWNER: False
    Backup: CONFIG_MBEDTLS_PSA_CRYPTO_SPM: False
    Backup: CONFIG_MBEDTLS_USE_PSA_CRYPTO: False
    Backup: CONFIG_MBEDTLS_PLATFORM_PRINTF_ALT: False
    Backup: CONFIG_MBEDTLS_THREADING: False
    Backup: CONFIG_MBEDTLS_THREADING_ALT: True
    =========== Checkpoint: backup ===============
    Restore: CONFIG_MBEDTLS_PSA_CRYPTO_C: True
    Restore: CONFIG_MBEDTLS_PSA_CRYPTO_KEY_ID_ENCODES_OWNER: False
    Restore: CONFIG_MBEDTLS_PSA_CRYPTO_SPM: False
    Restore: CONFIG_MBEDTLS_USE_PSA_CRYPTO: False
    Restore: CONFIG_MBEDTLS_PLATFORM_PRINTF_ALT: False
    Restore: CONFIG_MBEDTLS_THREADING: False
    Restore: CONFIG_MBEDTLS_THREADING_ALT: True
    =========== End psa_crypto_library_config ===============
    CMake Error at C:/ncs/v2.8.0/zephyr/cmake/modules/extensions.cmake:695 (add_custom_target):
      add_custom_target cannot create target
      "gen_nrf70_bin_inc_77552e44891130fb8290820867cdfb8b" because another target
      with the same name already exists.  The existing target is a custom target
      created in source directory "C:/ncs/v2.8.0/zephyr/drivers/wifi/nrfwifi".
      See documentation for policy CMP0002 for more details.
    Call Stack (most recent call first):
      C:/ncs/v2.8.0/nrf/subsys/net/lib/nrf70_fw_ext/CMakeLists.txt:45 (generate_inc_file_for_target)
    
    
    -- libmetal version: 1.6.0 (C:/work/dev/if-device-nrf53/cc1-med)
    -- Build type:
    -- Host:    Windows/AMD64
    -- 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.
    
    
    -- Including signing script: C:/ncs/v2.8.0/nrf/cmake/sysbuild/image_signing.cmake
    CMake Warning at C:/ncs/v2.8.0/zephyr/CMakeLists.txt:2134 (message):
      __ASSERT() statements are globally ENABLED
    
    
    -- Configuring incomplete, errors occurred!
    See also "C:/work/dev/if-device-nrf53/cc1-med/build/cc1-med/CMakeFiles/CMakeOutput.log".
    See also "C:/work/dev/if-device-nrf53/cc1-med/build/cc1-med/CMakeFiles/CMakeError.log".
    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=cc2v1/nrf5340/cpuapp -DBOARD_ROOT=/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

    The CMakeError.log:

    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
    
    
    

    Its failing to link a cmake tool?

    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
    The only other error I see is this:
    CMake Error at C:/ncs/v2.8.0/zephyr/cmake/modules/extensions.cmake:695 (add_custom_target):
    add_custom_target cannot create target
    "gen_nrf70_bin_inc_77552e44891130fb8290820867cdfb8b" because another target
    with the same name already exists. The existing target is a custom target
    created in source directory "C:/ncs/v2.8.0/zephyr/drivers/wifi/nrfwifi".
    See documentation for policy CMP0002 for more details.
    Call Stack (most recent call first):
    C:/ncs/v2.8.0/nrf/subsys/net/lib/nrf70_fw_ext/CMakeLists.txt:45 (generate_inc_file_for_target)
    but this seems to be linked to the nrf70 wifi stuff? Maybe no link to the cmake error?
    I also see this:
    warning: DISK_DRIVER_FLASH (defined at drivers/disk/Kconfig.flash:4) was assigned the value 'y' but
    got the value 'n'. Check these unsatisfied dependencies: DT_HAS_ZEPHYR_FLASH_DISK_ENABLED (=n). 
    which makes me wonder why it can't find the flash disk definition in my DTS? What exactly does the DT_HAS_... macro look for? I have defined 
            zephyr,flash-disk = &mx25r64;
  • Hi,

    HWM2

    BrianW said:
    I can ignore these, yes?

    I wouldn't recommend you to ignore any compilation warnings. The warnings you mention are labeled as deprecated.

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

    This warning seems to be interesting as it is not present in the default audio application configuration (and in neither of the other samples I've built to test). Could you add your modification to the i2s0 device within for instance https://github.com/nrfconnect/sdk-nrf/tree/main/applications/nrf5340_audio or any of the other audio samples and see if you're able to force the warning w.r.t address and size from there?

    BrianW said:
    3/ enabling the PDM driver 

    Looks to me that this has changed from _PDM to _PDM0 in 2.8.0: https://docs.nordicsemi.com/bundle/ncs-2.8.0/page/kconfig/index.html#CONFIG_NRFX_PDM0

    Sysbuild:

    I see you've addressed some of the sysbuild questions/uncertainties in the reply following the longer set of sysbuild questions so I'll start there:

    BrianW said:
    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?

    Yes, this is correct. You still need to have a prj.conf for your app. Sysbuild only handles companion images

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

    You can see the structure of sysbuild companion images here as well: https://github.com/nrfconnect/sdk-nrf/tree/main/applications/nrf5340_audio/sysbuild. I'm not sure if my explanation of the structure caused any misunderstandings.

    It is unfortunately too many changes simultaneously that causes the build crashes with no useful information you listed in your replies from yesterday.

    Here's a breakdown of what I would've done if I were to migrate from 2.6.1 to 2.8.0:

    1. Start with the audio app and montior changes from 2.6.1 to 2.8.0. Pay attention to changes from child_image/ to sysbuild/ as well as the addition to sysbuild.conf together with prj.conf
    2. Compare the board files within said project and the board files for the 5340 in 2.6.1 and 2.8.0. These are the changes w.r.t hwm1 and hwm2 in addition to the migration note for this https://docs.nordicsemi.com/bundle/ncs-latest/page/nrf/releases_and_maturity/migration/migration_hwmv2.html
    3. After you've migrated to hwmv2, try to build with "--no-sysbuild". This should allow you to build with child and parent images. This is still supported in 2.8.0, but will not be in 2.9.0.
    4. Resolve any configuration errors and make it compile without sysbuild
    5. Start with migration from child/parent images to sysbuild. Make note of the changes in item 1 and the two links you sent in the start

      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

    Unfortunately there will be some downtime in the coming weeks due to holidays here in Norway, so activity will be slow on devzone until early Janaury. I'm sorry for not being able to help you pinpoint the migration issues before now but I strongly believe that if you methodically follow the 5 steps I listed you will succeed.

    Kind regards,
    Andreas

  • thanks for the info above. Its true the jump 2.6->2.7/2.8 is very hard, especially due to the zephyr updates, and lacking a set of detailled release notes that show exactly what is been deleted/updated/added doesn't help. 

    My strategy since yesterday is that I have started with the wifi/sta sample prj.conf (which doesn't build completely but gets past the config step to actually compile source files), and worked forwards from that... somehow this has resolved the CMake ld error, but I have no idea why.

    I hope to get the non-sysbuild working first as ou suggest, but I'm still stuck with a couple of issues

    1 points quickly (I hope)

    USB FAT32 flash disk operation

    warning: DISK_DRIVER_FLASH (defined at drivers/disk/Kconfig.flash:4) was assigned the value 'y' but
    got the value 'n'. Check these unsatisfied dependencies: DT_HAS_ZEPHYR_FLASH_DISK_ENABLED (=n). See
    docs.zephyrproject.org/.../kconfig.html and/or look up
    DISK_DRIVER_FLASH 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.

    which leads to:

    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.

    What is required to satisfy DT_HAS_ZEPHYR_FLASH_DISK_ENABLED  ? (again, this is a change from 2.6)? I have tried the usb disk example from 2.8, but can't work out what the key difference is between the dts files?

    thanx

Related