Partition manager error when trying to add secure bootloader to netcore with custom net core image

I'm trying to run a custom image on the net core. I've successfully done so using the following exercise in the intermediate course:
lesson 8 exercise 2
however when trying to add the B0n secure bootloader to the netcore, I'm running into some issues. When trying to build i get the following error:

-- Found partition manager static configuration : /home/Jonas/projects/fw_update/fw_update_firmware/pm_static.yml
Partition 'mcuboot' is not included in the dynamic resolving since it is statically defined.
Traceback (most recent call last):
  File "/home/Jonas/projects/fw_update/nrf/scripts/partition_manager.py", line 1054, in <module>
    main()
  File "/home/Jonas/projects/fw_update/nrf/scripts/partition_manager.py", line 1022, in main
    args, ranges_configuration = parse_args()
                                 ^^^^^^^^^^^^
  File "/home/Jonas/projects/fw_update/nrf/scripts/partition_manager.py", line 928, in parse_args
    parser.add_argument(f'--{x}-size', required=True, type=lambda z: int(z, 0))
  File "/usr/lib/python3.12/argparse.py", line 1507, in add_argument
    return self._add_action(action)
           ^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.12/argparse.py", line 1889, in _add_action
    self._optionals._add_action(action)
  File "/usr/lib/python3.12/argparse.py", line 1709, in _add_action
    action = super(_ArgumentGroup, self)._add_action(action)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.12/argparse.py", line 1521, in _add_action
    self._check_conflict(action)
  File "/usr/lib/python3.12/argparse.py", line 1658, in _check_conflict
    conflict_handler(action, confl_optionals)
  File "/usr/lib/python3.12/argparse.py", line 1667, in _handle_conflict_error
    raise ArgumentError(action, message % conflict_string)
argparse.ArgumentError: argument --sram_primary-size: conflicting option string: --sram_primary-size
CMake Error at /home/Jonas/projects/fw_update/nrf/cmake/sysbuild/partition_manager.cmake:179 (message):
  Partition Manager failed, aborting.  Command:
  /home/Jonas/projects/.venv/bin/python3;/home/Jonas/projects/fw_update/nrf/scripts/partition_manager.py;--input-files;/home/Jonas/projects/fw_update/fw_update_firmware/build/b0n/zephyr/include/generated/pm.yml;/home/Jonas/projects/fw_update/fw_update_firmware/build/b0n/modules/nrf/subsys/partition_manager/pm.yml.secure_boot_storage;/home/Jonas/projects/fw_update/fw_update_firmware/build/zephyr/include/generated/pm.yml;/home/Jonas/projects/fw_update/fw_update_firmware/build/b0n/zephyr/include/generated/pm.yml;/home/Jonas/projects/fw_update/fw_update_firmware/build/b0n/modules/nrf/subsys/partition_manager/pm.yml.secure_boot_storage;/home/Jonas/projects/fw_update/fw_update_firmware/build/zephyr/include/generated/pm.yml;--regions;sram_primary;flash_primary;sram_primary;flash_primary;--output-partitions;/home/Jonas/projects/fw_update/fw_update_firmware/build/partitions_CPUNET.yml;--output-regions;/home/Jonas/projects/fw_update/fw_update_firmware/build/regions_CPUNET.yml;--flash_primary-dynamic-partition;custom_net_image;--sram_primary-size;0x10000;--sram_primary-base-address;0x21000000;--sram_primary-placement-strategy;complex;--sram_primary-dynamic-partition;sram_primary;--flash_primary-size;0x40000;--flash_primary-base-address;0x1000000;--flash_primary-placement-strategy;complex;--flash_primary-device;flash_controller;--flash_primary-default-driver-kconfig;CONFIG_SOC_FLASH_NRF;--sram_primary-size;0x10000;--sram_primary-base-address;0x21000000;--sram_primary-placement-strategy;complex;--sram_primary-dynamic-partition;sram_primary;--flash_primary-size;0x40000;--flash_primary-base-address;0x1000000;--flash_primary-placement-strategy;complex;--flash_primary-device;flash_controller;--flash_primary-default-driver-kconfig;CONFIG_SOC_FLASH_NRF
