error: Aborting due to Kconfig warnings when adding CONFIG_SECURE_BOOT

Hi,

I'm encountering an issue when i want to add the immutable bootloader (CONFIG_SECURE_BOOT).

The error showed are KConfig warning (see below).

[0/1] Re-running CMake...
Loading Zephyr default modules (Zephyr base (cached)).
-- Application: C:/Users/julf1/Bureau/Workspace/KFIR-3004/Repeteur/project/project_nrf52833
-- CMake version: 3.20.5
-- Cache files will be written to: C:/ncs/v2.4.1/zephyr/.cache
-- Zephyr version: 3.3.99 (C:/ncs/v2.4.1/zephyr)
-- Found west (found suitable version "1.0.0", minimum required is "0.7.1")
-- Board: nrf52833_repet
-- Found host-tools: zephyr 0.16.0 (C:/ncs/toolchains/31f4403e35/opt/zephyr-sdk)
-- Found toolchain: zephyr 0.16.0 (C:/ncs/toolchains/31f4403e35/opt/zephyr-sdk)
-- Found BOARD.dts: C:/Users/julf1/Bureau/Workspace/KFIR-3004/Repeteur/boards/arm/nrf52833_repet/nrf52833_repet.dts
-- Generated zephyr.dts: C:/Users/julf1/Bureau/Workspace/KFIR-3004/Repeteur/project/project_nrf52833/build/zephyr/zephyr.dts
-- Generated devicetree_generated.h: C:/Users/julf1/Bureau/Workspace/KFIR-3004/Repeteur/project/project_nrf52833/build/zephyr/include/generated/devicetree_generated.h
-- Including generated dts.cmake file: C:/Users/julf1/Bureau/Workspace/KFIR-3004/Repeteur/project/project_nrf52833/build/zephyr/dts.cmake

warning: BT_SCAN_UUID_CNT (defined at C:/ncs/v2.4.1/nrf\subsys\bluetooth\Kconfig.scan:42,
C:/ncs/v2.4.1/nrf\subsys\bluetooth\Kconfig.scan:81) was assigned the value '8' but got the value
'0'. See http://docs.zephyrproject.org/latest/kconfig.html#CONFIG_BT_SCAN_UUID_CNT and/or look up
BT_SCAN_UUID_CNT 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: MPSL (defined at C:/ncs/v2.4.1/nrfxlib\mpsl/Kconfig:7) was assigned the value 'n' but got
the value 'y'. See http://docs.zephyrproject.org/latest/kconfig.html#CONFIG_MPSL and/or look up MPSL
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: UART_CONSOLE (defined at drivers/console/Kconfig:43) was assigned the value 'y' but got the
value 'n'. Check these unsatisfied dependencies: SERIAL_HAS_DRIVER (=n). See
http://docs.zephyrproject.org/latest/kconfig.html#CONFIG_UART_CONSOLE and/or look up UART_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.

Parsing C:/ncs/v2.4.1/zephyr/Kconfig
Loaded configuration 'C:/Users/julf1/Bureau/Workspace/KFIR-3004/Repeteur/boards/arm/nrf52833_repet/nrf52833_repet_defconfig'
Merged configuration 'C:/Users/julf1/Bureau/Workspace/KFIR-3004/Repeteur/project/project_nrf52833/prj.conf'
Configuration saved to 'C:/Users/julf1/Bureau/Workspace/KFIR-3004/Repeteur/project/project_nrf52833/build/zephyr/.config'
Kconfig header saved to 'C:/Users/julf1/Bureau/Workspace/KFIR-3004/Repeteur/project/project_nrf52833/build/zephyr/include/generated/autoconf.h'

