diff --git a/boards/common/arduino-mkr/Makefile.dep b/boards/common/arduino-mkr/Makefile.dep index d5a09e2469..c15f2eaf26 100644 --- a/boards/common/arduino-mkr/Makefile.dep +++ b/boards/common/arduino-mkr/Makefile.dep @@ -2,13 +2,5 @@ ifneq (,$(filter saul_default,$(USEMODULE))) USEMODULE += saul_gpio endif -# use arduino-bootloader only if no other stdio_% other than stdio_cdc_acm -# is requested -ifeq (,$(filter-out stdio_cdc_acm,$(filter stdio_% slipdev_stdio,$(USEMODULE)))) - USEMODULE += boards_common_samd21-arduino-bootloader -endif - -ifneq (,$(filter boards_common_samd21-arduino-bootloader,$(USEMODULE))) - # setup the samd21 arduino bootloader related dependencies - include $(RIOTBOARD)/common/samd21-arduino-bootloader/Makefile.dep -endif +# setup the samd21 arduino bootloader related dependencies +include $(RIOTBOARD)/common/samd21-arduino-bootloader/Makefile.dep diff --git a/boards/common/makefiles/stdio_cdc_acm.mk b/boards/common/makefiles/stdio_cdc_acm.dep.mk similarity index 100% rename from boards/common/makefiles/stdio_cdc_acm.mk rename to boards/common/makefiles/stdio_cdc_acm.dep.mk diff --git a/boards/common/nrf52/bootloader_nrfutil.dep.mk b/boards/common/nrf52/bootloader_nrfutil.dep.mk index e926d8fd30..17876aaf09 100644 --- a/boards/common/nrf52/bootloader_nrfutil.dep.mk +++ b/boards/common/nrf52/bootloader_nrfutil.dep.mk @@ -1,6 +1,6 @@ -include $(RIOTBOARD)/common/makefiles/stdio_cdc_acm.mk +include $(RIOTBOARD)/common/makefiles/stdio_cdc_acm.dep.mk -# enable bootloader reset over USB, requires USB bootloader to be used +# enable bootloader reset over USB, requires CDC ACM to be used ifneq (,$(filter stdio_cdc_acm,$(USEMODULE))) USEMODULE += usb_board_reset endif diff --git a/boards/common/samd21-arduino-bootloader/Makefile.dep b/boards/common/samd21-arduino-bootloader/Makefile.dep index 8d7365a9d2..a735fc652b 100644 --- a/boards/common/samd21-arduino-bootloader/Makefile.dep +++ b/boards/common/samd21-arduino-bootloader/Makefile.dep @@ -1,5 +1,7 @@ -# This boards requires support for Arduino bootloader. -USEMODULE += usb_board_reset -USEMODULE += stdio_cdc_acm +include $(RIOTBOARD)/common/makefiles/stdio_cdc_acm.dep.mk -FEATURES_REQUIRED += highlevel_stdio +# USB Board reset only works if CDC ACM is used +ifneq (,$(filter stdio_cdc_acm,$(USEMODULE))) + USEMODULE += boards_common_samd21-arduino-bootloader + USEMODULE += usb_board_reset +endif diff --git a/boards/common/sodaq/Makefile.dep b/boards/common/sodaq/Makefile.dep index d5a09e2469..c15f2eaf26 100644 --- a/boards/common/sodaq/Makefile.dep +++ b/boards/common/sodaq/Makefile.dep @@ -2,13 +2,5 @@ ifneq (,$(filter saul_default,$(USEMODULE))) USEMODULE += saul_gpio endif -# use arduino-bootloader only if no other stdio_% other than stdio_cdc_acm -# is requested -ifeq (,$(filter-out stdio_cdc_acm,$(filter stdio_% slipdev_stdio,$(USEMODULE)))) - USEMODULE += boards_common_samd21-arduino-bootloader -endif - -ifneq (,$(filter boards_common_samd21-arduino-bootloader,$(USEMODULE))) - # setup the samd21 arduino bootloader related dependencies - include $(RIOTBOARD)/common/samd21-arduino-bootloader/Makefile.dep -endif +# setup the samd21 arduino bootloader related dependencies +include $(RIOTBOARD)/common/samd21-arduino-bootloader/Makefile.dep diff --git a/boards/feather-m0/Makefile.dep b/boards/feather-m0/Makefile.dep index d5a09e2469..c15f2eaf26 100644 --- a/boards/feather-m0/Makefile.dep +++ b/boards/feather-m0/Makefile.dep @@ -2,13 +2,5 @@ ifneq (,$(filter saul_default,$(USEMODULE))) USEMODULE += saul_gpio endif -# use arduino-bootloader only if no other stdio_% other than stdio_cdc_acm -# is requested -ifeq (,$(filter-out stdio_cdc_acm,$(filter stdio_% slipdev_stdio,$(USEMODULE)))) - USEMODULE += boards_common_samd21-arduino-bootloader -endif - -ifneq (,$(filter boards_common_samd21-arduino-bootloader,$(USEMODULE))) - # setup the samd21 arduino bootloader related dependencies - include $(RIOTBOARD)/common/samd21-arduino-bootloader/Makefile.dep -endif +# setup the samd21 arduino bootloader related dependencies +include $(RIOTBOARD)/common/samd21-arduino-bootloader/Makefile.dep diff --git a/boards/serpente/Makefile.dep b/boards/serpente/Makefile.dep index 16babc58c1..311431223f 100644 --- a/boards/serpente/Makefile.dep +++ b/boards/serpente/Makefile.dep @@ -6,13 +6,5 @@ ifneq (,$(filter saul_default,$(USEMODULE))) USEMODULE += saul_gpio endif -# use arduino-bootloader only if no other stdio_% other than stdio_cdc_acm -# is requested -ifeq (,$(filter-out stdio_cdc_acm,$(filter stdio_%,$(USEMODULE)))) - USEMODULE += boards_common_samd21-arduino-bootloader -endif - -ifneq (,$(filter boards_common_samd21-arduino-bootloader,$(USEMODULE))) - # setup the samd21 arduino bootloader related dependencies - include $(RIOTBOARD)/common/samd21-arduino-bootloader/Makefile.dep -endif +# setup the samd21 arduino bootloader related dependencies +include $(RIOTBOARD)/common/samd21-arduino-bootloader/Makefile.dep diff --git a/boards/wemos-zero/Makefile.dep b/boards/wemos-zero/Makefile.dep index 4325c28ce0..c9598d4c16 100644 --- a/boards/wemos-zero/Makefile.dep +++ b/boards/wemos-zero/Makefile.dep @@ -1,12 +1,4 @@ include $(RIOTBOARD)/common/arduino-zero/Makefile.dep -# use arduino-bootloader only if no other stdio_% other than stdio_cdc_acm -# is requested -ifeq (,$(filter-out stdio_cdc_acm,$(filter stdio_%,$(USEMODULE)))) - USEMODULE += boards_common_samd21-arduino-bootloader -endif - -ifneq (,$(filter boards_common_samd21-arduino-bootloader,$(USEMODULE))) - # setup the samd21 arduino bootloader related dependencies - include $(RIOTBOARD)/common/samd21-arduino-bootloader/Makefile.dep -endif +# setup the samd21 arduino bootloader related dependencies +include $(RIOTBOARD)/common/samd21-arduino-bootloader/Makefile.dep