Migrating to sysbuild (NCS 2.8.0) results in CMake error

I'm in the process of migrating my project from NCS 2.6.1 to 2.8.0.

My project consists of a BLE application with MCUBoot as the only boot loader.

I've already updated my code so it compiles with HWMv1 and parent/child images under NCS 2.8.0.

I'm now trying to migrate the build system to sysbuild. Therefore I've made the following changes:

1. Moved child_image/mcuboot.conf to sysbuild/mcuboot.conf

2. Removed CONFIG_BOOTLOADER_MCUBOOT=y from the main prj.conf

3. Added a sysbuild.conf with the following contents:

SB_CONFIG_BOOTLOADER_MCUBOOT=y
SB_CONFG_BOOT_SIGNATURE_TYPE_ECDSA_P256=y
SB_CONFIG_PARTITION_MANAGER=y
SB_CONFIG_DFU_ZIP=y
SB_CONFG_DFU_ZIP_APP=y

When I now try to build the project I get the following error:

FATAL ERROR: command exited with status 1: <long command>

The only error that I can find is all the way at the top:

CMake Error at C:/Users/rpoel/Documents/SRC/T502534-FIRMWARE-Nordic-nRF528xx/external/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:/Users/rpoel/Documents/SRC/T502534-FIRMWARE-Nordic-nRF528xx/external/zephyr/share/zephyr-package/cmake/ZephyrConfig.cmake:75 (include)
  C:/Users/rpoel/Documents/SRC/T502534-FIRMWARE-Nordic-nRF528xx/external/zephyr/share/zephyr-package/cmake/ZephyrConfig.cmake:92 (include_boilerplate)
  C:/Users/rpoel/Documents/SRC/T502534-FIRMWARE-Nordic-nRF528xx/external/zephyr/share/sysbuild-package/cmake/SysbuildConfig.cmake:8 (include)
  template/CMakeLists.txt:10 (find_package)

How can I resolve this error?

Thanks in advance.

Kind regards,

Remco Poelstra

Parents
  • Hi,

    Check out the typo.

    SB_CONFG_BOOT_SIGNATURE_TYPE_ECDSA_P256=y

    It's SB_CONFIG_BOOT_SIGNATURE_TYPE_ECDSA_P256.

     

    SB_CONFG_DFU_ZIP_APP=y

    It's SB_CONFIG_DFU_ZIP_APP.

    Regards,
    Amanda H.

  • Ah, stupid me.

    Unfortunately, correcting that makes no difference in the build error.

    This is the part that generates the error:

      # Calculate the secure board target when building for non-secure board targets
      string(REPLACE "/" ";" split_board_qualifiers "${BOARD_QUALIFIERS}")
      list(GET split_board_qualifiers 1 target_soc) # <--------------------- This is line 117.

    Does that provide any clue to what might be wrong? The board definition is found and a full DTS is constructed by Cmake.

  • What is the nRF Chip on your board? Are you using the board target definition for a non-secure build?

    Please be aware that nRF52 chips don't support non-secure build.

    The error suggests that the BOARD_QUALIFIERS string doesn't contain the expected number of elements when split by "/". This could happen if your board target is not correctly defined.

    To resolve this, ensure that your board target is correctly defined and follows the expected format. For example, if you're using a custom board based on nRF52840, your board target should look something like customboard_nrf52840. See this DevAcademy course: Adding custom board support

  • Thanks for the suggestion.

    I updated my custom board to include the chip identifier. This didn't help.

    I added a `message(BOARD="${BOARD_QUALIFIERS}")` line in the CMakeLists.txt and it shows that the BOARD_QUALIFIERS variable is empty:  'BOARDS=""'.

    Though, the log output shows a few lines earlier: "-- Board: t502534_nrf52840", so I think it finds the board just fine.

    I'm not sure what's the difference between a secure and non-secure build. How is this related to the issue I'm seeing here?

Reply
  • Thanks for the suggestion.

    I updated my custom board to include the chip identifier. This didn't help.

    I added a `message(BOARD="${BOARD_QUALIFIERS}")` line in the CMakeLists.txt and it shows that the BOARD_QUALIFIERS variable is empty:  'BOARDS=""'.

    Though, the log output shows a few lines earlier: "-- Board: t502534_nrf52840", so I think it finds the board just fine.

    I'm not sure what's the difference between a secure and non-secure build. How is this related to the issue I'm seeing here?

Children
Related