Skip to content

Commit 986efe7

Browse files
Add prompt to MCUBOOT Kconfig and default 'n'
The MCUBOOT Kconfig seems to control the inclusion of MCUBoot application code in the Zephyr build. Because this name matches the module and an alternate name was used to include MCUBoot's bootutil package the name usage is a bit unorthodox. An orthodox and scalable pattern is for a Kconfig matching the module name to control the exposure of the module itself (e.g., the public headers). The first step in this transition is to make MCUBOOT public and default to 'n'. Defaulting to 'n' will prevent this module with interfering with other existing builds. Building with `west build -p always -b nrf52840dk_nrf52840 mcuboot/samples/zephyr_external_config` still fails with: error: MCUBOOT (defined at Kconfig.zephyr:682) is assigned in a configuration file, but is not directly user-configurable (has no prompt). It gets its value indirectly from other symbols. See http://docs.zephyrproject.org/latest/kconfig.html#CONFIG_MCUBOOT and/or look up MCUBOOT 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. CMake Error at /home/zephyr/mcuboot_dev/zephyr/cmake/modules/kconfig.cmake:326 (message): command failed with return code: 1 Call Stack (most recent call first): /home/zephyr/mcuboot_dev/zephyr/cmake/modules/zephyr_default.cmake:108 (include) /home/zephyr/mcuboot_dev/zephyr/share/zephyr-package/cmake/ZephyrConfig.cmake:66 (include) /home/zephyr/mcuboot_dev/zephyr/share/zephyr-package/cmake/ZephyrConfig.cmake:92 (include_boilerplate) CMakeLists.txt:6 (find_package) Signed-off-by: Gregory SHUE <[email protected]>
1 parent ec876f7 commit 986efe7

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

boot/zephyr/Kconfig

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@ comment "MCUboot-specific configuration options"
1010

1111
# Hidden option to mark a project as MCUboot
1212
config MCUBOOT
13-
default y
14-
bool
13+
default n
14+
bool "MCUBoot application"
1515
select MPU_ALLOW_FLASH_WRITE if ARM_MPU
1616
select USE_DT_CODE_PARTITION if HAS_FLASH_LOAD_OFFSET
1717
select MCUBOOT_BOOTUTIL_LIB

boot/zephyr/prj.conf

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
CONFIG_MCUBOOT=y
12
CONFIG_DEBUG=y
23
CONFIG_PM=n
34

0 commit comments

Comments
 (0)