Call Stack (most recent call first):
  /home/Jonas/projects/fw_update/nrf/cmake/sysbuild/partition_manager.cmake:639 (partition_manager)
  /home/Jonas/projects/fw_update/nrf/sysbuild/CMakeLists.txt:826 (include)
  cmake/modules/sysbuild_extensions.cmake:598 (nrf_POST_CMAKE)
  cmake/modules/sysbuild_extensions.cmake:598 (cmake_language)
  cmake/modules/sysbuild_images.cmake:46 (sysbuild_module_call)
  cmake/modules/sysbuild_default.cmake:21 (include)
  /home/Jonas/projects/fw_update/zephyr/share/zephyr-package/cmake/ZephyrConfig.cmake:75 (include)
  /home/Jonas/projects/fw_update/zephyr/share/zephyr-package/cmake/ZephyrConfig.cmake:92 (include_boilerplate)
  /home/Jonas/projects/fw_update/zephyr/share/sysbuild-package/cmake/SysbuildConfig.cmake:8 (include)
  template/CMakeLists.txt:10 (find_package)


-- Configuring incomplete, errors occurred!
FATAL ERROR: command exited with status 1: /usr/bin/cmake -DWEST_PYTHON=/home/Jonas/projects/.venv/bin/python3 -B/home/Jonas/projects/fw_update/fw_update_firmware/build -GNinja -DBOARD=nrf7002dk/nrf5340/cpuapp -S/home/Jonas/projects/fw_update/zephyr/share/sysbuild -DAPP_DIR:PATH=/home/Jonas/projects/fw_update/fw_update_firmware


I'm using NCS version 3.1.0 and build for the nrf7002dk/nrf5340/cpuapp 
with the following configurations:
prj.conf
CONFIG_GPIO=y

## partition manager ##
CONFIG_BOOTLOADER_MCUBOOT=y
CONFIG_FLASH=y
CONFIG_STREAM_FLASH=y
CONFIG_FLASH_MAP=y
CONFIG_IMG_MANAGER=y
CONFIG_MCUBOOT_IMG_MANAGER=y

# Enable Network Core on application core startup
CONFIG_SOC_NRF53_CPUNET_ENABLE=y

## logging ##
# Enable logging
CONFIG_LOG=y

# Enable UART console
CONFIG_UART_CONSOLE=y

# Disable RTT console (if previously enabled)
CONFIG_RTT_CONSOLE=n

# Set the logging backend to UART
CONFIG_LOG_BACKEND_UART=y
CONFIG_USE_SEGGER_RTT=n
CONFIG_LOG_BACKEND_RTT=n

sysbuild.cmake:
ExternalZephyrProject_Add(
  APPLICATION custom_net_image
  SOURCE_DIR ${APP_DIR}/../custom_net_image
  BOARD nrf5340dk/nrf5340/cpunet
)

set_property(GLOBAL APPEND PROPERTY PM_DOMAINS CPUNET)
set_property(GLOBAL APPEND PROPERTY PM_CPUNET_IMAGES custom_net_image)
set_property(GLOBAL PROPERTY DOMAIN_APP_CPUNET custom_net_image)
set(CPUNET_PM_DOMAIN_DYNAMIC_PARTITION custom_net_image CACHE INTERNAL "")

add_dependencies(${DEFAULT_IMAGE} custom_net_image)
sysbuild_add_dependencies(FLASH ${DEFAULT_IMAGE} custom_net_image)

sysbuild.conf:

## bootloader mcuboot ##
SB_CONFIG_BOOTLOADER_MCUBOOT=y

## secure boot network core ##
SB_CONFIG_SECURE_BOOT_NETCORE=y

pm_static.yml:
mcuboot:
  address: 0x0
  size: 0x10000  # 64 KB (increase as needed, default is often 48 KB, try 56 KB: 0xe000)
  region: flash_primary


What could be causing this error? And how could i resolve it?
Thanks in advance for the support.

