diff --git a/boards/adafruit-clue/Makefile.features b/boards/adafruit-clue/Makefile.features index 912b45773c..eb54e9cce9 100644 --- a/boards/adafruit-clue/Makefile.features +++ b/boards/adafruit-clue/Makefile.features @@ -12,7 +12,7 @@ FEATURES_PROVIDED += highlevel_stdio # This configuration enables modules that are only available when using Kconfig # module modelling ifeq (1,$(TEST_KCONFIG)) - KCONFIG_ADD_CONFIG += $(RIOTBOARD)/common/nrf52/nrf52_bootloader.config + KCONFIG_BOARD_CONFIG += $(RIOTBOARD)/common/nrf52/nrf52_bootloader.config endif include $(RIOTBOARD)/common/nrf52/Makefile.features diff --git a/boards/adafruit-itsybitsy-m4/Makefile.features b/boards/adafruit-itsybitsy-m4/Makefile.features index c0d3578538..057787eafb 100644 --- a/boards/adafruit-itsybitsy-m4/Makefile.features +++ b/boards/adafruit-itsybitsy-m4/Makefile.features @@ -17,5 +17,5 @@ FEATURES_PROVIDED += periph_usbdev # This configuration enables modules that are only available when using Kconfig # module modelling ifeq (1, $(TEST_KCONFIG)) - KCONFIG_ADD_CONFIG += $(BOARDDIR)/adafruit-itsybitsy-m4.config + KCONFIG_BOARD_CONFIG += $(BOARDDIR)/adafruit-itsybitsy-m4.config endif diff --git a/boards/adafruit-itsybitsy-nrf52/Makefile.features b/boards/adafruit-itsybitsy-nrf52/Makefile.features index 912b45773c..eb54e9cce9 100644 --- a/boards/adafruit-itsybitsy-nrf52/Makefile.features +++ b/boards/adafruit-itsybitsy-nrf52/Makefile.features @@ -12,7 +12,7 @@ FEATURES_PROVIDED += highlevel_stdio # This configuration enables modules that are only available when using Kconfig # module modelling ifeq (1,$(TEST_KCONFIG)) - KCONFIG_ADD_CONFIG += $(RIOTBOARD)/common/nrf52/nrf52_bootloader.config + KCONFIG_BOARD_CONFIG += $(RIOTBOARD)/common/nrf52/nrf52_bootloader.config endif include $(RIOTBOARD)/common/nrf52/Makefile.features diff --git a/boards/arduino-nano-33-ble/Makefile.features b/boards/arduino-nano-33-ble/Makefile.features index 912b45773c..eb54e9cce9 100644 --- a/boards/arduino-nano-33-ble/Makefile.features +++ b/boards/arduino-nano-33-ble/Makefile.features @@ -12,7 +12,7 @@ FEATURES_PROVIDED += highlevel_stdio # This configuration enables modules that are only available when using Kconfig # module modelling ifeq (1,$(TEST_KCONFIG)) - KCONFIG_ADD_CONFIG += $(RIOTBOARD)/common/nrf52/nrf52_bootloader.config + KCONFIG_BOARD_CONFIG += $(RIOTBOARD)/common/nrf52/nrf52_bootloader.config endif include $(RIOTBOARD)/common/nrf52/Makefile.features diff --git a/boards/bastwan/Makefile.features b/boards/bastwan/Makefile.features index 9536f53ea7..6fe3facd51 100644 --- a/boards/bastwan/Makefile.features +++ b/boards/bastwan/Makefile.features @@ -19,5 +19,5 @@ FEATURES_PROVIDED += highlevel_stdio # This configuration enables modules that are only available when using Kconfig # module modelling ifeq (1, $(TEST_KCONFIG)) - KCONFIG_ADD_CONFIG += $(BOARDDIR)/bastwan.config + KCONFIG_BOARD_CONFIG += $(BOARDDIR)/bastwan.config endif diff --git a/boards/common/iotlab/Makefile.features b/boards/common/iotlab/Makefile.features index dcabc9af10..ba0bff2db2 100644 --- a/boards/common/iotlab/Makefile.features +++ b/boards/common/iotlab/Makefile.features @@ -13,4 +13,4 @@ FEATURES_PROVIDED += periph_uart FEATURES_PROVIDED += riotboot # iotlab boards provide a custom default Kconfig clock configuration -KCONFIG_ADD_CONFIG += $(RIOTBOARD)/common/iotlab/clock.config +KCONFIG_BOARD_CONFIG += $(RIOTBOARD)/common/iotlab/clock.config diff --git a/boards/common/particle-mesh/Makefile.features b/boards/common/particle-mesh/Makefile.features index a52459e965..98a4aaa362 100644 --- a/boards/common/particle-mesh/Makefile.features +++ b/boards/common/particle-mesh/Makefile.features @@ -15,7 +15,7 @@ FEATURES_PROVIDED += highlevel_stdio # This configuration enables modules that are only available when using Kconfig # module modelling ifeq (1,$(TEST_KCONFIG)) - KCONFIG_ADD_CONFIG += $(RIOTBOARD)/common/nrf52/nrf52_bootloader.config + KCONFIG_BOARD_CONFIG += $(RIOTBOARD)/common/nrf52/nrf52_bootloader.config endif include $(RIOTBOARD)/common/nrf52/Makefile.features diff --git a/boards/common/weact-f4x1cx/Makefile.features b/boards/common/weact-f4x1cx/Makefile.features index 0f65aee573..6216610ca9 100644 --- a/boards/common/weact-f4x1cx/Makefile.features +++ b/boards/common/weact-f4x1cx/Makefile.features @@ -14,4 +14,4 @@ FEATURES_PROVIDED += periph_usbdev FEATURES_PROVIDED += highlevel_stdio # weact-f4x1cx boards provide a custom default Kconfig clock configuration -KCONFIG_ADD_CONFIG += $(RIOTBOARD)/common/weact-f4x1cx/clock.config +KCONFIG_BOARD_CONFIG += $(RIOTBOARD)/common/weact-f4x1cx/clock.config diff --git a/boards/f4vi1/Makefile.features b/boards/f4vi1/Makefile.features index eb610fcaeb..941f156e30 100644 --- a/boards/f4vi1/Makefile.features +++ b/boards/f4vi1/Makefile.features @@ -7,4 +7,4 @@ FEATURES_PROVIDED += periph_timer FEATURES_PROVIDED += periph_uart # f4vi1 provides a custom default Kconfig clock configuration -KCONFIG_ADD_CONFIG += $(RIOTBOARD)/f4vi1/clock.config +KCONFIG_BOARD_CONFIG += $(RIOTBOARD)/f4vi1/clock.config diff --git a/boards/feather-nrf52840/Makefile.features b/boards/feather-nrf52840/Makefile.features index 912b45773c..eb54e9cce9 100644 --- a/boards/feather-nrf52840/Makefile.features +++ b/boards/feather-nrf52840/Makefile.features @@ -12,7 +12,7 @@ FEATURES_PROVIDED += highlevel_stdio # This configuration enables modules that are only available when using Kconfig # module modelling ifeq (1,$(TEST_KCONFIG)) - KCONFIG_ADD_CONFIG += $(RIOTBOARD)/common/nrf52/nrf52_bootloader.config + KCONFIG_BOARD_CONFIG += $(RIOTBOARD)/common/nrf52/nrf52_bootloader.config endif include $(RIOTBOARD)/common/nrf52/Makefile.features diff --git a/boards/msbiot/Makefile.features b/boards/msbiot/Makefile.features index d4346ad56e..55ac53bdfc 100644 --- a/boards/msbiot/Makefile.features +++ b/boards/msbiot/Makefile.features @@ -12,4 +12,4 @@ FEATURES_PROVIDED += periph_timer FEATURES_PROVIDED += periph_uart # msbiot provides a custom default Kconfig clock configuration -KCONFIG_ADD_CONFIG += $(RIOTBOARD)/msbiot/clock.config +KCONFIG_BOARD_CONFIG += $(RIOTBOARD)/msbiot/clock.config diff --git a/boards/mulle/Makefile.features b/boards/mulle/Makefile.features index ba8aa8fa3d..58744387ea 100644 --- a/boards/mulle/Makefile.features +++ b/boards/mulle/Makefile.features @@ -22,5 +22,5 @@ FEATURES_PROVIDED += periph_uart # This configuration enables modules that are only available when using Kconfig # module modelling ifeq (1, $(TEST_KCONFIG)) - KCONFIG_ADD_CONFIG += $(BOARDDIR)/mulle.config + KCONFIG_BOARD_CONFIG += $(BOARDDIR)/mulle.config endif diff --git a/boards/nrf52840-mdk-dongle/Makefile.features b/boards/nrf52840-mdk-dongle/Makefile.features index a4fe12567f..d84ce78dc5 100644 --- a/boards/nrf52840-mdk-dongle/Makefile.features +++ b/boards/nrf52840-mdk-dongle/Makefile.features @@ -11,7 +11,7 @@ FEATURES_PROVIDED += highlevel_stdio # This configuration enables modules that are only available when using Kconfig # module modelling ifeq (1,$(TEST_KCONFIG)) - KCONFIG_ADD_CONFIG += $(RIOTBOARD)/common/nrf52/nrf52_bootloader.config + KCONFIG_BOARD_CONFIG += $(RIOTBOARD)/common/nrf52/nrf52_bootloader.config endif include $(RIOTBOARD)/common/nrf52/Makefile.features diff --git a/boards/nrf52840dongle/Makefile.features b/boards/nrf52840dongle/Makefile.features index 8f0f1f65a9..4e5af160fb 100644 --- a/boards/nrf52840dongle/Makefile.features +++ b/boards/nrf52840dongle/Makefile.features @@ -15,7 +15,7 @@ FEATURES_PROVIDED += highlevel_stdio # This configuration enables modules that are only available when using Kconfig # module modelling ifeq (1,$(TEST_KCONFIG)) - KCONFIG_ADD_CONFIG += $(RIOTBOARD)/common/nrf52/nrf52_bootloader.config + KCONFIG_BOARD_CONFIG += $(RIOTBOARD)/common/nrf52/nrf52_bootloader.config endif include $(RIOTBOARD)/common/nrf52/Makefile.features diff --git a/boards/pinetime/Makefile.features b/boards/pinetime/Makefile.features index 8eb9b26f79..e3296d8ec1 100644 --- a/boards/pinetime/Makefile.features +++ b/boards/pinetime/Makefile.features @@ -9,7 +9,7 @@ FEATURES_PROVIDED += vdd_lc_filter_reg1 # This configuration enables modules that are only available when using Kconfig # module modelling ifeq (1, $(TEST_KCONFIG)) - KCONFIG_ADD_CONFIG += $(BOARDDIR)/pinetime.config + KCONFIG_BOARD_CONFIG += $(BOARDDIR)/pinetime.config endif include $(RIOTBOARD)/common/nrf52/Makefile.features diff --git a/boards/pyboard/Makefile.features b/boards/pyboard/Makefile.features index 08918f30d4..841e68ca3b 100644 --- a/boards/pyboard/Makefile.features +++ b/boards/pyboard/Makefile.features @@ -11,4 +11,4 @@ FEATURES_PROVIDED += periph_uart FEATURES_PROVIDED += periph_usbdev # pyboard provides a custom default Kconfig clock configuration -KCONFIG_ADD_CONFIG += $(RIOTBOARD)/pyboard/clock.config +KCONFIG_BOARD_CONFIG += $(RIOTBOARD)/pyboard/clock.config diff --git a/boards/ruuvitag/Makefile.features b/boards/ruuvitag/Makefile.features index fc952501e3..5b18c93a3d 100644 --- a/boards/ruuvitag/Makefile.features +++ b/boards/ruuvitag/Makefile.features @@ -8,7 +8,7 @@ FEATURES_PROVIDED += vdd_lc_filter_reg1 # This configuration enables modules that are only available when using Kconfig # module modelling ifeq (1,$(TEST_KCONFIG)) - KCONFIG_ADD_CONFIG += $(BOARDDIR)/ruuvitag.config + KCONFIG_BOARD_CONFIG += $(BOARDDIR)/ruuvitag.config endif include $(RIOTBOARD)/common/nrf52/Makefile.features diff --git a/boards/stm32f723e-disco/Makefile.features b/boards/stm32f723e-disco/Makefile.features index d6669b2005..4454233875 100644 --- a/boards/stm32f723e-disco/Makefile.features +++ b/boards/stm32f723e-disco/Makefile.features @@ -12,4 +12,4 @@ FEATURES_PROVIDED += periph_uart FEATURES_PROVIDED += periph_usbdev # stm32f723e-disco provides a custom default Kconfig clock configuration -KCONFIG_ADD_CONFIG += $(RIOTBOARD)/stm32f723e-disco/clock.config +KCONFIG_BOARD_CONFIG += $(RIOTBOARD)/stm32f723e-disco/clock.config diff --git a/boards/stm32f746g-disco/Makefile.features b/boards/stm32f746g-disco/Makefile.features index 7e95717f28..431f2899c4 100644 --- a/boards/stm32f746g-disco/Makefile.features +++ b/boards/stm32f746g-disco/Makefile.features @@ -13,4 +13,4 @@ FEATURES_PROVIDED += periph_uart FEATURES_PROVIDED += periph_usbdev # stm32f746g-disco provides a custom default Kconfig clock configuration -KCONFIG_ADD_CONFIG += $(RIOTBOARD)/stm32f746g-disco/clock.config +KCONFIG_BOARD_CONFIG += $(RIOTBOARD)/stm32f746g-disco/clock.config diff --git a/boards/stm32f769i-disco/Makefile.features b/boards/stm32f769i-disco/Makefile.features index faeeabcf38..7a8128e5aa 100644 --- a/boards/stm32f769i-disco/Makefile.features +++ b/boards/stm32f769i-disco/Makefile.features @@ -9,4 +9,4 @@ FEATURES_PROVIDED += periph_uart FEATURES_PROVIDED += periph_usbdev # stm32f769i-disco provides a custom default Kconfig clock configuration -KCONFIG_ADD_CONFIG += $(RIOTBOARD)/stm32f769i-disco/clock.config +KCONFIG_BOARD_CONFIG += $(RIOTBOARD)/stm32f769i-disco/clock.config diff --git a/boards/thingy52/Makefile.features b/boards/thingy52/Makefile.features index eb7d17ed44..0ec83cf861 100644 --- a/boards/thingy52/Makefile.features +++ b/boards/thingy52/Makefile.features @@ -8,7 +8,7 @@ FEATURES_PROVIDED += vdd_lc_filter_reg1 # This configuration enables modules that are only available when using Kconfig # module modelling ifeq (1, $(TEST_KCONFIG)) - KCONFIG_ADD_CONFIG += $(BOARDDIR)/thingy52.config + KCONFIG_BOARD_CONFIG += $(BOARDDIR)/thingy52.config endif include $(RIOTBOARD)/common/nrf52/Makefile.features diff --git a/boards/ublox-c030-u201/Makefile.features b/boards/ublox-c030-u201/Makefile.features index c1313313a3..26fa7084ed 100644 --- a/boards/ublox-c030-u201/Makefile.features +++ b/boards/ublox-c030-u201/Makefile.features @@ -11,4 +11,4 @@ FEATURES_PROVIDED += periph_timer FEATURES_PROVIDED += periph_uart # ublox-c030-u201 provides a custom default Kconfig clock configuration -KCONFIG_ADD_CONFIG += $(RIOTBOARD)/ublox-c030-u201/clock.config +KCONFIG_BOARD_CONFIG += $(RIOTBOARD)/ublox-c030-u201/clock.config diff --git a/boards/weact-f401cc/Makefile.features b/boards/weact-f401cc/Makefile.features index bdf5a6e2bb..fa1a35efbf 100644 --- a/boards/weact-f401cc/Makefile.features +++ b/boards/weact-f401cc/Makefile.features @@ -3,4 +3,4 @@ CPU_MODEL = stm32f401cc include $(RIOTBOARD)/common/weact-f4x1cx/Makefile.features # weact-f401cc provides a custom default Kconfig clock configuration -KCONFIG_ADD_CONFIG += $(RIOTBOARD)/weact-f401cc/clock.config +KCONFIG_BOARD_CONFIG += $(RIOTBOARD)/weact-f401cc/clock.config diff --git a/boards/weact-f401ce/Makefile.features b/boards/weact-f401ce/Makefile.features index edb1d08a28..6921886adc 100644 --- a/boards/weact-f401ce/Makefile.features +++ b/boards/weact-f401ce/Makefile.features @@ -3,4 +3,4 @@ CPU_MODEL = stm32f401ce include $(RIOTBOARD)/common/weact-f4x1cx/Makefile.features # weact-f401ce provides a custom default Kconfig clock configuration -KCONFIG_ADD_CONFIG += $(RIOTBOARD)/weact-f401ce/clock.config +KCONFIG_BOARD_CONFIG += $(RIOTBOARD)/weact-f401ce/clock.config diff --git a/boards/weact-f411ce/Makefile.features b/boards/weact-f411ce/Makefile.features index d457ce74bf..8f3a504e16 100644 --- a/boards/weact-f411ce/Makefile.features +++ b/boards/weact-f411ce/Makefile.features @@ -3,4 +3,4 @@ CPU_MODEL = stm32f411ce include $(RIOTBOARD)/common/weact-f4x1cx/Makefile.features # weact-f411ce provides a custom default Kconfig clock configuration -KCONFIG_ADD_CONFIG += $(RIOTBOARD)/weact-f411ce/clock.config +KCONFIG_BOARD_CONFIG += $(RIOTBOARD)/weact-f411ce/clock.config diff --git a/boards/yarm/Makefile.features b/boards/yarm/Makefile.features index f0b8d87a80..cefe1dd6b3 100644 --- a/boards/yarm/Makefile.features +++ b/boards/yarm/Makefile.features @@ -18,5 +18,5 @@ FEATURES_PROVIDED += riotboot # This configuration enables modules that are only available when using Kconfig # module modelling ifeq (1, $(TEST_KCONFIG)) - KCONFIG_ADD_CONFIG += $(BOARDDIR)/yarm.config + KCONFIG_BOARD_CONFIG += $(BOARDDIR)/yarm.config endif diff --git a/cpu/atxmega/Makefile.features b/cpu/atxmega/Makefile.features index 975be19ed6..7908685a4f 100644 --- a/cpu/atxmega/Makefile.features +++ b/cpu/atxmega/Makefile.features @@ -17,5 +17,5 @@ FEATURES_PROVIDED += periph_timer periph_timer_periodic # Add atxmega configurations. This configuration enables modules that are only available when # using Kconfig module modelling ifeq (1, $(TEST_KCONFIG)) - KCONFIG_ADD_CONFIG += $(RIOTCPU)/atxmega/atxmega.config + KCONFIG_CPU_CONFIG += $(RIOTCPU)/atxmega/atxmega.config endif diff --git a/cpu/cc2538/Makefile.features b/cpu/cc2538/Makefile.features index 27bd934a5f..a25dc67994 100644 --- a/cpu/cc2538/Makefile.features +++ b/cpu/cc2538/Makefile.features @@ -19,5 +19,5 @@ include $(RIOTCPU)/cortexm_common/Makefile.features # This configuration enables modules that are only available when using Kconfig # module modelling ifeq (1, $(TEST_KCONFIG)) - KCONFIG_ADD_CONFIG += $(RIOTCPU)/cc2538/cc2538.config + KCONFIG_CPU_CONFIG += $(RIOTCPU)/cc2538/cc2538.config endif diff --git a/cpu/cortexm_common/Makefile.features b/cpu/cortexm_common/Makefile.features index 5c1e56f60f..aa667450f6 100644 --- a/cpu/cortexm_common/Makefile.features +++ b/cpu/cortexm_common/Makefile.features @@ -43,5 +43,5 @@ FEATURES_PROVIDED += no_idle_thread # This configuration enables modules that are only available when using Kconfig # module modelling ifeq (1, $(TEST_KCONFIG)) - KCONFIG_ADD_CONFIG += $(RIOTCPU)/cortexm_common/cortexm_common.config + KCONFIG_CPU_CONFIG += $(RIOTCPU)/cortexm_common/cortexm_common.config endif diff --git a/cpu/efm32/Makefile.features b/cpu/efm32/Makefile.features index e7bd4ce41e..47e9bb76b0 100644 --- a/cpu/efm32/Makefile.features +++ b/cpu/efm32/Makefile.features @@ -38,5 +38,5 @@ include $(RIOTCPU)/cortexm_common/Makefile.features # This configuration enables modules that are only available when using Kconfig # module modelling ifeq (1,$(TEST_KCONFIG)) - KCONFIG_ADD_CONFIG += $(RIOTCPU)/efm32/efm32.config + KCONFIG_CPU_CONFIG += $(RIOTCPU)/efm32/efm32.config endif diff --git a/cpu/kinetis/Makefile.features b/cpu/kinetis/Makefile.features index c8735849a5..3a47100142 100644 --- a/cpu/kinetis/Makefile.features +++ b/cpu/kinetis/Makefile.features @@ -37,5 +37,5 @@ include $(RIOTCPU)/cortexm_common/Makefile.features # This configuration enables modules that are only available when using Kconfig # module modelling ifeq (1, $(TEST_KCONFIG)) - KCONFIG_ADD_CONFIG += $(RIOTCPU)/kinetis/kinetis.config + KCONFIG_CPU_CONFIG += $(RIOTCPU)/kinetis/kinetis.config endif diff --git a/cpu/lpc1768/Makefile.features b/cpu/lpc1768/Makefile.features index 62c0d92de0..64de7f5367 100644 --- a/cpu/lpc1768/Makefile.features +++ b/cpu/lpc1768/Makefile.features @@ -12,5 +12,5 @@ include $(RIOTCPU)/cortexm_common/Makefile.features # This configuration enables modules that are only available when using Kconfig # module modelling ifeq (1, $(TEST_KCONFIG)) - KCONFIG_ADD_CONFIG += $(RIOTCPU)/lpc1768/lpc1768.config + KCONFIG_CPU_CONFIG += $(RIOTCPU)/lpc1768/lpc1768.config endif diff --git a/cpu/lpc23xx/Makefile.features b/cpu/lpc23xx/Makefile.features index db4d1b2df8..4c60626e51 100644 --- a/cpu/lpc23xx/Makefile.features +++ b/cpu/lpc23xx/Makefile.features @@ -11,5 +11,5 @@ include $(RIOTCPU)/arm7_common/Makefile.features # This configuration enables modules that are only available when using Kconfig # module modelling ifeq (1, $(TEST_KCONFIG)) - KCONFIG_ADD_CONFIG += $(RIOTCPU)/lpc23xx/lpc23xx.config + KCONFIG_CPU_CONFIG += $(RIOTCPU)/lpc23xx/lpc23xx.config endif diff --git a/cpu/native/Makefile.features b/cpu/native/Makefile.features index e1e258db64..0e237bea44 100644 --- a/cpu/native/Makefile.features +++ b/cpu/native/Makefile.features @@ -32,5 +32,5 @@ endif # This configuration enables modules that are only available when using Kconfig # module modelling ifeq (1, $(TEST_KCONFIG)) - KCONFIG_ADD_CONFIG += $(RIOTCPU)/native/native.config + KCONFIG_CPU_CONFIG += $(RIOTCPU)/native/native.config endif diff --git a/cpu/sam0_common/Makefile.features b/cpu/sam0_common/Makefile.features index e541dc161b..666e37bc93 100644 --- a/cpu/sam0_common/Makefile.features +++ b/cpu/sam0_common/Makefile.features @@ -31,5 +31,5 @@ include $(RIOTCPU)/cortexm_common/Makefile.features # This configuration enables modules that are only available when using Kconfig # module modelling ifeq (1, $(TEST_KCONFIG)) - KCONFIG_ADD_CONFIG += $(RIOTCPU)/sam0_common/sam0_common.config + KCONFIG_CPU_CONFIG += $(RIOTCPU)/sam0_common/sam0_common.config endif diff --git a/cpu/stm32/Makefile.features b/cpu/stm32/Makefile.features index 262ecbd295..06a7e47285 100644 --- a/cpu/stm32/Makefile.features +++ b/cpu/stm32/Makefile.features @@ -58,11 +58,11 @@ ifneq (,$(filter $(CPU_MODEL),$(STM32_WITH_MPU))) FEATURES_PROVIDED += cortexm_mpu endif -# Add stm32 configs after including cortexm_common so stm32 takes precendence +include $(RIOTCPU)/cortexm_common/Makefile.features + +# Add stm32 configs after including cortexm_common so stm32 takes precedence # This configuration enables modules that are only available when using Kconfig # module modelling ifeq (1, $(TEST_KCONFIG)) - KCONFIG_ADD_CONFIG += $(RIOTCPU)/stm32/stm32.config + KCONFIG_CPU_CONFIG += $(RIOTCPU)/stm32/stm32.config endif - -include $(RIOTCPU)/cortexm_common/Makefile.features diff --git a/doc/doxygen/src/kconfig/kconfig.md b/doc/doxygen/src/kconfig/kconfig.md index 3d8fb0b3d9..b030825e31 100644 --- a/doc/doxygen/src/kconfig/kconfig.md +++ b/doc/doxygen/src/kconfig/kconfig.md @@ -63,7 +63,10 @@ files. Two files will be sources of configuration during the generation of the final header file: `app.config` and `user.config`, which should be placed inside the application's folder. `app.config` sets default configuration values for the particular application, the user can override them by setting -them in `user.config`. +them in `user.config`. Additionally, further `.config` files can be added to +the variable `KCONFIG_ADD_CONFIG`, which will be applied _after_ default CPU and +board configurations, `app.config` and `user.config`. This means that they will +have priority. Let's say that the `SOCK_UTIL_SCHEME_MAXLEN` symbol in `sock_util` module needs to be configured. The `user.config` file could look like: @@ -458,6 +461,34 @@ config BOARD_SAMR21_XPRO select HAS_RIOTBOOT ``` +### Default configurations + +Boards, common board directories, CPUs and common CPU directories may need to +override default configuration values. Visible configuration symbols are +configurable by the user and show on the menuconfig interface. `.config` files +are used to set their values. To allow multiple sources of `.config` files, +there are two Makefile variables developers should use: `KCONFIG_CPU_CONFIG` for +sources added by the CPU or common CPU directories, and `KCONFIG_BOARD_CONFIG` +for sources added by the board or common board directories. This ensures the +correct priority of the configurations. + +Currently the `Makefile.features` infrastructure is used to populate the +configuration sources. As the order in which `.config` files are merged matters, +configuration sources should be ordered from more generic to more specific. +Because board's `Makefile.features` is included before CPU's `Makefile.features` +it is important to utilize two different lists of configuration sources. For +instance, if `cpu/cortexm_common` adds its configuration, `cpu/stm32` should add +its configuration after it, and `boards/stm32f769i-disco` after it. + +```Makefile +include $(RIOTCPU)/cortexm_common/Makefile.features + +# Add stm32 configs after including cortexm_common so stm32 takes precedence +ifeq (1, $(TEST_KCONFIG)) + KCONFIG_CPU_CONFIG += $(RIOTCPU)/stm32/stm32.config +endif +``` + ## Summary of reserved Kconfig prefixes The following symbol prefixes have been assigned particular semantics and are reserved for the cases described below: diff --git a/makefiles/kconfig.mk b/makefiles/kconfig.mk index b321f2795b..189d13c685 100644 --- a/makefiles/kconfig.mk +++ b/makefiles/kconfig.mk @@ -61,13 +61,17 @@ KCONFIG_OUT_DEP = $(KCONFIG_OUT_CONFIG).d # Add configurations to merge, in ascendent priority (i.e. a file overrides the # previous ones). # -# KCONFIG_ADD_CONFIG holds a list of .config files that are merged for the -# initial configuration. This allows to split configurations in common files -# and share them among boards or cpus. +# KCONFIG_CPU_CONFIG, KCONFIG_BOARD_CONFIG and KCONFIG_ADD_CONFIG hold a lists +# of .config files that are merged for the initial configuration. This allows +# to split configurations in common files and share them among boards or cpus. +# Files are merged from more generic to more specific. # This file will contain application default configurations used for Kconfig Test +MERGE_SOURCES += $(KCONFIG_CPU_CONFIG) +MERGE_SOURCES += $(KCONFIG_BOARD_CONFIG) MERGE_SOURCES += $(KCONFIG_ADD_CONFIG) MERGE_SOURCES += $(wildcard $(KCONFIG_APP_CONFIG)) MERGE_SOURCES += $(wildcard $(KCONFIG_USER_CONFIG)) + MERGE_SOURCES += $(KCONFIG_GENERATED_ENV_CONFIG) # Create directory to place generated files