=== child image b0 -  begin ===
loading initial cache file C:/Users/julf1/Bureau/Workspace/KFIR-3004/Repeteur/project/project_nrf52833/build/b0/child_image_preload.cmake
Loading Zephyr default modules (Zephyr base (cached)).
-- Application: C:/ncs/v2.4.1/nrf/samples/bootloader
-- CMake version: 3.20.5
-- Cache files will be written to: C:/ncs/v2.4.1/zephyr/.cache
-- Zephyr version: 3.3.99 (C:/ncs/v2.4.1/zephyr)
-- Found west (found suitable version "1.0.0", minimum required is "0.7.1")
-- Board: nrf52833_repet
-- Found host-tools: zephyr 0.16.0 (C:/ncs/toolchains/31f4403e35/opt/zephyr-sdk)
-- Found toolchain: zephyr 0.16.0 (C:/ncs/toolchains/31f4403e35/opt/zephyr-sdk)
-- Found BOARD.dts: C:/Users/julf1/Bureau/Workspace/KFIR-3004/Repeteur/boards/arm/nrf52833_repet/nrf52833_repet.dts
-- Generated zephyr.dts: C:/Users/julf1/Bureau/Workspace/KFIR-3004/Repeteur/project/project_nrf52833/build/b0/zephyr/zephyr.dts
-- Generated devicetree_generated.h: C:/Users/julf1/Bureau/Workspace/KFIR-3004/Repeteur/project/project_nrf52833/build/b0/zephyr/include/generated/devicetree_generated.h
-- Including generated dts.cmake file: C:/Users/julf1/Bureau/Workspace/KFIR-3004/Repeteur/project/project_nrf52833/build/b0/zephyr/dts.cmake
Parsing C:/ncs/v2.4.1/zephyr/Kconfig
Loaded configuration 'C:/Users/julf1/Bureau/Workspace/KFIR-3004/Repeteur/boards/arm/nrf52833_repet/nrf52833_repet_defconfig'
Merged configuration 'C:/ncs/v2.4.1/nrf/samples/bootloader/prj.conf'
Merged configuration 'C:/ncs/v2.4.1/nrf/subsys/partition_manager/partition_manager_enabled.conf'
Merged configuration 'C:/Users/julf1/Bureau/Workspace/KFIR-3004/Repeteur/project/project_nrf52833/build/b0/zephyr/misc/generated/extra_kconfig_options.conf'

warning: HW_STACK_PROTECTION (defined at arch/Kconfig:258) was assigned the value 'y' but got the
value 'n'. Check these unsatisfied dependencies: 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: UART_NRFX (defined at drivers/serial/Kconfig.nrfx:6) has direct dependencies (DT_HAS_NORDIC_NRF_UART_ENABLED || DT_HAS_NORDIC_NRF_UARTE_ENABLED) && SERIAL with value n, but is currently being y-selected by the following symbols:
 - SECURE_BOOT_DEBUG_UART (defined at C:/ncs/v2.4.1/nrf\subsys\bootloader/Kconfig:222), with value y, direct dependencies <choice SECURE_BOOT_DEBUG_BACKEND> (value: y), and select condition <choice SECURE_BOOT_DEBUG_BACKEND> (value: y)

warning: UART_CONSOLE (defined at drivers/console/Kconfig:43) has direct dependencies SERIAL && SERIAL_HAS_DRIVER && CONSOLE with value n, but is currently being y-selected by the following symbols:
 - SECURE_BOOT_DEBUG_UART (defined at C:/ncs/v2.4.1/nrf\subsys\bootloader/Kconfig:222), with value y, direct dependencies <choice SECURE_BOOT_DEBUG_BACKEND> (value: y), and select condition <choice SECURE_BOOT_DEBUG_BACKEND> (value: y)

error: Aborting due to Kconfig warnings

CMake Error at C:/ncs/v2.4.1/zephyr/cmake/modules/kconfig.cmake:339 (message):
  command failed with return code: 1
Call Stack (most recent call first):
  C:/ncs/v2.4.1/nrf/cmake/modules/kconfig.cmake:29 (include)
  C:/ncs/v2.4.1/zephyr/cmake/modules/zephyr_default.cmake:115 (include)
  C:/ncs/v2.4.1/zephyr/share/zephyr-package/cmake/ZephyrConfig.cmake:66 (include)
  C:/ncs/v2.4.1/zephyr/share/zephyr-package/cmake/ZephyrConfig.cmake:97 (include_boilerplate)
  CMakeLists.txt:9 (find_package)


