From edd4f690a83f3ac09ee7694613e70620134fc8e2 Mon Sep 17 00:00:00 2001 From: Alexandre Abadie Date: Mon, 30 Sep 2019 17:17:24 +0200 Subject: [PATCH] boards/feather-m0: use bootloader_arduino feature This provides automatic reflash/reset and stdio over USB for this board --- boards/feather-m0/Makefile.dep | 3 +++ boards/feather-m0/Makefile.features | 3 +++ boards/feather-m0/Makefile.include | 10 ++-------- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/boards/feather-m0/Makefile.dep b/boards/feather-m0/Makefile.dep index 5472bf8b8d..c15f2eaf26 100644 --- a/boards/feather-m0/Makefile.dep +++ b/boards/feather-m0/Makefile.dep @@ -1,3 +1,6 @@ ifneq (,$(filter saul_default,$(USEMODULE))) USEMODULE += saul_gpio endif + +# setup the samd21 arduino bootloader related dependencies +include $(RIOTBOARD)/common/samd21-arduino-bootloader/Makefile.dep diff --git a/boards/feather-m0/Makefile.features b/boards/feather-m0/Makefile.features index 254a910c83..e1044fadd8 100644 --- a/boards/feather-m0/Makefile.features +++ b/boards/feather-m0/Makefile.features @@ -11,3 +11,6 @@ FEATURES_PROVIDED += periph_spi FEATURES_PROVIDED += periph_timer FEATURES_PROVIDED += periph_uart FEATURES_PROVIDED += periph_usbdev + +# Put other features for this board (in alphabetical order) +FEATURES_PROVIDED += bootloader_arduino diff --git a/boards/feather-m0/Makefile.include b/boards/feather-m0/Makefile.include index 3e58722890..4a1da523b4 100644 --- a/boards/feather-m0/Makefile.include +++ b/boards/feather-m0/Makefile.include @@ -9,13 +9,7 @@ ifeq ($(PROGRAMMER),jlink) # in case J-Link is attached to SWD pins, use a plain CPU memory model JLINK_DEVICE = atsamd21 include $(RIOTMAKE)/tools/jlink.inc.mk -else - # by default, we use BOSSA to flash this board to take into account the - # pre-flashed Arduino bootloader. ROM_OFFSET skips the space taken by - # such bootloader. - ROM_OFFSET ?= 0x2000 - include $(RIOTMAKE)/tools/bossa.inc.mk endif -# setup the boards dependencies -include $(RIOTBOARD)/feather-m0/Makefile.dep +# Include all definitions for flashing with bossa over USB +include $(RIOTBOARD)/common/samd21-arduino-bootloader/Makefile.include