Appcore rng sample build fails with NRF5340 + MCUBOOT + CONFIG_NRF_SECURITY with SDK2.9.1

Using nrf sample from v2.9.1/nrf/samples/crpyto/rng
Configure build with v2.9.1 SDK/Toolchain
Configure build with board target: nrf5340dk/nrf5340/cpuapp
Add MCUBOOT support via sysbuild config


Appcore Build fails with

warning: MBEDTLS_SHA256 (defined at C:/ncs/v2.9.1/zephyr/modules/mbedtls\Kconfig.tls-generic:349, modules\mbedtls\Kconfig.tls-generic:349) has direct dependencies (!(NRF_SECURITY || NORDIC_SECURITY_BACKEND) && MBEDTLS_BUILTIN && MBEDTLS_CFG_FILE = "config-tls-generic.h" && MBEDTLS) || (!(NRF_SECURITY || NORDIC_SECURITY_BACKEND) && MBEDTLS_BUILTIN && MBEDTLS_CFG_FILE = "config-tls-generic.h" && MBEDTLS && 0) with value n, but is currently being y-selected by the following symbols:
- FLASH_AREA_CHECK_INTEGRITY_MBEDTLS (defined at subsys/storage/flash_map/Kconfig:58), with value y, direct dependencies <choice FLASH_AREA_CHECK_INTEGRITY_BACKEND> (value: y), and select condition <choice FLASH_AREA_CHECK_INTEGRITY_BACKEND> (value: y)

error: Aborting due to Kconfig warnings


Attached is the full project minus the build directory

rng - Copy.zip




