Hello,
I'm trying to add MCUBoot with sysbuild to my application (nRF Connect SDK 2.9.1). I have added sysbuild.conf (in the project's root directory), with single line to enable mcuboot:
SB_CONFIG_BOOTLOADER_MCUBOOT=y
but I have noticed, that my project cannot compile if I don't use --no-sysbuild in the build command. I'm getting following errors:
CMake Error at (...)/zephyr/cmake/modules/extensions.cmake:1890 (file):
file STRINGS file
(...)/zephyr/.config" cannot be read.
Call Stack (most recent call first): cmake/modules/sysbuild_extensions.cmake:520 (import_kconfig) cmake/modules/sysbuild_images.cmake:20 (ExternalZephyrProject_Cmake) cmake/modules/sysbuild_default.cmake:20 (include)
(...)/zephyr/share/zephyr-package/cmake/ZephyrConfig.cmake:75 (include)
(...)/zephyr/share/zephyr-package/cmake/ZephyrConfig.cmake:92 (include_boilerplate)
(...)/zephyr/share/sysbuild-package/cmake/SysbuildConfig.cmake:8 (include)
template/CMakeLists.txt:10 (find_package)
CMake Error at (...)/nrf/cmake/sysbuild/partition_manager.cmake:562 (math): math cannot parse the expression: " * 1024": syntax error, unexpected exp_TIMES (2).Call Stack (most recent call first): (...)/nrf/sysbuild/CMakeLists.txt:703 (include) cmake/modules/sysbuild_extensions.cmake:583 (nrf_POST_CMAKE) cmake/modules/sysbuild_extensions.cmake:583 (cmake_language) cmake/modules/sysbuild_images.cmake:23 (sysbuild_module_call) cmake/modules/sysbuild_default.cmake:20 (include) (...)/zephyr/share/zephyr-package/cmake/ZephyrConfig.cmake:75 (include) (...)/zephyr/share/zephyr-package/cmake/ZephyrConfig.cmake:92 (include_boilerplate) (...)/zephyr/share/sysbuild-package/cmake/SysbuildConfig.cmake:8 (include) template/CMakeLists.txt:10 (find_package)
CMake Warning at (...)/nrf/cmake/sysbuild/partition_manager.cmake:106 (message):
--------------------------------------------------------------------- --- WARNING: Using a bootloader without pm_static.yml. --- --- There are cases where a deployed product can consist of --- --- multiple images, and only a subset of these images can be --- --- upgraded through a firmware update mechanism. In such cases, --- --- the upgradable images must have partitions that are static --- --- and are matching the partition map used by the bootloader --- --- programmed onto the device. --- ---------------------------------------------------------------------
Call Stack (most recent call first): (...)/nrf/cmake/sysbuild/partition_manager.cmake:634 (partition_manager) (...)/nrf/sysbuild/CMakeLists.txt:703 (include) cmake/modules/sysbuild_extensions.cmake:583 (nrf_POST_CMAKE) cmake/modules/sysbuild_extensions.cmake:583 (cmake_language) cmake/modules/sysbuild_images.cmake:23 (sysbuild_module_call) cmake/modules/sysbuild_default.cmake:20 (include) (...)/zephyr/share/zephyr-package/cmake/ZephyrConfig.cmake:75 (include) (...)/zephyr/share/zephyr-package/cmake/ZephyrConfig.cmake:92 (include_boilerplate) (...)/zephyr/share/sysbuild-package/cmake/SysbuildConfig.cmake:8 (include) template/CMakeLists.txt:10 (find_package)
usage: partition_manager.py [-h] --sram_primary-size SRAM_PRIMARY_SIZE [--sram_primary-base-address SRAM_PRIMARY_BASE_ADDRESS] [--sram_primary-placement-strategy {start_to_end,end_to_start,complex}] [--sram_primary-device SRAM_PRIMARY_DEVICE] [--sram_primary-default-driver-kconfig SRAM_PRIMARY_DEFAULT_DRIVER_KCONFIG] [--sram_primary-dynamic-partition SRAM_PRIMARY_DYNAMIC_PARTITION] --flash_primary-size FLASH_PRIMARY_SIZE [--flash_primary-base-address FLASH_PRIMARY_BASE_ADDRESS] [--flash_primary-placement-strategy {start_to_end,end_to_start,complex}] [--flash_primary-device FLASH_PRIMARY_DEVICE] [--flash_primary-default-driver-kconfig FLASH_PRIMARY_DEFAULT_DRIVER_KCONFIG] [--flash_primary-dynamic-partition FLASH_PRIMARY_DYNAMIC_PARTITION]partition_manager.py: error: argument --sram_primary-size: expected one argument
CMake Error at (...)/nrf/cmake/sysbuild/partition_manager.cmake:167 (message): Partition Manager failed, aborting.
Call Stack (most recent call first):
(...)/nrf/cmake/sysbuild/partition_manager.cmake:634 (partition_manager)
(...)/nrf/sysbuild/CMakeLists.txt:703 (include)
cmake/modules/sysbuild_extensions.cmake:583 (nrf_POST_CMAKE) cmake/modules/sysbuild_extensions.cmake:583 (cmake_language) cmake/modules/sysbuild_images.cmake:23 (sysbuild_module_call) cmake/modules/sysbuild_default.cmake:20 (include)
(...)/zephyr/share/zephyr-package/cmake/ZephyrConfig.cmake:75 (include)
(...)/zephyr/share/zephyr-package/cmake/ZephyrConfig.cmake:92 (include_boilerplate)
(...)/zephyr/share/sysbuild-package/cmake/SysbuildConfig.cmake:8 (include)
template/CMakeLists.txt:10 (find_package)
Could you advise what can be the possible reason? I've been trying to add pm_static.yml with the partitions' definition, but it did not help, it seems as if it did not take it into account, since 'size' was not missing for any of the partitions.
I have tested this on Blinky sample and it compiled correctly with enabled sysbuild, but for some reason it's failing with my project
I will be grateful for any advice that you could provide.
Jacob