1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2024-12-29 04:50:03 +01:00

boards: conditionally include samd21-arduino-bootloader

samd21-arduino-bootloader and its dependencies will only be
included if no other stdio_% (other than stdio_cdc_acm) is included.
This commit is contained in:
Francisco Molina 2020-03-20 10:47:48 +01:00
parent ad0abd3322
commit 1387b736b7
No known key found for this signature in database
GPG Key ID: 3E94EAC3DBDEEDA8
11 changed files with 61 additions and 15 deletions

View File

@ -1,3 +1,8 @@
MODULE = boards_common_arduino-mkr
ifneq (,$(filter boards_common_samd21-arduino-bootloader,$(USEMODULE)))
# Add the samd21-arduino-bootloader directory to the build
DIRS += $(RIOTBOARD)/common/samd21-arduino-bootloader
endif
include $(RIOTBASE)/Makefile.base

View File

@ -2,5 +2,13 @@ ifneq (,$(filter saul_default,$(USEMODULE)))
USEMODULE += saul_gpio
endif
# setup the samd21 arduino bootloader related dependencies
include $(RIOTBOARD)/common/samd21-arduino-bootloader/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

View File

@ -1,10 +1,5 @@
# Provide stdio over USB by default
# This is a temporary solution until management of stdio is correctly
# handled by the build system
DEFAULT_MODULE += stdio_cdc_acm
# This boards requires support for Arduino bootloader.
USEMODULE += usb_board_reset
USEMODULE += boards_common_samd21-arduino-bootloader
USEMODULE += stdio_cdc_acm
FEATURES_REQUIRED += bootloader_arduino

View File

@ -26,6 +26,3 @@ term-delay:
TESTRUNNER_CONNECT_DELAY ?= $(TERM_DELAY)
$(call target-export-variables,test,TESTRUNNER_CONNECT_DELAY)
# Add the samd21-arduino-bootloader directory to the build
DIRS += $(RIOTBOARD)/common/samd21-arduino-bootloader

View File

@ -19,6 +19,8 @@
* @}
*/
#ifdef MODULE_BOARDS_COMMON_SAMD21_ARDUINO_BOOTLOADER
#define USB_H_USER_IS_RIOT_INTERNAL
#include "usb_board_reset.h"
@ -41,3 +43,6 @@ void usb_board_reset_in_bootloader(void)
usb_board_reset_in_application();
}
#else
typedef int dont_be_pedantic;
#endif /* MODULE_BOARDS_COMMON_SAMD21_ARDUINO_BOOTLOADER */

View File

@ -1,3 +1,8 @@
MODULE = boards_common_sodaq
ifneq (,$(filter boards_common_samd21-arduino-bootloader,$(USEMODULE)))
# Add the samd21-arduino-bootloader directory to the build
DIRS += $(RIOTBOARD)/common/samd21-arduino-bootloader
endif
include $(RIOTBASE)/Makefile.base

View File

@ -2,5 +2,13 @@ ifneq (,$(filter saul_default,$(USEMODULE)))
USEMODULE += saul_gpio
endif
# setup the samd21 arduino bootloader related dependencies
include $(RIOTBOARD)/common/samd21-arduino-bootloader/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

View File

@ -1,3 +1,8 @@
MODULE = board
ifneq (,$(filter boards_common_samd21-arduino-bootloader,$(USEMODULE)))
# Add the samd21-arduino-bootloader directory to the build
DIRS += $(RIOTBOARD)/common/samd21-arduino-bootloader
endif
include $(RIOTBASE)/Makefile.base

View File

@ -2,5 +2,13 @@ ifneq (,$(filter saul_default,$(USEMODULE)))
USEMODULE += saul_gpio
endif
# setup the samd21 arduino bootloader related dependencies
include $(RIOTBOARD)/common/samd21-arduino-bootloader/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

View File

@ -1,3 +1,8 @@
MODULE = board
ifneq (,$(filter boards_common_samd21-arduino-bootloader,$(USEMODULE)))
# Add the samd21-arduino-bootloader directory to the build
DIRS += $(RIOTBOARD)/common/samd21-arduino-bootloader
endif
include $(RIOTBASE)/Makefile.base

View File

@ -1,3 +1,8 @@
MODULE = board
ifneq (,$(filter boards_common_samd21-arduino-bootloader,$(USEMODULE)))
# Add the samd21-arduino-bootloader directory to the build
DIRS += $(RIOTBOARD)/common/samd21-arduino-bootloader
endif
include $(RIOTBASE)/Makefile.base