Migrating a Zephyr Project from Child/Parent Build System to Sysbuild: First Steps and Questions

I'm trying to migrate my project from the child/parent build system to the new sysbuild system in Zephyr, and I'm finding it a bit unclear. I came across a helpful post that partially explains how to structure the new project. Let me start by showing my current project, which has a structure similar to the one described in the post I found:

application
├── CMakeLists.txt
├── prj.conf
├── boards
    └── arm
        └── board_A
        └── board_B
├── child_image
    └── mcuboot
        ├── prj.conf
        └── boards
            ├── board_A.conf
            ├── board_B.conf
            └── keys
                ├── board_A.pem
                └── board_B.pem
├── src

CMakeLists.txt is:

# SPDX-License-Identifier: Apache-2.0

cmake_minimum_required(VERSION 3.20.0)

find_package(Zephyr REQUIRED HINTS $ENV{ZEPHYR_BASE})
project(gravity_sensor)

target_sources(app PRIVATE src/main.c)
target_sources(app PRIVATE src/app.c)
target_sources(app PRIVATE src/status_led.c)
target_sources(app PRIVATE src/ble_connection.c)
target_sources(app PRIVATE src/icm20948.c)
target_sources(app PRIVATE src/error_managing.c)
target_sources(app PRIVATE src/memory.c)
target_sources(app PRIVATE src/bsm.c)

prj.conf is:

################################################
### SYSTEM CONFIGURATION #######################
################################################
CONFIG_LOG=y
CONFIG_LOG_MAX_LEVEL=2
CONFIG_USE_SEGGER_RTT=y
CONFIG_RTT_CONSOLE=y
CONFIG_UART_CONSOLE=n
CONFIG_USB_DRIVER_LOG_LEVEL_ERR=y
CONFIG_USB_DEVICE_LOG_LEVEL_ERR=y
CONFIG_USB_MASS_STORAGE_LOG_LEVEL_ERR=y
CONFIG_RING_BUFFER=y
CONFIG_HEAP_MEM_POOL_SIZE=2048
CONFIG_MAIN_STACK_SIZE=2048
CONFIG_REBOOT=y
# CONFIG_DISABLE_FLASH_PATCH=y

# printf floats support
CONFIG_CBPRINTF_LIBC_SUBSTS=y
CONFIG_CBPRINTF_FP_SUPPORT=y

# time library support
CONFIG_NEWLIB_LIBC=y
CONFIG_POSIX_API=y

################################################
### SOC'S PERIPHERALS CONFIGURATION ############
################################################
CONFIG_GPIO=y
CONFIG_PWM=y
CONFIG_LED=y
CONFIG_I2C=y
CONFIG_NRFX_SPIM0=y
CONFIG_NRFX_TIMER1=y
CONFIG_NRFX_PPI=y

################################################
### NVS MEMORY CONFIGURATION ###################
################################################
CONFIG_NVS=y

################################################
### FLASH MEMORY SUPPORT CONFIGURATION #########
################################################
CONFIG_FLASH=y
CONFIG_FLASH_PAGE_LAYOUT=y
CONFIG_MPU_ALLOW_FLASH_WRITE=y
CONFIG_FLASH_MAP=y

################################################
### BLE CONFIGURATION ##########################
################################################
CONFIG_BT=y
CONFIG_BT_PERIPHERAL=y
CONFIG_BT_DEVICE_NAME="Gravity Sensor"
# CONFIG_BT_SMP=y
CONFIG_BT_DEVICE_APPEARANCE=1345
CONFIG_BT_MAX_CONN=1
CONFIG_BT_LL_SOFTDEVICE=y
CONFIG_BT_BUF_ACL_RX_SIZE=502
CONFIG_BT_ATT_PREPARE_COUNT=2
# CONFIG_BT_L2CAP_TX_BUF_COUNT=10
CONFIG_BT_L2CAP_TX_MTU=498
# CONFIG_BT_L2CAP_DYNAMIC_CHANNEL=y
CONFIG_BT_CONN_TX_MAX=10
CONFIG_BT_BUF_ACL_TX_COUNT=10
CONFIG_BT_BUF_ACL_TX_SIZE=502
CONFIG_BT_CTLR_DATA_LENGTH_MAX=251
CONFIG_BT_CTLR_PHY_2M=y
CONFIG_BT_CTLR_RX_BUFFERS=2
CONFIG_BT_CTLR_SDC_MAX_CONN_EVENT_LEN_DEFAULT=4000000
CONFIG_BT_CTLR_ADVANCED_FEATURES=y
CONFIG_BT_CTLR_CONN_RSSI=y

CONFIG_BT_USER_DATA_LEN_UPDATE=y
CONFIG_BT_USER_PHY_UPDATE=y
CONFIG_BT_PERIPHERAL_PREF_MIN_INT=6
CONFIG_BT_PERIPHERAL_PREF_MAX_INT=80
CONFIG_BT_PERIPHERAL_PREF_LATENCY=0
CONFIG_BT_PERIPHERAL_PREF_TIMEOUT=400
CONFIG_BT_GAP_AUTO_UPDATE_CONN_PARAMS=n