Parents
  • Hi,

     

    If you remove (or just rename) your pm_static.yml, then delete your build folder (not just pristine build!), and then reconfigure the prj, do you still see the same build error?

    If yes, please post the full build cmd + build log.

     

    PS: the solution for this exercise is available here on github https://github.com/NordicDeveloperAcademy/ncs-inter/tree/main/l8/l8_e2_sol 

     

    Kind regards,

    Håkon

  • Unfortunately that didn't resolve the issue, here are the build cmd im using and the build log. i have also included a .zip of my project.

    cmd:

    west build -b nrf7002dk/nrf5340/cpuapp --pristine

    build log:

    -- west build: generating a build system
    Loading Zephyr module(s) (Zephyr base): sysbuild_default
    -- Found Python3: /home/Jonas/projects/.venv/bin/python3 (found suitable version "3.12.3", minimum required is "3.10") found components: Interpreter 
    -- Cache files will be written to: /home/Jonas/.cache/zephyr
    -- Found west (found suitable version "1.5.0", minimum required is "0.14.0")
    -- Board: nrf7002dk, qualifiers: nrf5340/cpuapp
    Parsing /home/Jonas/projects/fw_update/zephyr/share/sysbuild/Kconfig
    Loaded configuration '/home/Jonas/projects/fw_update/fota_test/build/_sysbuild/empty.conf'
    Merged configuration '/home/Jonas/projects/fw_update/fota_test/sysbuild.conf'
    Configuration saved to '/home/Jonas/projects/fw_update/fota_test/build/zephyr/.config'
    Kconfig header saved to '/home/Jonas/projects/fw_update/fota_test/build/_sysbuild/autoconf.h'
    -- 
       *****************************
       * Running CMake for mcuboot *
       *****************************
    
    Loading Zephyr default modules (Zephyr base).
    -- Application: /home/Jonas/projects/fw_update/bootloader/mcuboot/boot/zephyr
    -- CMake version: 3.28.3
    -- Found Python3: /home/Jonas/projects/.venv/bin/python (found suitable version "3.12.3", minimum required is "3.10") found components: Interpreter 
    -- Cache files will be written to: /home/Jonas/.cache/zephyr
    -- Zephyr version: 4.1.99 (/home/Jonas/projects/fw_update/zephyr)
    -- Found west (found suitable version "1.5.0", minimum required is "0.14.0")
    -- Board: nrf7002dk, qualifiers: nrf5340/cpuapp
    -- ZEPHYR_TOOLCHAIN_VARIANT not set, trying to locate Zephyr SDK
    -- Found host-tools: zephyr 0.17.4 (/home/Jonas/zephyr-sdk-0.17.4)
    -- Found toolchain: zephyr 0.17.4 (/home/Jonas/zephyr-sdk-0.17.4)
    -- Found Dtc: /home/Jonas/zephyr-sdk-0.17.4/sysroots/x86_64-pokysdk-linux/usr/bin/dtc (found suitable version "1.7.0", minimum required is "1.4.6") 
    -- Found BOARD.dts: /home/Jonas/projects/fw_update/zephyr/boards/nordic/nrf7002dk/nrf7002dk_nrf5340_cpuapp.dts
    -- Found devicetree overlay: /home/Jonas/projects/fw_update/fota_test/sysbuild/mcuboot.overlay
    -- Generated zephyr.dts: /home/Jonas/projects/fw_update/fota_test/build/mcuboot/zephyr/zephyr.dts
    -- Generated pickled edt: /home/Jonas/projects/fw_update/fota_test/build/mcuboot/zephyr/edt.pickle
    -- Generated devicetree_generated.h: /home/Jonas/projects/fw_update/fota_test/build/mcuboot/zephyr/include/generated/zephyr/devicetree_generated.h
    
    warning: MBEDTLS_PSA_CRYPTO_EXTERNAL_RNG_ALLOW_NON_CSPRNG (defined at
    modules/mbedtls/Kconfig.mbedtls:606, modules/mbedtls/Kconfig.mbedtls:606) was assigned the value 'y'
    but got the value 'n'. Check these unsatisfied dependencies: ((MBEDTLS_PSA_CRYPTO_EXTERNAL_RNG &&
    MBEDTLS_BUILTIN && MBEDTLS_CFG_FILE = "config-mbedtls.h" && MBEDTLS) ||
    (MBEDTLS_PSA_CRYPTO_EXTERNAL_RNG && MBEDTLS_BUILTIN && MBEDTLS_CFG_FILE = "config-mbedtls.h" &&
    MBEDTLS && 0)) (=n). See http://docs.zephyrproject.org/latest/kconfig.html#CONFIG_MBEDTLS_PSA_CRYPTO
    _EXTERNAL_RNG_ALLOW_NON_CSPRNG and/or look up MBEDTLS_PSA_CRYPTO_EXTERNAL_RNG_ALLOW_NON_CSPRNG 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 MBEDTLS_PSA_CRYPTO_EXTERNAL_RNG (defined at
    modules/mbedtls/Kconfig.mbedtls:568, modules/mbedtls/Kconfig.mbedtls:568) was selected (set =y), but
    no symbol ended up as the choice selection. See
    http://docs.zephyrproject.org/latest/kconfig.html#CONFIG_MBEDTLS_PSA_CRYPTO_EXTERNAL_RNG and/or look
    up MBEDTLS_PSA_CRYPTO_EXTERNAL_RNG 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 /home/Jonas/projects/fw_update/bootloader/mcuboot/boot/zephyr/Kconfig
    Loaded configuration '/home/Jonas/projects/fw_update/zephyr/boards/nordic/nrf7002dk/nrf7002dk_nrf5340_cpuapp_defconfig'
    Merged configuration '/home/Jonas/projects/fw_update/bootloader/mcuboot/boot/zephyr/prj.conf'
    Merged configuration '/home/Jonas/projects/fw_update/bootloader/mcuboot/boot/zephyr/boards/nrf7002dk_nrf5340_cpuapp.conf'
    Merged configuration '/home/Jonas/projects/fw_update/fota_test/sysbuild/mcuboot.conf'
    Merged configuration '/home/Jonas/projects/fw_update/fota_test/build/mcuboot/zephyr/.config.sysbuild'
    Configuration saved to '/home/Jonas/projects/fw_update/fota_test/build/mcuboot/zephyr/.config'
    Kconfig header saved to '/home/Jonas/projects/fw_update/fota_test/build/mcuboot/zephyr/include/generated/zephyr/autoconf.h'
    -- Found GnuLd: /home/Jonas/zephyr-sdk-0.17.4/arm-zephyr-eabi/arm-zephyr-eabi/bin/ld.bfd (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: /home/Jonas/zephyr-sdk-0.17.4/arm-zephyr-eabi/bin/arm-zephyr-eabi-gcc
    -- Using ccache: /usr/bin/ccache
    -- Found gen_kobject_list: /home/Jonas/projects/fw_update/zephyr/scripts/build/gen_kobject_list.py
    MCUBoot bootloader key file: /home/Jonas/projects/fw_update/bootloader/mcuboot/root-rsa-2048.pem
    CMake Warning at CMakeLists.txt:412 (message):
      WARNING: Using default MCUboot signing key file, this file is for debug use
      only and is not secure!
    
    
    -- Configuring done (26.5s)
    -- Generating done (0.4s)
    -- Build files have been written to: /home/Jonas/projects/fw_update/fota_test/build/mcuboot
    -- 
       *************************
       * Running CMake for b0n *
       *************************
    
    Loading Zephyr default modules (Zephyr base).
    -- Application: /home/Jonas/projects/fw_update/nrf/samples/nrf5340/netboot
    -- CMake version: 3.28.3
    -- Found Python3: /home/Jonas/projects/.venv/bin/python (found suitable version "3.12.3", minimum required is "3.10") found components: Interpreter 
    -- Cache files will be written to: /home/Jonas/.cache/zephyr
    -- Zephyr version: 4.1.99 (/home/Jonas/projects/fw_update/zephyr)
    -- Found west (found suitable version "1.5.0", minimum required is "0.14.0")
    -- Board: nrf7002dk, qualifiers: nrf5340/cpunet
    -- ZEPHYR_TOOLCHAIN_VARIANT not set, trying to locate Zephyr SDK
    -- Found host-tools: zephyr 0.17.4 (/home/Jonas/zephyr-sdk-0.17.4)
    -- Found toolchain: zephyr 0.17.4 (/home/Jonas/zephyr-sdk-0.17.4)
    -- Found Dtc: /home/Jonas/zephyr-sdk-0.17.4/sysroots/x86_64-pokysdk-linux/usr/bin/dtc (found suitable version "1.7.0", minimum required is "1.4.6") 
    -- Found BOARD.dts: /home/Jonas/projects/fw_update/zephyr/boards/nordic/nrf7002dk/nrf7002dk_nrf5340_cpunet.dts
    -- Generated zephyr.dts: /home/Jonas/projects/fw_update/fota_test/build/b0n/zephyr/zephyr.dts
    -- Generated pickled edt: /home/Jonas/projects/fw_update/fota_test/build/b0n/zephyr/edt.pickle
    -- Generated devicetree_generated.h: /home/Jonas/projects/fw_update/fota_test/build/b0n/zephyr/include/generated/zephyr/devicetree_generated.h
    Parsing /home/Jonas/projects/fw_update/nrf/samples/nrf5340/netboot/Kconfig
    Loaded configuration '/home/Jonas/projects/fw_update/zephyr/boards/nordic/nrf7002dk/nrf7002dk_nrf5340_cpunet_defconfig'
    Merged configuration '/home/Jonas/projects/fw_update/nrf/samples/nrf5340/netboot/prj.conf'
    Merged configuration '/home/Jonas/projects/fw_update/fota_test/build/b0n/zephyr/.config.sysbuild'
    Configuration saved to '/home/Jonas/projects/fw_update/fota_test/build/b0n/zephyr/.config'
    Kconfig header saved to '/home/Jonas/projects/fw_update/fota_test/build/b0n/zephyr/include/generated/zephyr/autoconf.h'
    -- Found GnuLd: /home/Jonas/zephyr-sdk-0.17.4/arm-zephyr-eabi/arm-zephyr-eabi/bin/ld.bfd (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: /home/Jonas/zephyr-sdk-0.17.4/arm-zephyr-eabi/bin/arm-zephyr-eabi-gcc
    -- Using ccache: /usr/bin/ccache
    -- Found gen_kobject_list: /home/Jonas/projects/fw_update/zephyr/scripts/build/gen_kobject_list.py
    CMake Warning at /home/Jonas/projects/fw_update/zephyr/CMakeLists.txt:2232 (message):
      __ASSERT() statements are globally ENABLED
    
    
    -- Configuring done (20.3s)
    -- Generating done (0.3s)
    -- Build files have been written to: /home/Jonas/projects/fw_update/fota_test/build/b0n
    -- 
       **************************************
       * Running CMake for custom_net_image *
       **************************************
    
    Loading Zephyr default modules (Zephyr base).
    -- Application: /home/Jonas/projects/fw_update/custom_net_image
    -- CMake version: 3.28.3
    -- Found Python3: /home/Jonas/projects/.venv/bin/python (found suitable version "3.12.3", minimum required is "3.10") found components: Interpreter 
    -- Cache files will be written to: /home/Jonas/.cache/zephyr
    -- Zephyr version: 4.1.99 (/home/Jonas/projects/fw_update/zephyr)
    -- Found west (found suitable version "1.5.0", minimum required is "0.14.0")
    -- Board: nrf5340dk, qualifiers: nrf5340/cpunet
    -- ZEPHYR_TOOLCHAIN_VARIANT not set, trying to locate Zephyr SDK
    -- Found host-tools: zephyr 0.17.4 (/home/Jonas/zephyr-sdk-0.17.4)
    -- Found toolchain: zephyr 0.17.4 (/home/Jonas/zephyr-sdk-0.17.4)
    -- Found Dtc: /home/Jonas/zephyr-sdk-0.17.4/sysroots/x86_64-pokysdk-linux/usr/bin/dtc (found suitable version "1.7.0", minimum required is "1.4.6") 
    -- Found BOARD.dts: /home/Jonas/projects/fw_update/zephyr/boards/nordic/nrf5340dk/nrf5340dk_nrf5340_cpunet.dts
    -- Generated zephyr.dts: /home/Jonas/projects/fw_update/fota_test/build/custom_net_image/zephyr/zephyr.dts
    -- Generated pickled edt: /home/Jonas/projects/fw_update/fota_test/build/custom_net_image/zephyr/edt.pickle
    -- Generated devicetree_generated.h: /home/Jonas/projects/fw_update/fota_test/build/custom_net_image/zephyr/include/generated/zephyr/devicetree_generated.h
    Parsing /home/Jonas/projects/fw_update/zephyr/Kconfig
    Loaded configuration '/home/Jonas/projects/fw_update/zephyr/boards/nordic/nrf5340dk/nrf5340dk_nrf5340_cpunet_defconfig'
    Merged configuration '/home/Jonas/projects/fw_update/custom_net_image/prj.conf'
    Merged configuration '/home/Jonas/projects/fw_update/fota_test/build/custom_net_image/zephyr/.config.sysbuild'
    Configuration saved to '/home/Jonas/projects/fw_update/fota_test/build/custom_net_image/zephyr/.config'
    Kconfig header saved to '/home/Jonas/projects/fw_update/fota_test/build/custom_net_image/zephyr/include/generated/zephyr/autoconf.h'
    -- Found GnuLd: /home/Jonas/zephyr-sdk-0.17.4/arm-zephyr-eabi/arm-zephyr-eabi/bin/ld.bfd (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: /home/Jonas/zephyr-sdk-0.17.4/arm-zephyr-eabi/bin/arm-zephyr-eabi-gcc
    -- Using ccache: /usr/bin/ccache
    -- Found gen_kobject_list: /home/Jonas/projects/fw_update/zephyr/scripts/build/gen_kobject_list.py
    -- Configuring done (19.6s)
    -- Generating done (0.3s)
    -- Build files have been written to: /home/Jonas/projects/fw_update/fota_test/build/custom_net_image
    -- 
       **********************************
       * Running CMake for fota_test *
       **********************************
    
    Loading Zephyr default modules (Zephyr base).
    -- Application: /home/Jonas/projects/fw_update/fota_test
    -- CMake version: 3.28.3
    -- Found Python3: /home/Jonas/projects/.venv/bin/python (found suitable version "3.12.3", minimum required is "3.10") found components: Interpreter 
    -- Cache files will be written to: /home/Jonas/.cache/zephyr
    -- Zephyr version: 4.1.99 (/home/Jonas/projects/fw_update/zephyr)
    -- Found west (found suitable version "1.5.0", minimum required is "0.14.0")
    -- Board: nrf7002dk, qualifiers: nrf5340/cpuapp
    -- ZEPHYR_TOOLCHAIN_VARIANT not set, trying to locate Zephyr SDK
    -- Found host-tools: zephyr 0.17.4 (/home/Jonas/zephyr-sdk-0.17.4)
    -- Found toolchain: zephyr 0.17.4 (/home/Jonas/zephyr-sdk-0.17.4)
    -- Found Dtc: /home/Jonas/zephyr-sdk-0.17.4/sysroots/x86_64-pokysdk-linux/usr/bin/dtc (found suitable version "1.7.0", minimum required is "1.4.6") 
    -- Found BOARD.dts: /home/Jonas/projects/fw_update/zephyr/boards/nordic/nrf7002dk/nrf7002dk_nrf5340_cpuapp.dts
    -- Found devicetree overlay: /home/Jonas/projects/fw_update/fota_test/boards/fw_update.overlay
    -- Generated zephyr.dts: /home/Jonas/projects/fw_update/fota_test/build/fota_test/zephyr/zephyr.dts
    -- Generated pickled edt: /home/Jonas/projects/fw_update/fota_test/build/fota_test/zephyr/edt.pickle
    -- Generated devicetree_generated.h: /home/Jonas/projects/fw_update/fota_test/build/fota_test/zephyr/include/generated/zephyr/devicetree_generated.h
    
    warning: MBEDTLS_PSA_CRYPTO_EXTERNAL_RNG_ALLOW_NON_CSPRNG (defined at
    modules/mbedtls/Kconfig.mbedtls:606, modules/mbedtls/Kconfig.mbedtls:606) was assigned the value 'y'
    but got the value 'n'. Check these unsatisfied dependencies: ((MBEDTLS_PSA_CRYPTO_EXTERNAL_RNG &&
    MBEDTLS_BUILTIN && MBEDTLS_CFG_FILE = "config-mbedtls.h" && MBEDTLS) ||
    (MBEDTLS_PSA_CRYPTO_EXTERNAL_RNG && MBEDTLS_BUILTIN && MBEDTLS_CFG_FILE = "config-mbedtls.h" &&
    MBEDTLS && 0)) (=n). See http://docs.zephyrproject.org/latest/kconfig.html#CONFIG_MBEDTLS_PSA_CRYPTO
    _EXTERNAL_RNG_ALLOW_NON_CSPRNG and/or look up MBEDTLS_PSA_CRYPTO_EXTERNAL_RNG_ALLOW_NON_CSPRNG 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 MBEDTLS_PSA_CRYPTO_EXTERNAL_RNG (defined at
    modules/mbedtls/Kconfig.mbedtls:568, modules/mbedtls/Kconfig.mbedtls:568) was selected (set =y), but
    no symbol ended up as the choice selection. See
    http://docs.zephyrproject.org/latest/kconfig.html#CONFIG_MBEDTLS_PSA_CRYPTO_EXTERNAL_RNG and/or look
    up MBEDTLS_PSA_CRYPTO_EXTERNAL_RNG 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 /home/Jonas/projects/fw_update/zephyr/Kconfig
    Loaded configuration '/home/Jonas/projects/fw_update/zephyr/boards/nordic/nrf7002dk/nrf7002dk_nrf5340_cpuapp_defconfig'
    Merged configuration '/home/Jonas/projects/fw_update/fota_test/prj.conf'
    Merged configuration '/home/Jonas/projects/fw_update/fota_test/build/fota_test/zephyr/.config.sysbuild'
    Configuration saved to '/home/Jonas/projects/fw_update/fota_test/build/fota_test/zephyr/.config'
    Kconfig header saved to '/home/Jonas/projects/fw_update/fota_test/build/fota_test/zephyr/include/generated/zephyr/autoconf.h'
    -- Found GnuLd: /home/Jonas/zephyr-sdk-0.17.4/arm-zephyr-eabi/arm-zephyr-eabi/bin/ld.bfd (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: /home/Jonas/zephyr-sdk-0.17.4/arm-zephyr-eabi/bin/arm-zephyr-eabi-gcc
    -- Using ccache: /usr/bin/ccache
    -- Found gen_kobject_list: /home/Jonas/projects/fw_update/zephyr/scripts/build/gen_kobject_list.py
    -- Including signing script: /home/Jonas/projects/fw_update/nrf/cmake/sysbuild/image_signing.cmake
    -- Configuring done (20.3s)
    -- Generating done (0.4s)
    -- Build files have been written to: /home/Jonas/projects/fw_update/fota_test/build/fota_test
    CMake Warning at /home/Jonas/projects/fw_update/nrf/cmake/sysbuild/debug_keys.cmake:27 (message):
      
    
          --------------------------------------------------------------
          --- WARNING: Using generated NSIB public/private key-pair. ---
          --- It should not be used for production.                  ---
          --- See SB_CONFIG_SECURE_BOOT_SIGNING_KEY_FILE             ---
          --------------------------------------------------------------
          
    
    Call Stack (most recent call first):
      /home/Jonas/projects/fw_update/nrf/cmake/sysbuild/provision_hex.cmake:11 (include)
      /home/Jonas/projects/fw_update/nrf/sysbuild/CMakeLists.txt:55 (include)
      /home/Jonas/projects/fw_update/nrf/sysbuild/CMakeLists.txt:778 (include_provision_hex)
      cmake/modules/sysbuild_extensions.cmake:598 (nrf_POST_CMAKE)
      cmake/modules/sysbuild_extensions.cmake:598 (cmake_language)
      cmake/modules/sysbuild_images.cmake:46 (sysbuild_module_call)
      cmake/modules/sysbuild_default.cmake:21 (include)
      /home/Jonas/projects/fw_update/zephyr/share/zephyr-package/cmake/ZephyrConfig.cmake:75 (include)
      /home/Jonas/projects/fw_update/zephyr/share/zephyr-package/cmake/ZephyrConfig.cmake:92 (include_boilerplate)
      /home/Jonas/projects/fw_update/zephyr/share/sysbuild-package/cmake/SysbuildConfig.cmake:8 (include)
      template/CMakeLists.txt:10 (find_package)
    
    
    CMake Warning at /home/Jonas/projects/fw_update/nrf/cmake/sysbuild/partition_manager.cmake:119 (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):
      /home/Jonas/projects/fw_update/nrf/cmake/sysbuild/partition_manager.cmake:636 (partition_manager)
      /home/Jonas/projects/fw_update/nrf/sysbuild/CMakeLists.txt:826 (include)
      cmake/modules/sysbuild_extensions.cmake:598 (nrf_POST_CMAKE)
      cmake/modules/sysbuild_extensions.cmake:598 (cmake_language)
      cmake/modules/sysbuild_images.cmake:46 (sysbuild_module_call)
      cmake/modules/sysbuild_default.cmake:21 (include)
      /home/Jonas/projects/fw_update/zephyr/share/zephyr-package/cmake/ZephyrConfig.cmake:75 (include)
      /home/Jonas/projects/fw_update/zephyr/share/zephyr-package/cmake/ZephyrConfig.cmake:92 (include_boilerplate)
      /home/Jonas/projects/fw_update/zephyr/share/sysbuild-package/cmake/SysbuildConfig.cmake:8 (include)
      template/CMakeLists.txt:10 (find_package)
    
    
    Traceback (most recent call last):
      File "/home/Jonas/projects/fw_update/nrf/scripts/partition_manager.py", line 1054, in <module>
        main()
      File "/home/Jonas/projects/fw_update/nrf/scripts/partition_manager.py", line 1022, in main
        args, ranges_configuration = parse_args()
                                     ^^^^^^^^^^^^
      File "/home/Jonas/projects/fw_update/nrf/scripts/partition_manager.py", line 928, in parse_args
        parser.add_argument(f'--{x}-size', required=True, type=lambda z: int(z, 0))
      File "/usr/lib/python3.12/argparse.py", line 1507, in add_argument
        return self._add_action(action)
               ^^^^^^^^^^^^^^^^^^^^^^^^
      File "/usr/lib/python3.12/argparse.py", line 1889, in _add_action
        self._optionals._add_action(action)
      File "/usr/lib/python3.12/argparse.py", line 1709, in _add_action
        action = super(_ArgumentGroup, self)._add_action(action)
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
      File "/usr/lib/python3.12/argparse.py", line 1521, in _add_action
        self._check_conflict(action)
      File "/usr/lib/python3.12/argparse.py", line 1658, in _check_conflict
        conflict_handler(action, confl_optionals)
      File "/usr/lib/python3.12/argparse.py", line 1667, in _handle_conflict_error
        raise ArgumentError(action, message % conflict_string)
    argparse.ArgumentError: argument --sram_primary-size: conflicting option string: --sram_primary-size
    CMake Error at /home/Jonas/projects/fw_update/nrf/cmake/sysbuild/partition_manager.cmake:179 (message):
      Partition Manager failed, aborting.  Command:
      /home/Jonas/projects/.venv/bin/python3;/home/Jonas/projects/fw_update/nrf/scripts/partition_manager.py;--input-files;/home/Jonas/projects/fw_update/fota_test/build/b0n/zephyr/include/generated/pm.yml;/home/Jonas/projects/fw_update/fota_test/build/b0n/modules/nrf/subsys/partition_manager/pm.yml.secure_boot_storage;/home/Jonas/projects/fw_update/fota_test/build/zephyr/include/generated/pm.yml;/home/Jonas/projects/fw_update/fota_test/build/b0n/zephyr/include/generated/pm.yml;/home/Jonas/projects/fw_update/fota_test/build/b0n/modules/nrf/subsys/partition_manager/pm.yml.secure_boot_storage;/home/Jonas/projects/fw_update/fota_test/build/zephyr/include/generated/pm.yml;--regions;sram_primary;flash_primary;sram_primary;flash_primary;--output-partitions;/home/Jonas/projects/fw_update/fota_test/build/partitions_CPUNET.yml;--output-regions;/home/Jonas/projects/fw_update/fota_test/build/regions_CPUNET.yml;--flash_primary-dynamic-partition;custom_net_image;--sram_primary-size;0x10000;--sram_primary-base-address;0x21000000;--sram_primary-placement-strategy;complex;--sram_primary-dynamic-partition;sram_primary;--flash_primary-size;0x40000;--flash_primary-base-address;0x1000000;--flash_primary-placement-strategy;complex;--flash_primary-device;flash_controller;--flash_primary-default-driver-kconfig;CONFIG_SOC_FLASH_NRF;--sram_primary-size;0x10000;--sram_primary-base-address;0x21000000;--sram_primary-placement-strategy;complex;--sram_primary-dynamic-partition;sram_primary;--flash_primary-size;0x40000;--flash_primary-base-address;0x1000000;--flash_primary-placement-strategy;complex;--flash_primary-device;flash_controller;--flash_primary-default-driver-kconfig;CONFIG_SOC_FLASH_NRF
    Call Stack (most recent call first):
      /home/Jonas/projects/fw_update/nrf/cmake/sysbuild/partition_manager.cmake:639 (partition_manager)
      /home/Jonas/projects/fw_update/nrf/sysbuild/CMakeLists.txt:826 (include)
      cmake/modules/sysbuild_extensions.cmake:598 (nrf_POST_CMAKE)
      cmake/modules/sysbuild_extensions.cmake:598 (cmake_language)
      cmake/modules/sysbuild_images.cmake:46 (sysbuild_module_call)
      cmake/modules/sysbuild_default.cmake:21 (include)
      /home/Jonas/projects/fw_update/zephyr/share/zephyr-package/cmake/ZephyrConfig.cmake:75 (include)
      /home/Jonas/projects/fw_update/zephyr/share/zephyr-package/cmake/ZephyrConfig.cmake:92 (include_boilerplate)
      /home/Jonas/projects/fw_update/zephyr/share/sysbuild-package/cmake/SysbuildConfig.cmake:8 (include)
      template/CMakeLists.txt:10 (find_package)
    
    
    -- Configuring incomplete, errors occurred!
    FATAL ERROR: command exited with status 1: /usr/bin/cmake -DWEST_PYTHON=/home/Jonas/projects/.venv/bin/python3 -B/home/Jonas/projects/fw_update/fota_test/build -GNinja -DBOARD=nrf7002dk/nrf5340/cpuapp -S/home/Jonas/projects/fw_update/zephyr/share/sysbuild -DAPP_DIR:PATH=/home/Jonas/projects/fw_update/fota_test

    project zip:
     
    fota_test.zip

    Also the solution for l8 e2 works, but it doesn't include the B0n configurations for the netcore.
    It disables the partition manager also. Is there a way for this to work with partition manager enabled?
    I'm using it in my project already and planned on using it to partition the external flash for a secondary image later on.

    Thanks for the help.

  • Hi,

     

    Could you try this?

    custom_netimage.zip

     

    Boot log:

    *** Booting MCUboot v2.3.0-dev-0d9411f5dda3 ***
    *** Using nRF Connect SDK v3.2.1-d8887f6f32df ***
    *** Using Zephyr OS v4.2.99-ec78104f1569 ***
    I: Starting bootloader
    I: Image index: 0, Swap type: none
    I: Image index: 1, Swap type: none
    I: Bootloader chainload address offset: 0xc000
    I: Image version: v0.0.0
    ?*** Booting nRF Connect SDK v3.2.1-d8887f6f32df ***
    *** Using Zephyr OS v4.2.99-ec78104f1569 ***
    [00:00:00.005,096] <inf> main: Hello World! nrf7002dk
    
    [00:00:00.005,126] <inf> main: LED state: OFF
    [00:00:00.505,249] <inf> main: LED state: ON
    

     

    This is taken from here:

    https://docs.nordicsemi.com/bundle/ncs-3.1.0/page/nrf/app_dev/config_and_build/sysbuild/sysbuild_images.html#adding_custom_images

     

    Kind regards,

    Håkon

Reply Children
Related