-- Configuring incomplete, errors occurred!
CMake Error at C:/ncs/v2.4.1/nrf/cmake/multi_image.cmake:440 (message):
  CMake generation for b0 failed, aborting.  Command: 1
Call Stack (most recent call first):
  C:/ncs/v2.4.1/nrf/cmake/multi_image.cmake:169 (add_child_image_from_source)
  C:/ncs/v2.4.1/nrf/samples/CMakeLists.txt:18 (add_child_image)


-- Configuring incomplete, errors occurred!
See also "C:/Users/julf1/Bureau/Workspace/KFIR-3004/Repeteur/project/project_nrf52833/build/CMakeFiles/CMakeOutput.log".
See also "C:/Users/julf1/Bureau/Workspace/KFIR-3004/Repeteur/project/project_nrf52833/build/CMakeFiles/CMakeError.log".
FAILED: build.ninja 
C:\ncs\toolchains\31f4403e35\opt\bin\cmake.exe --regenerate-during-build -SC:\Users\julf1\Bureau\Workspace\KFIR-3004\Repeteur\project\project_nrf52833 -BC:\Users\julf1\Bureau\Workspace\KFIR-3004\Repeteur\project\project_nrf52833\build
ninja: error: rebuilding 'build.ninja': subcommand failed
FATAL ERROR: command exited with status 1: 'C:\ncs\toolchains\31f4403e35\opt\bin\cmake.EXE' --build 'c:\Users\julf1\Bureau\Workspace\KFIR-3004\Repeteur\project\project_nrf52833\build'

It seems to me the issue come from the UART are not enable, so i tried to enable it on my bord config but the issue still here.

See the board.defconfig

# Copyright (c) 2023 Nordic Semiconductor ASA
# SPDX-License-Identifier: Apache-2.0

CONFIG_SOC_SERIES_NRF52X=y
CONFIG_SOC_NRF52833_QIAA=y
CONFIG_BOARD_NRF52833_REPET=y

# Enable MPU
CONFIG_ARM_MPU=y

# Enable hardware stack protection
CONFIG_HW_STACK_PROTECTION=y

# Enable RTT
CONFIG_USE_SEGGER_RTT=y

CONFIG_SERIAL=y
# enable console
CONFIG_CONSOLE=y
CONFIG_UART_CONSOLE=y

#Enable PIN control
CONFIG_PINCTRL=y

CONFIG_MPSL=n
CONFIG_MPSL_FEM=n
CONFIG_MPSL_FEM_SIMPLE_GPIO=n

and the prj.conf

# nothing here
CONFIG_RTT_CONSOLE=n

CONFIG_I2C=y
CONFIG_GPIO=y

CONFIG_NEWLIB_LIBC=y

# BLE definition 
CONFIG_BT=y
CONFIG_BT_CENTRAL=y
CONFIG_BT_GATT_CLIENT=y
CONFIG_BT_GATT_DM=y

CONFIG_BT_PERIPHERAL=y
CONFIG_BT_MAX_CONN=1
CONFIG_BT_L2CAP_TX_BUF_COUNT=5
CONFIG_BT_DEVICE_NAME="KRepet"
CONFIG_BT_DEVICE_APPEARANCE=962

CONFIG_HEAP_MEM_POOL_SIZE=2048

CONFIG_BT_SCAN=y
CONFIG_BT_SCAN_UUID_CNT=8

# Ensure an MCUboot-compatible binary is generated.
CONFIG_SECURE_BOOT=y
CONFIG_BOOTLOADER_MCUBOOT=y

I tried on a nordic course and it worked well, so i think it come from my configuration.

I'm new to this SDK, so I took the classes then started my custom board.

I am using VSC and zephyr v2.4.1.

Best regards,

Julien

Parents Reply Children
Related