################################################
### DFU CONFIGURATION ##########################
################################################
CONFIG_NET_BUF=y
CONFIG_ZCBOR=y
CONFIG_CRC=y
CONFIG_MCUMGR=y
CONFIG_STREAM_FLASH=y
CONFIG_FLASH_MAP=y
CONFIG_SYSTEM_WORKQUEUE_STACK_SIZE=2304
CONFIG_MAIN_STACK_SIZE=2048
CONFIG_BOOTLOADER_MCUBOOT=y
CONFIG_FLASH=y
CONFIG_THREAD_MONITOR=y
CONFIG_MCUMGR_GRP_OS_TASKSTAT=y
CONFIG_STATS=y
CONFIG_STATS_NAMES=y
CONFIG_FLASH=y
CONFIG_IMG_MANAGER=y
CONFIG_MCUMGR_GRP_IMG=y
CONFIG_MCUMGR_GRP_OS=y
CONFIG_MCUMGR_GRP_STAT=y
CONFIG_LOG=y
CONFIG_MCUBOOT_UTIL_LOG_LEVEL_WRN=y
CONFIG_USB_DEVICE_STACK=y
CONFIG_SERIAL=y
CONFIG_UART_LINE_CTRL=y
CONFIG_USB_DEVICE_INITIALIZE_AT_BOOT=n
CONFIG_CONSOLE=y
CONFIG_MCUMGR_TRANSPORT_UART=y
CONFIG_BASE64=y

child_image/mcuboot/prj.conf is:

CONFIG_BOOT_SIGNATURE_TYPE_RSA=y
CONFIG_BOOT_SIGNATURE_TYPE_ECDSA_P256=n
CONFIG_BOOT_SIGNATURE_KEY_FILE="Path/to/key.pem"

child_image/mcuboot/board/gravity_sensor.conf is:

CONFIG_PM_PARTITION_SIZE_MCUBOOT=0x10000

CONFIG_MULTITHREADING=y
CONFIG_MAIN_STACK_SIZE=10240
CONFIG_LOG=y
CONFIG_LOG_MODE_MINIMAL=y

# Clock configuration
# CONFIG_CLOCK_CONTROL_NRF_K32SRC_RC=y
# CONFIG_CLOCK_CONTROL_NRF_K32SRC_500PPM=y
# CONFIG_CLOCK_CONTROL_NRF_K32SRC_SYNTH=y

# Configure MCUboot features
CONFIG_BOOT_MAX_IMG_SECTORS=2048

# Change default flash erase size for flexible flash layout
CONFIG_BOOT_ERASE_PROGRESSIVELY=y
CONFIG_SOC_FLASH_NRF_EMULATE_ONE_BYTE_WRITE_ACCESS=y

# Configure QSPI for external flash
CONFIG_FLASH=y
CONFIG_FPROTECT=y

# Disable UART Console and enable the RTT console
CONFIG_UART_CONSOLE=n
CONFIG_RTT_CONSOLE=y
CONFIG_USE_SEGGER_RTT=y

# Config logger
CONFIG_LOG=y
CONFIG_LOG_BACKEND_RTT=y
CONFIG_LOG_BACKEND_UART=n

From what I understand, the first step is to delete the child_image folder, create a sysbuild folder, and add a sysbuild.conf file. But what exactly should I include in these two elements, and what modifications, if any, do I need to make to prj.conf and CMakeLists.txt?

Following the post I found, I modified the project as follows:

application
├── CMakeLists.txt
├── prj.conf
├── sysbuild.conf
├── boards
    └── arm
        └── board_A
        └── board_B
├── sysbuild
    └── mcuboot
        ├── prj.conf
        └── boards
            ├── board_A.conf
            ├── board_B.conf
            └── keys
                ├── board_A.pem
                └── board_B.pem
├── src

CMakeLists.txt is:

# SPDX-License-Identifier: Apache-2.0

cmake_minimum_required(VERSION 3.20.0)

find_package(Zephyr REQUIRED HINTS $ENV{ZEPHYR_BASE})
project(gravity_sensor)

target_sources(app PRIVATE src/main.c)
target_sources(app PRIVATE src/app.c)
target_sources(app PRIVATE src/status_led.c)
target_sources(app PRIVATE src/ble_connection.c)
target_sources(app PRIVATE src/icm20948.c)
target_sources(app PRIVATE src/error_managing.c)
target_sources(app PRIVATE src/memory.c)
target_sources(app PRIVATE src/bsm.c)

prj.conf is:

################################################
### SYSTEM CONFIGURATION #######################
################################################
CONFIG_LOG=y
CONFIG_LOG_MAX_LEVEL=2
CONFIG_USE_SEGGER_RTT=y
CONFIG_RTT_CONSOLE=y
CONFIG_UART_CONSOLE=n
CONFIG_USB_DRIVER_LOG_LEVEL_ERR=y
CONFIG_USB_DEVICE_LOG_LEVEL_ERR=y
CONFIG_USB_MASS_STORAGE_LOG_LEVEL_ERR=y
CONFIG_RING_BUFFER=y
CONFIG_HEAP_MEM_POOL_SIZE=2048
CONFIG_MAIN_STACK_SIZE=2048
CONFIG_REBOOT=y
# CONFIG_DISABLE_FLASH_PATCH=y

# printf floats support
CONFIG_CBPRINTF_LIBC_SUBSTS=y
CONFIG_CBPRINTF_FP_SUPPORT=y

# time library support
CONFIG_NEWLIB_LIBC=y
CONFIG_POSIX_API=y

