Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions boards/common/arduino-mkr/Makefile
Original file line number Diff line number Diff line change
@@ -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
12 changes: 10 additions & 2 deletions boards/common/arduino-mkr/Makefile.dep
Original file line number Diff line number Diff line change
Expand Up @@ -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
7 changes: 1 addition & 6 deletions boards/common/samd21-arduino-bootloader/Makefile.dep
Original file line number Diff line number Diff line change
@@ -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
3 changes: 0 additions & 3 deletions boards/common/samd21-arduino-bootloader/Makefile.include
Original file line number Diff line number Diff line change
Expand Up @@ -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
5 changes: 5 additions & 0 deletions boards/common/samd21-arduino-bootloader/reset.c
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@
* @}
*/

#ifdef MODULE_BOARDS_COMMON_SAMD21_ARDUINO_BOOTLOADER

#define USB_H_USER_IS_RIOT_INTERNAL

#include "usb_board_reset.h"
Expand All @@ -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 */
5 changes: 5 additions & 0 deletions boards/common/sodaq/Makefile
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
MODULE = boards_common_sodaq

ifneq (,$(filter boards_common_samd21-arduino-bootloader,$(USEMODULE)))
Comment thread
fjmolinas marked this conversation as resolved.
# Add the samd21-arduino-bootloader directory to the build
DIRS += $(RIOTBOARD)/common/samd21-arduino-bootloader
endif

include $(RIOTBASE)/Makefile.base
12 changes: 10 additions & 2 deletions boards/common/sodaq/Makefile.dep
Original file line number Diff line number Diff line change
Expand Up @@ -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
5 changes: 5 additions & 0 deletions boards/feather-m0/Makefile
Original file line number Diff line number Diff line change
@@ -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
12 changes: 10 additions & 2 deletions boards/feather-m0/Makefile.dep
Original file line number Diff line number Diff line change
Expand Up @@ -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
5 changes: 5 additions & 0 deletions boards/sodaq-one/Makefile
Original file line number Diff line number Diff line change
@@ -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
5 changes: 5 additions & 0 deletions boards/sodaq-sara-aff/Makefile
Original file line number Diff line number Diff line change
@@ -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