Parents
  • hello,


    I tried building the same sample on my end, and it compiled successfully. I did see some warnings, but the build completed without any errors. I'm sharing the build log with you.

    I built it for both nrf5340dk/nrf5340/cpuapp and nrf5340dk/nrf5340/cpuapp_ns.

    C:\WINDOWS\system32\cmd.exe /d /s /c "west build --build-dir c:/ncs/v3.0.2/nrf/samples/crypto/rng/build c:/ncs/v3.0.2/nrf/samples/crypto/rng --pristine --board nrf5340dk/nrf5340/cpuapp --sysbuild -- -DBOARD_ROOT=c:/work/nrf-samples/hello_world;c:/ncs/customer_applications/hello_world_zephyrcontroller;c:/ncs/v3.0.2/nrf/samples/crypto/rng"
    
    -- west build: generating a build system
    Loading Zephyr module(s) (Zephyr base): sysbuild_default
    -- Found Python3: C:/ncs/toolchains/0b393f9e1b/opt/bin/python.exe (found suitable version "3.12.4", minimum required is "3.10") found components: Interpreter 
    -- Cache files will be written to: C:/ncs/v3.0.2/zephyr/.cache
    -- Found west (found suitable version "1.2.0", minimum required is "0.14.0")
    CMake Warning at C:/ncs/v3.0.2/zephyr/cmake/modules/boards.cmake:136 (message):
      BOARD_ROOT element without a 'boards' subdirectory:
    
      C:/work/nrf-samples/hello_world
    
      Hints:
    
        - if your board directory is '/foo/bar/boards/my_board' then add '/foo/bar' to BOARD_ROOT, not the entire board directory
        - if in doubt, use absolute paths
    Call Stack (most recent call first):
      cmake/modules/sysbuild_default.cmake:15 (include)
      C:/ncs/v3.0.2/zephyr/share/zephyr-package/cmake/ZephyrConfig.cmake:75 (include)
      C:/ncs/v3.0.2/zephyr/share/zephyr-package/cmake/ZephyrConfig.cmake:92 (include_boilerplate)
      C:/ncs/v3.0.2/zephyr/share/sysbuild-package/cmake/SysbuildConfig.cmake:8 (include)
      template/CMakeLists.txt:10 (find_package)
    
    
    -- Board: nrf5340dk, qualifiers: nrf5340/cpuapp
    Parsing C:/ncs/v3.0.2/zephyr/share/sysbuild/Kconfig
    Loaded configuration 'C:/ncs/v3.0.2/nrf/samples/crypto/rng/build/_sysbuild/empty.conf'
    Merged configuration 'C:/ncs/v3.0.2/nrf/samples/crypto/rng/build/_sysbuild/empty.conf'
    Configuration saved to 'C:/ncs/v3.0.2/nrf/samples/crypto/rng/build/zephyr/.config'
    Kconfig header saved to 'C:/ncs/v3.0.2/nrf/samples/crypto/rng/build/_sysbuild/autoconf.h'
    -- 
       *************************
       * Running CMake for rng *
       *************************
    
    Loading Zephyr default modules (Zephyr base).
    -- Application: C:/ncs/v3.0.2/nrf/samples/crypto/rng
    -- CMake version: 3.21.0
    -- Found Python3: C:/ncs/toolchains/0b393f9e1b/opt/bin/python.exe (found suitable version "3.12.4", minimum required is "3.10") found components: Interpreter 
    -- Cache files will be written to: C:/ncs/v3.0.2/zephyr/.cache
    -- Zephyr version: 4.0.99 (C:/ncs/v3.0.2/zephyr)
    -- Found west (found suitable version "1.2.0", minimum required is "0.14.0")
    CMake Warning at C:/ncs/v3.0.2/zephyr/cmake/modules/boards.cmake:136 (message):
      BOARD_ROOT element without a 'boards' subdirectory:
    
      C:/work/nrf-samples/hello_world
    
      Hints:
    
        - if your board directory is '/foo/bar/boards/my_board' then add '/foo/bar' to BOARD_ROOT, not the entire board directory
        - if in doubt, use absolute paths
    Call Stack (most recent call first):
      C:/ncs/v3.0.2/zephyr/cmake/modules/zephyr_default.cmake:133 (include)
      C:/ncs/v3.0.2/zephyr/share/zephyr-package/cmake/ZephyrConfig.cmake:66 (include)
      C:/ncs/v3.0.2/zephyr/share/zephyr-package/cmake/ZephyrConfig.cmake:92 (include_boilerplate)
      CMakeLists.txt:9 (find_package)
    
    
    -- Board: nrf5340dk, qualifiers: nrf5340/cpuapp
    -- Found host-tools: zephyr 0.17.0 (C:/ncs/toolchains/0b393f9e1b/opt/zephyr-sdk)
    -- Found toolchain: zephyr 0.17.0 (C:/ncs/toolchains/0b393f9e1b/opt/zephyr-sdk)
    -- Found Dtc: C:/ncs/toolchains/0b393f9e1b/opt/bin/dtc.exe (found suitable version "1.4.7", minimum required is "1.4.6") 
    -- Found BOARD.dts: C:/ncs/v3.0.2/zephyr/boards/nordic/nrf5340dk/nrf5340dk_nrf5340_cpuapp.dts
    -- Generated zephyr.dts: C:/ncs/v3.0.2/nrf/samples/crypto/rng/build/rng/zephyr/zephyr.dts
    -- Generated pickled edt: C:/ncs/v3.0.2/nrf/samples/crypto/rng/build/rng/zephyr/edt.pickle
    -- Generated zephyr.dts: C:/ncs/v3.0.2/nrf/samples/crypto/rng/build/rng/zephyr/zephyr.dts
    -- Generated devicetree_generated.h: C:/ncs/v3.0.2/nrf/samples/crypto/rng/build/rng/zephyr/include/generated/zephyr/devicetree_generated.h
    -- Including generated dts.cmake file: C:/ncs/v3.0.2/nrf/samples/crypto/rng/build/rng/zephyr/dts.cmake
    Parsing C:/ncs/v3.0.2/zephyr/Kconfig
    Loaded configuration 'C:/ncs/v3.0.2/zephyr/boards/nordic/nrf5340dk/nrf5340dk_nrf5340_cpuapp_defconfig'
    Merged configuration 'C:/ncs/v3.0.2/nrf/samples/crypto/rng/prj.conf'
    Merged configuration 'C:/ncs/v3.0.2/nrf/samples/crypto/rng/boards/nrf5340dk_nrf5340_cpuapp.conf'
    Merged configuration 'C:/ncs/v3.0.2/nrf/samples/crypto/rng/build/rng/zephyr/.config.sysbuild'
    Configuration saved to 'C:/ncs/v3.0.2/nrf/samples/crypto/rng/build/rng/zephyr/.config'
    Kconfig header saved to 'C:/ncs/v3.0.2/nrf/samples/crypto/rng/build/rng/zephyr/include/generated/zephyr/autoconf.h'
    -- Found GnuLd: c:/ncs/toolchains/0b393f9e1b/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/0b393f9e1b/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: True
    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: True
    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: True
    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: True
    Restore: CONFIG_MBEDTLS_PLATFORM_PRINTF_ALT: False
    Restore: CONFIG_MBEDTLS_THREADING: False
    Restore: CONFIG_MBEDTLS_THREADING_ALT: True
    =========== End psa_crypto_library_config ===============
    -- Configuring done
    -- Generating done
    -- Build files have been written to: C:/ncs/v3.0.2/nrf/samples/crypto/rng/build/rng
    -- Configuring done
    -- Generating done
    -- Build files have been written to: C:/ncs/v3.0.2/nrf/samples/crypto/rng/build
    -- west build: building application
    [4/199] Generating include/generated/zephyr/version.h
    -- Zephyr version: 4.0.99 (C:/ncs/v3.0.2/zephyr), build: v4.0.99-ncs1-2
    [199/199] Linking C executable zephyr\zephyr.elf
    Memory region         Used Size  Region Size  %age Used
               FLASH:       42240 B         1 MB      4.03%
                 RAM:       25792 B       448 KB      5.62%
            IDT_LIST:          0 GB        32 KB      0.00%
    Generating files from C:/ncs/v3.0.2/nrf/samples/crypto/rng/build/rng/zephyr/zephyr.elf for board: nrf5340dk
    [10/10] Generating ../merged.hex
     *  Terminal will be reused by tasks, press any key to close it. 
    


    Kind Regards,

    Abhijith

  • you need to build the supplied project or enable MCUBOOT support

Reply Children
No Data
Related