################################################
### SOC'S PERIPHERALS CONFIGURATION ############
################################################
CONFIG_GPIO=y
CONFIG_PWM=y
CONFIG_LED=y
CONFIG_I2C=y
CONFIG_NRFX_SPIM0=y
CONFIG_NRFX_TIMER1=y
CONFIG_NRFX_PPI=y

################################################
### NVS MEMORY CONFIGURATION ###################
################################################
CONFIG_NVS=y

################################################
### FLASH MEMORY SUPPORT CONFIGURATION #########
################################################
CONFIG_FLASH=y
CONFIG_FLASH_PAGE_LAYOUT=y
CONFIG_MPU_ALLOW_FLASH_WRITE=y
CONFIG_FLASH_MAP=y

################################################
### BLE CONFIGURATION ##########################
################################################
CONFIG_BT=y
CONFIG_BT_PERIPHERAL=y
CONFIG_BT_DEVICE_NAME="Gravity Sensor"
# CONFIG_BT_SMP=y
CONFIG_BT_DEVICE_APPEARANCE=1345
CONFIG_BT_MAX_CONN=1
CONFIG_BT_LL_SOFTDEVICE=y
CONFIG_BT_BUF_ACL_RX_SIZE=502
CONFIG_BT_ATT_PREPARE_COUNT=2
# CONFIG_BT_L2CAP_TX_BUF_COUNT=10
CONFIG_BT_L2CAP_TX_MTU=498
# CONFIG_BT_L2CAP_DYNAMIC_CHANNEL=y
CONFIG_BT_CONN_TX_MAX=10
CONFIG_BT_BUF_ACL_TX_COUNT=10
CONFIG_BT_BUF_ACL_TX_SIZE=502
CONFIG_BT_CTLR_DATA_LENGTH_MAX=251
CONFIG_BT_CTLR_PHY_2M=y
CONFIG_BT_CTLR_RX_BUFFERS=2
CONFIG_BT_CTLR_SDC_MAX_CONN_EVENT_LEN_DEFAULT=4000000
CONFIG_BT_CTLR_ADVANCED_FEATURES=y
CONFIG_BT_CTLR_CONN_RSSI=y

CONFIG_BT_USER_DATA_LEN_UPDATE=y
CONFIG_BT_USER_PHY_UPDATE=y
CONFIG_BT_PERIPHERAL_PREF_MIN_INT=6
CONFIG_BT_PERIPHERAL_PREF_MAX_INT=80
CONFIG_BT_PERIPHERAL_PREF_LATENCY=0
CONFIG_BT_PERIPHERAL_PREF_TIMEOUT=400
CONFIG_BT_GAP_AUTO_UPDATE_CONN_PARAMS=n

################################################
### DFU CONFIGURATION ##########################
################################################
CONFIG_NET_BUF=y
CONFIG_ZCBOR=y
CONFIG_CRC=y
CONFIG_MCUMGR=y
CONFIG_STREAM_FLASH=y
CONFIG_FLASH_MAP=y
CONFIG_SYSTEM_WORKQUEUE_STACK_SIZE=2304
CONFIG_MAIN_STACK_SIZE=2048
CONFIG_BOOTLOADER_MCUBOOT=y
CONFIG_FLASH=y
CONFIG_THREAD_MONITOR=y
CONFIG_MCUMGR_GRP_OS_TASKSTAT=y
CONFIG_STATS=y
CONFIG_STATS_NAMES=y
CONFIG_FLASH=y
CONFIG_IMG_MANAGER=y
CONFIG_MCUMGR_GRP_IMG=y
CONFIG_MCUMGR_GRP_OS=y
CONFIG_MCUMGR_GRP_STAT=y
CONFIG_LOG=y
CONFIG_MCUBOOT_UTIL_LOG_LEVEL_WRN=y
CONFIG_USB_DEVICE_STACK=y
CONFIG_SERIAL=y
CONFIG_UART_LINE_CTRL=y
CONFIG_USB_DEVICE_INITIALIZE_AT_BOOT=n
CONFIG_CONSOLE=y
CONFIG_MCUMGR_TRANSPORT_UART=y
CONFIG_BASE64=y

sysbuild/mcuboot/prj.conf is void and sysbuild.conf is:

SB_CONFIG_BOOTLOADER_MCUBOOT=y
SB_CONFIG_MCUBOOT_MODE_OVERWRITE_ONLY=y

SB_CONFIG_BOOT_SIGNATURE_TYPE_ECDSA_P256=n
SB_CONFIG_BOOT_SIGNATURE_TYPE_RSA=y
SB_CONFIG_BOOT_SIGNATURE_KEY_FILE="path/to/key.pem"

sysbuild/mcuboot/board/gravity_sensor.conf is:

CONFIG_PM_PARTITION_SIZE_MCUBOOT=0x10000

CONFIG_MULTITHREADING=y
CONFIG_MAIN_STACK_SIZE=10240
CONFIG_LOG=y
CONFIG_LOG_MODE_MINIMAL=y

# Clock configuration
# CONFIG_CLOCK_CONTROL_NRF_K32SRC_RC=y
# CONFIG_CLOCK_CONTROL_NRF_K32SRC_500PPM=y
# CONFIG_CLOCK_CONTROL_NRF_K32SRC_SYNTH=y

# Configure MCUboot features
CONFIG_BOOT_MAX_IMG_SECTORS=2048

