diff --git a/makefiles/features_modules.inc.mk b/makefiles/features_modules.inc.mk index a903aad5e1..bf81715dc1 100644 --- a/makefiles/features_modules.inc.mk +++ b/makefiles/features_modules.inc.mk @@ -97,3 +97,10 @@ USEMODULE += $(filter vdd_lc_filter_%,$(FEATURES_USED)) # select arduino_pwm pseudomodule if the corresponding feature is used USEMODULE += $(filter arduino_pwm, $(FEATURES_USED)) + +# always register a peripheral driver as a required feature when the corresponding +# module is requested +PERIPH_IGNORE_MODULES += periph_usbdev_clk periph_gpio_mock periph_gpio_linux +ifneq (,$(filter periph_%,$(DEFAULT_MODULE))) + FEATURES_REQUIRED += $(filter-out $(PERIPH_IGNORE_MODULES),$(filter periph_%,$(USEMODULE))) +endif