diff --git a/Kconfig b/Kconfig index f8b316c30e..694c37d85f 100644 --- a/Kconfig +++ b/Kconfig @@ -50,3 +50,10 @@ config TEST_KCONFIG This is used during the Kconfig migration to test the module dependency modelling. Don't change the default value unless you know what you are doing. + +config DEVELHELP + bool "Development Help" + help + Set to enable code in RIOT that does safety checking which might not be + needed in a production environment but helps in the development + process. diff --git a/cpu/cortexm_common/Kconfig b/cpu/cortexm_common/Kconfig index 0f921bb37a..76ffacab2b 100644 --- a/cpu/cortexm_common/Kconfig +++ b/cpu/cortexm_common/Kconfig @@ -124,10 +124,20 @@ config HAS_CORTEXM_SVC help Indicates that ARM Cortex-M Supervisor Calls are available. +menu "Cortex-M" + depends on TEST_KCONFIG + depends on CPU_CORE_CORTEX_M + config MODULE_CORTEXM_FPU bool "Cortex-M Floating Point Unit (FPU) support" default y depends on HAS_CORTEXM_FPU - depends on TEST_KCONFIG + +config MODULE_MPU_STACK_GUARD + bool "Memory Protection Unit (MPU) stack guard" + default y if DEVELHELP + depends on HAS_CORTEXM_MPU + +endmenu # Cortex-M rsource "periph/Kconfig" diff --git a/makefiles/kconfig.mk b/makefiles/kconfig.mk index c29f15d177..a5c294293b 100644 --- a/makefiles/kconfig.mk +++ b/makefiles/kconfig.mk @@ -112,6 +112,11 @@ ifeq (1,$(TEST_KCONFIG)) SHOULD_RUN_KCONFIG := 1 endif +# Expose DEVELHELP to kconfig +ifeq (1,$(DEVELHELP)) + RIOT_CONFIG_DEVELHELP ?= y +endif + # export variable to make it visible in other Makefiles export SHOULD_RUN_KCONFIG