# Change default flash erase size for flexible flash layout
CONFIG_BOOT_ERASE_PROGRESSIVELY=y
CONFIG_SOC_FLASH_NRF_EMULATE_ONE_BYTE_WRITE_ACCESS=y

# Configure QSPI for external flash
CONFIG_FLASH=y
CONFIG_FPROTECT=y

# Disable UART Console and enable the RTT console
CONFIG_UART_CONSOLE=n
CONFIG_RTT_CONSOLE=y
CONFIG_USE_SEGGER_RTT=y

# Config logger
CONFIG_LOG=y
CONFIG_LOG_BACKEND_RTT=y
CONFIG_LOG_BACKEND_UART=n

However, when I try to build the project, I still get an error:

-- west build: generating a build system
Loading Zephyr module(s) (Zephyr base): sysbuild_default
-- Found Python3: C:/ncs/toolchains/b620d30767/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.9.0/zephyr/.cache
-- Found west (found suitable version "1.2.0", minimum required is "0.14.0")
-- Board: gravity_sensor
Parsing C:/ncs/v2.9.0/zephyr/share/sysbuild/Kconfig
Loaded configuration 'C:/Users/Andrea/Desktop/gravity_sensor/build/_sysbuild/empty.conf'
Merged configuration 'c:/Users/Andrea/Desktop/gravity_sensor/sysbuild.conf'
Configuration saved to 'C:/Users/Andrea/Desktop/gravity_sensor/build/zephyr/.config'
Kconfig header saved to 'C:/Users/Andrea/Desktop/gravity_sensor/build/_sysbuild/autoconf.h'
CMake Error at C:/ncs/v2.9.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.9.0/zephyr/share/zephyr-package/cmake/ZephyrConfig.cmake:75 (include)
  C:/ncs/v2.9.0/zephyr/share/zephyr-package/cmake/ZephyrConfig.cmake:92 (include_boilerplate)
  C:/ncs/v2.9.0/zephyr/share/sysbuild-package/cmake/SysbuildConfig.cmake:8 (include)
  template/CMakeLists.txt:10 (find_package)


-- 
   *****************************
   * Running CMake for mcuboot *
   *****************************

Loading Zephyr default modules (Zephyr base).
-- Application: C:/ncs/v2.9.0/bootloader/mcuboot/boot/zephyr
-- CMake version: 3.21.0
-- Found Python3: C:/ncs/toolchains/b620d30767/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.9.0/zephyr/.cache
-- Zephyr version: 3.7.99 (C:/ncs/v2.9.0/zephyr)
-- Found west (found suitable version "1.2.0", minimum required is "0.14.0")
-- Board: gravity_sensor
-- Found host-tools: zephyr 0.17.0 (C:/ncs/toolchains/b620d30767/opt/zephyr-sdk)
-- Found toolchain: zephyr 0.17.0 (C:/ncs/toolchains/b620d30767/opt/zephyr-sdk)
-- Found Dtc: C:/ncs/toolchains/b620d30767/opt/bin/dtc.exe (found suitable version "1.4.7", minimum required is "1.4.6") 
-- Found BOARD.dts: C:/Users/Andrea/Desktop/gravity_sensor/boards/arm/gravity_sensor/gravity_sensor.dts
-- Found devicetree overlay: C:/Users/Andrea/Desktop/gravity_sensor/sysbuild/mcuboot/boards/gravity_sensor.overlay
-- Generated zephyr.dts: C:/Users/Andrea/Desktop/gravity_sensor/build/mcuboot/zephyr/zephyr.dts
-- Generated devicetree_generated.h: C:/Users/Andrea/Desktop/gravity_sensor/build/mcuboot/zephyr/include/generated/zephyr/devicetree_generated.h
-- Including generated dts.cmake file: C:/Users/Andrea/Desktop/gravity_sensor/build/mcuboot/zephyr/dts.cmake

warning: BOOT_MAX_IMG_SECTORS (defined at C:/ncs/v2.9.0/bootloader/mcuboot/boot/zephyr/Kconfig:614)
was assigned the value '2048' but got the value ''. Check these unsatisfied dependencies:
(!BOOT_MAX_IMG_SECTORS_AUTO) (=n). See
http://docs.zephyrproject.org/latest/kconfig.html#CONFIG_BOOT_MAX_IMG_SECTORS and/or look up
BOOT_MAX_IMG_SECTORS 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: RTT_CONSOLE (defined at drivers/console/Kconfig:130) was assigned the value 'y' but got the
value 'n'. Check these unsatisfied dependencies: CONSOLE (=n). See
http://docs.zephyrproject.org/latest/kconfig.html#CONFIG_RTT_CONSOLE and/or look up RTT_CONSOLE 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_RTT (defined at subsys/logging\backends\Kconfig.rtt:4) was assigned the value
'y' but got the value 'n'. Check these unsatisfied dependencies: (!LOG_MODE_MINIMAL) (=n). See
http://docs.zephyrproject.org/latest/kconfig.html#CONFIG_LOG_BACKEND_RTT and/or look up
LOG_BACKEND_RTT 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 PLATFORM_SPECIFIC_INIT is enabled.

Parsing C:/ncs/v2.9.0/bootloader/mcuboot/boot/zephyr/Kconfig
Loaded configuration 'C:/Users/Andrea/Desktop/gravity_sensor/boards/arm/gravity_sensor/gravity_sensor_defconfig'
Merged configuration 'C:/Users/Andrea/Desktop/gravity_sensor/sysbuild/mcuboot/prj.conf'
Merged configuration 'C:/Users/Andrea/Desktop/gravity_sensor/sysbuild/mcuboot/boards/gravity_sensor.conf'
Merged configuration 'C:/Users/Andrea/Desktop/gravity_sensor/build/mcuboot/zephyr/.config.sysbuild'
Configuration saved to 'C:/Users/Andrea/Desktop/gravity_sensor/build/mcuboot/zephyr/.config'
Kconfig header saved to 'C:/Users/Andrea/Desktop/gravity_sensor/build/mcuboot/zephyr/include/generated/zephyr/autoconf.h'
-- Found GnuLd: c:/ncs/toolchains/b620d30767/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/b620d30767/opt/zephyr-sdk/arm-zephyr-eabi/bin/arm-zephyr-eabi-gcc.exe
CMake Deprecation Warning at C:/ncs/v2.9.0/zephyr/soc/CMakeLists.txt:15 (message):
  

            ---------------------------------------------------------------------
            --- WARNING: Functionality to describe SoCs in HWMv1 is           ---
            --- deprecated and should be replaced with HWMv2, including       ---
            --- boards. HWMv1 SoCs support remains only to ease the migration ---
            --- of out-of-tree SoCs and associated boards. It will not be     ---
            --- possible to build using HWMv1 SoCs at all in future releases. ---
            ---------------------------------------------------------------------


CMake Warning at C:/ncs/v2.9.0/nrf/lib/flash_patch/CMakeLists.txt:8 (message):
  

        ----------------------------------------------------------
        --- WARNING: To maintain the integrity of secure boot, ---
        --- enable CONFIG_DISABLE_FLASH_PATCH in production.   ---
        ----------------------------------------------------------


-- Setting build type to 'MinSizeRel' as none was specified.
MCUBoot bootloader key file: C:/Users/Andrea/Desktop/gravity_sensor/sysbuild/mcuboot/boards/keys/gravity_sensor.pem
Calculated maximum number of sectors: 103
-- Configuring done
-- Generating done
-- Build files have been written to: C:/Users/Andrea/Desktop/gravity_sensor/build/mcuboot
-- 
   ************************************
   * Running CMake for gravity_sensor *
   ************************************

Loading Zephyr default modules (Zephyr base).
-- Application: C:/Users/Andrea/Desktop/gravity_sensor
-- CMake version: 3.21.0
-- Found Python3: C:/ncs/toolchains/b620d30767/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.9.0/zephyr/.cache
-- Zephyr version: 3.7.99 (C:/ncs/v2.9.0/zephyr)
-- Found west (found suitable version "1.2.0", minimum required is "0.14.0")
-- Board: gravity_sensor
-- Found host-tools: zephyr 0.17.0 (C:/ncs/toolchains/b620d30767/opt/zephyr-sdk)
-- Found toolchain: zephyr 0.17.0 (C:/ncs/toolchains/b620d30767/opt/zephyr-sdk)
-- Found Dtc: C:/ncs/toolchains/b620d30767/opt/bin/dtc.exe (found suitable version "1.4.7", minimum required is "1.4.6") 
-- Found BOARD.dts: C:/Users/Andrea/Desktop/gravity_sensor/boards/arm/gravity_sensor/gravity_sensor.dts
-- Found devicetree overlay: C:/Users/Andrea/Desktop/gravity_sensor/boards/gravity_sensor.overlay
-- Generated zephyr.dts: C:/Users/Andrea/Desktop/gravity_sensor/build/gravity_sensor/zephyr/zephyr.dts
-- Generated devicetree_generated.h: C:/Users/Andrea/Desktop/gravity_sensor/build/gravity_sensor/zephyr/include/generated/zephyr/devicetree_generated.h
-- Including generated dts.cmake file: C:/Users/Andrea/Desktop/gravity_sensor/build/gravity_sensor/zephyr/dts.cmake

warning: BT_CTLR_RX_BUFFERS (defined at subsys/bluetooth\controller/Kconfig:225) was assigned the
value '2' but got the value ''. Check these unsatisfied dependencies: BT_LL_SW_SPLIT (=n). See
http://docs.zephyrproject.org/latest/kconfig.html#CONFIG_BT_CTLR_RX_BUFFERS and/or look up
BT_CTLR_RX_BUFFERS 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: BT_CTLR_ADVANCED_FEATURES (defined at subsys/bluetooth\controller\Kconfig.ll_sw_split:292)
was assigned the value 'y' but got the value 'n'. Check these unsatisfied dependencies:
BT_LL_SW_SPLIT (=n). See
http://docs.zephyrproject.org/latest/kconfig.html#CONFIG_BT_CTLR_ADVANCED_FEATURES and/or look up
BT_CTLR_ADVANCED_FEATURES 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_MASS_STORAGE_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
http://docs.zephyrproject.org/latest/kconfig.html#CONFIG_USB_MASS_STORAGE_LOG_LEVEL_ERR and/or look
up USB_MASS_STORAGE_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: Deprecated symbol PLATFORM_SPECIFIC_INIT 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.

Parsing C:/ncs/v2.9.0/zephyr/Kconfig
Loaded configuration 'C:/Users/Andrea/Desktop/gravity_sensor/boards/arm/gravity_sensor/gravity_sensor_defconfig'
Merged configuration 'C:/Users/Andrea/Desktop/gravity_sensor/prj.conf'
Merged configuration 'C:/Users/Andrea/Desktop/gravity_sensor/build/gravity_sensor/zephyr/.config.sysbuild'
Configuration saved to 'C:/Users/Andrea/Desktop/gravity_sensor/build/gravity_sensor/zephyr/.config'
Kconfig header saved to 'C:/Users/Andrea/Desktop/gravity_sensor/build/gravity_sensor/zephyr/include/generated/zephyr/autoconf.h'
-- Found GnuLd: c:/ncs/toolchains/b620d30767/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/b620d30767/opt/zephyr-sdk/arm-zephyr-eabi/bin/arm-zephyr-eabi-gcc.exe
CMake Deprecation Warning at C:/ncs/v2.9.0/zephyr/soc/CMakeLists.txt:15 (message):
  

            ---------------------------------------------------------------------
            --- WARNING: Functionality to describe SoCs in HWMv1 is           ---
            --- deprecated and should be replaced with HWMv2, including       ---
            --- boards. HWMv1 SoCs support remains only to ease the migration ---
            --- of out-of-tree SoCs and associated boards. It will not be     ---
            --- possible to build using HWMv1 SoCs at all in future releases. ---
            ---------------------------------------------------------------------


CMake Warning at C:/ncs/v2.9.0/zephyr/subsys/usb/device/CMakeLists.txt:22 (message):
  CONFIG_USB_DEVICE_VID has default value 0x2FE3.

  This value is only for testing and MUST be configured for USB products.


CMake Warning at C:/ncs/v2.9.0/zephyr/subsys/usb/device/CMakeLists.txt:28 (message):
  CONFIG_USB_DEVICE_PID has default value 0x100.

  This value is only for testing and MUST be configured for USB products.


-- Setting build type to 'MinSizeRel' as none was specified.
-- Including signing script: C:/ncs/v2.9.0/zephyr/cmake/mcuboot.cmake
-- Configuring done
-- Generating done
-- Build files have been written to: C:/Users/Andrea/Desktop/gravity_sensor/build/gravity_sensor
-- Configuring incomplete, errors occurred!
See also "C:/Users/Andrea/Desktop/gravity_sensor/build/CMakeFiles/CMakeOutput.log".
FATAL ERROR: command exited with status 1: 'C:\ncs\toolchains\b620d30767\opt\bin\cmake.EXE' -DWEST_PYTHON=C:/ncs/toolchains/b620d30767/opt/bin/python.exe '-Bc:\Users\Andrea\Desktop\gravity_sensor\build' -GNinja -DBOARD=gravity_sensor -DNCS_TOOLCHAIN_VERSION=NONE -DBOARD_ROOT=c:/users/andrea/desktop/gravity_sensor '-SC:\ncs\v2.9.0\zephyr\share\sysbuild' '-DAPP_DIR:PATH=c:\Users\Andrea\Desktop\gravity_sensor'

 *  The terminal process terminated with exit code: 1. 
 *  Terminal will be reused by tasks, press any key to close it.

What am I doing wrong?

  • I reanalyzed the issue and noticed that the error might have been due to using HWMv1 instead of HWMv2. So, I created a new board using the nRF Connect tool in VS Code, which generated the files according to the new protocol.

    boards
    └── my_company
        └── my_board.overlay
        └── my_board
            ├── board.cmake
            ├── board.yml
            ├── my_board_defconfig
            ├── my_board-pinctrl.dtsi
            ├── my_board.dts
            ├── my_board.yml
            ├── Kcongig.defconfif
            ├── Kcongig.my_board
            └── pre_dt_noard.cmake

    I copied the new files into my project, but during compilation, I still encounter errors, different from the previous ones:

    -- west build: generating a build system
    Loading Zephyr module(s) (Zephyr base): sysbuild_default
    -- Found Python3: C:/ncs/toolchains/b620d30767/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.9.0/zephyr/.cache
    -- Found west (found suitable version "1.2.0", minimum required is "0.14.0")
    -- Board: gravity_sensor, qualifiers: nrf52840
    Parsing C:/ncs/v2.9.0/zephyr/share/sysbuild/Kconfig
    Loaded configuration 'C:/Users/Andrea/Desktop/gravity_sensor/build/_sysbuild/empty.conf'
    Merged configuration 'c:/Users/Andrea/Desktop/gravity_sensor/sysbuild.conf'
    Configuration saved to 'C:/Users/Andrea/Desktop/gravity_sensor/build/zephyr/.config'
    Kconfig header saved to 'C:/Users/Andrea/Desktop/gravity_sensor/build/_sysbuild/autoconf.h'
    -- 
       *****************************
       * Running CMake for mcuboot *
       *****************************
    
    Loading Zephyr default modules (Zephyr base).
    -- Application: C:/ncs/v2.9.0/bootloader/mcuboot/boot/zephyr
    -- CMake version: 3.21.0
    -- Found Python3: C:/ncs/toolchains/b620d30767/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.9.0/zephyr/.cache
    -- Zephyr version: 3.7.99 (C:/ncs/v2.9.0/zephyr)
    -- Found west (found suitable version "1.2.0", minimum required is "0.14.0")
    -- Board: gravity_sensor, qualifiers: nrf52840
    -- Found host-tools: zephyr 0.17.0 (C:/ncs/toolchains/b620d30767/opt/zephyr-sdk)
    -- Found toolchain: zephyr 0.17.0 (C:/ncs/toolchains/b620d30767/opt/zephyr-sdk)
    -- Found Dtc: C:/ncs/toolchains/b620d30767/opt/bin/dtc.exe (found suitable version "1.4.7", minimum required is "1.4.6") 
    -- Found BOARD.dts: C:/Users/Andrea/Desktop/gravity_sensor/boards/ardesia_technologies/gravity_sensor/gravity_sensor.dts
    -- Generated zephyr.dts: C:/Users/Andrea/Desktop/gravity_sensor/build/mcuboot/zephyr/zephyr.dts
    -- Generated devicetree_generated.h: C:/Users/Andrea/Desktop/gravity_sensor/build/mcuboot/zephyr/include/generated/zephyr/devicetree_generated.h
    -- Including generated dts.cmake file: C:/Users/Andrea/Desktop/gravity_sensor/build/mcuboot/zephyr/dts.cmake
    
    warning: HW_STACK_PROTECTION (defined at
    C:/ncs/v2.9.0/zephyr/soc/nxp/s32\s32k1\Kconfig.defconfig:20, arch/Kconfig:283) was assigned the
    value 'y' but got the value 'n'. Check these unsatisfied dependencies: ((SOC_SERIES_S32K1 &&
    SOC_FAMILY_NXP_S32) || ARCH_HAS_STACK_PROTECTION) (=n). See
    http://docs.zephyrproject.org/latest/kconfig.html#CONFIG_HW_STACK_PROTECTION and/or look up
    HW_STACK_PROTECTION 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: ARM_MPU (defined at C:/ncs/v2.9.0/zephyr/arch/arm64\core\cortex_r/Kconfig:10,
    C:/ncs/v2.9.0/zephyr/arch/arm\core\mpu/Kconfig:8) was assigned the value 'y' but got the value 'n'.
    Check these unsatisfied dependencies: ((CPU_HAS_MPU && CPU_AARCH64_CORTEX_R && ARM64) ||
    (CPU_HAS_MPU && ARM)) (=n). See http://docs.zephyrproject.org/latest/kconfig.html#CONFIG_ARM_MPU
    and/or look up ARM_MPU 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.9.0/bootloader/mcuboot/boot/zephyr/Kconfig:995), with value y, direct dependencies y (value: y)
    Parsing C:/ncs/v2.9.0/bootloader/mcuboot/boot/zephyr/Kconfig
    Loaded configuration 'C:/Users/Andrea/Desktop/gravity_sensor/boards/ardesia_technologies/gravity_sensor/gravity_sensor_defconfig'
    Merged configuration 'C:/Users/Andrea/Desktop/gravity_sensor/sysbuild/mcuboot/prj.conf'
    Merged configuration 'C:/Users/Andrea/Desktop/gravity_sensor/build/mcuboot/zephyr/.config.sysbuild'
    
    error: Aborting due to Kconfig warnings
    
    CMake Error at C:/ncs/v2.9.0/zephyr/cmake/modules/kconfig.cmake:396 (message):
      command failed with return code: 1
    Call Stack (most recent call first):
      C:/ncs/v2.9.0/nrf/cmake/modules/kconfig.cmake:29 (include)
      C:/ncs/v2.9.0/zephyr/cmake/modules/zephyr_default.cmake:133 (include)
      C:/ncs/v2.9.0/zephyr/share/zephyr-package/cmake/ZephyrConfig.cmake:66 (include)
      C:/ncs/v2.9.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.9.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.9.0/zephyr/share/zephyr-package/cmake/ZephyrConfig.cmake:75 (include)
      C:/ncs/v2.9.0/zephyr/share/zephyr-package/cmake/ZephyrConfig.cmake:92 (include_boilerplate)
      C:/ncs/v2.9.0/zephyr/share/sysbuild-package/cmake/SysbuildConfig.cmake:8 (include)
      template/CMakeLists.txt:10 (find_package)
    
    
    -- Configuring incomplete, errors occurred!
    See also "C:/Users/Andrea/Desktop/gravity_sensor/build/CMakeFiles/CMakeOutput.log".
    FATAL ERROR: command exited with status 1: 'C:\ncs\toolchains\b620d30767\opt\bin\cmake.EXE' -DWEST_PYTHON=C:/ncs/toolchains/b620d30767/opt/bin/python.exe '-Bc:\Users\Andrea\Desktop\gravity_sensor\build' -GNinja -DBOARD=gravity_sensor/nrf52840 -DNCS_TOOLCHAIN_VERSION=NONE -DBOARD_ROOT=c:/users/andrea/desktop/gravity_sensor '-SC:\ncs\v2.9.0\zephyr\share\sysbuild' '-DAPP_DIR:PATH=c:\Users\Andrea\Desktop\gravity_sensor'
    
     *  The terminal process terminated with exit code: 1. 
     *  Terminal will be reused by tasks, press any key to close it.

  • Hi,

    From what I understand, the first step is to delete the child_image folder, create a sysbuild folder, and add a sysbuild.conf file. But what exactly should I include in these two elements, and what modifications, if any, do I need to make to prj.conf and CMakeLists.txt?

    Yes, this is correct. You'll need to move the child_image overlays and configurations present within the child_image folder and place them within the sysbuild folder which contains the new companion components, which replaces the child_image system.

    In addition, you need to consult the sysbuild migration guide https://docs.nordicsemi.com/bundle/ncs-latest/page/nrf/releases_and_maturity/migration/migration_sysbuild.html and the three links here:

    The last link, sysbuild forced options, shows a list of which options that were previously defined within prj.conf that you now need to add to sysbuild.conf. If these configurations are present within prj.conf but not within sysbuild.conf they will be ignored.

    project as follows:

    The structure looks good to me at first glance, but I need to check up on the individual configuration for sysbuild for the various boards. I believe that there might be some limitations there.

    Andrea Verdecchia said:
    I reanalyzed the issue and noticed that the error might have been due to using HWMv1 instead of HWMv2. So,

    Yup, that is correct! As the warning states: 

    ---------------------------------------------------------------------
    --- WARNING: Functionality to describe SoCs in HWMv1 is ---
    --- deprecated and should be replaced with HWMv2, including ---
    --- boards. HWMv1 SoCs support remains only to ease the migration ---
    --- of out-of-tree SoCs and associated boards. It will not be ---
    --- possible to build using HWMv1 SoCs at all in future releases. ---
    ---------------------------------------------------------------------

    There's a guide for how to migrate here: https://docs.nordicsemi.com/bundle/ncs-latest/page/nrf/releases_and_maturity/migration/migration_hwmv2.htm

    Andrea Verdecchia said:
    I copied the new files into my project, but during compilation, I still encounter errors, different from the previous ones:

    The next set of warnings seems to be Kconfig related, i.e "error: Aborting due to Kconfig warnings". This is most likely due to either changes in the configurations in between the upmerge you've done, or that there is something that should've been a SB_Configuration instead of a prj.configuration. It will require some manual labour from you to go through the migration notes for the respective versions you've gone through.

    Let me know if this is enough to get you pointed, and I'll get back to you w.r.t the multiple sysbuild/board configurations.

    Kind regards,
    Andreas

  • Thank you very much for your advice. I checked the links you sent me and reviewed everything. In my opinion, everything should be configured correctly, but I keep getting errors/warnings regarding some configurations in prj.conf and in the file generated by the nRF Connect script for VS Code when creating the board from scratch: CONFIG_ARM_MPU, CONFIG_HW_STACK_PROTECTION, CONFIG_FLASH_MAP, etc.

    warning: HW_STACK_PROTECTION (defined at
    C:/ncs/v2.9.0/zephyr/soc/nxp/s32\s32k1\Kconfig.defconfig:20, arch/Kconfig:283) was assigned the
    value 'y' but got the value 'n'. Check these unsatisfied dependencies: ((SOC_SERIES_S32K1 &&
    SOC_FAMILY_NXP_S32) || ARCH_HAS_STACK_PROTECTION) (=n). See
    http://docs.zephyrproject.org/latest/kconfig.html#CONFIG_HW_STACK_PROTECTION and/or look up
    HW_STACK_PROTECTION 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: ARM_MPU (defined at C:/ncs/v2.9.0/zephyr/arch/arm64\core\cortex_r/Kconfig:10,
    C:/ncs/v2.9.0/zephyr/arch/arm\core\mpu/Kconfig:8) was assigned the value 'y' but got the value 'n'.
    Check these unsatisfied dependencies: ((CPU_HAS_MPU && CPU_AARCH64_CORTEX_R && ARM64) ||
    (CPU_HAS_MPU && ARM)) (=n). See http://docs.zephyrproject.org/latest/kconfig.html#CONFIG_ARM_MPU
    and/or look up ARM_MPU 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.9.0/bootloader/mcuboot/boot/zephyr/Kconfig:995), with value y, direct dependencies y (value: y)
    
    error: Aborting due to Kconfig warnings

    If you want to take a look, I have stripped my project down to the bare minimum, keeping only the structure and configuration files intact. I am trying to use NCS 2.9.0. You can find the project here.

  • Hi,

    Just FYI, the sysbuild course was just released on the academy pages https://academy.nordicsemi.com/courses/nrf-connect-sdk-intermediate/lessons/lesson-8-sysbuild/ 

    AHaug said:
    but I need to check up on the individual configuration for sysbuild for the various boards. I believe that there might be some limitations there.

    It does look like we don't support individual sysbuild configurations for the various boards as of now, meaning that sysbuild/mcuboot/boards does not work in sysbuild as of now. This worked with child_image because Key was an MCUboot-specific options, but now it is a sysbuild option. 

    Could you strip down the port of your application even further and see if you're able to make it work without sysbuild specific board configurations, i.e this:

    I've also started an ongoing internal discussion w.r.t this is possible, but if you're able to get the latest suggestion compiling and flashing (and to whatever extent it will be running), then the root case is indeed this.

    Kind regards,
    Andreas

  • Looks like the individual board configuration is working as it should. Issue should not be there. See https://github.com/nrfconnect/sdk-nrf/tree/main/samples/nrf5340/extxip_smp_svr/sysbuild/mcuboot as an example.

    This loops back to having to individually go through the configurations to isolate the issue.

    Kind regards,
    Andreas

Related