diff --git a/boards/sensebox_samd21/Kconfig b/boards/sensebox_samd21/Kconfig index df42e1051c..2f08f34387 100644 --- a/boards/sensebox_samd21/Kconfig +++ b/boards/sensebox_samd21/Kconfig @@ -19,3 +19,4 @@ config BOARD_SENSEBOX_SAMD21 select HAS_PERIPH_TIMER select HAS_PERIPH_UART select HAS_PERIPH_USBDEV + select HAS_HIGHLEVEL_STDIO diff --git a/boards/sensebox_samd21/Makefile b/boards/sensebox_samd21/Makefile index f8fcbb53a0..c05443c508 100644 --- a/boards/sensebox_samd21/Makefile +++ b/boards/sensebox_samd21/Makefile @@ -1,3 +1,5 @@ MODULE = board +DIRS = $(RIOTBOARD)/common/samdx1-arduino-bootloader + include $(RIOTBASE)/Makefile.base diff --git a/boards/sensebox_samd21/Makefile.dep b/boards/sensebox_samd21/Makefile.dep index 5472bf8b8d..716e2eadfb 100644 --- a/boards/sensebox_samd21/Makefile.dep +++ b/boards/sensebox_samd21/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/samdx1-arduino-bootloader/Makefile.dep diff --git a/boards/sensebox_samd21/Makefile.features b/boards/sensebox_samd21/Makefile.features index e5b79684b9..6eae3247bb 100644 --- a/boards/sensebox_samd21/Makefile.features +++ b/boards/sensebox_samd21/Makefile.features @@ -10,3 +10,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 += highlevel_stdio diff --git a/boards/sensebox_samd21/Makefile.include b/boards/sensebox_samd21/Makefile.include index 0ccbc79afd..527c3231c6 100644 --- a/boards/sensebox_samd21/Makefile.include +++ b/boards/sensebox_samd21/Makefile.include @@ -3,14 +3,16 @@ PROGRAMMER ?= bossa PROGRAMMERS_SUPPORTED += bossa -# setup the flash tool used -ifeq ($(PROGRAMMER),jlink) - # in case J-Link is attached to SWD pins, use a plain CPU memory model - JLINK_DEVICE = atsamd21 -else ifeq ($(PROGRAMMER),bossa) +# in case J-Link is attached to SWD pins, use a plain CPU memory model +JLINK_DEVICE = atsamd21 + +ifeq ($(PROGRAMMER),bossa) # ROM_OFFSET skips the space taken by the pre-flashed Arduino bootloader. ROM_OFFSET ?= 0x2000 endif -# setup the boards dependencies -include $(RIOTBOARD)/sensebox_samd21/Makefile.dep +# Include all definitions for flashing with bossa over USB +include $(RIOTBOARD)/common/samdx1-arduino-bootloader/Makefile.include + +# Include handling of serial and non-bossa programmers (if selected by user) +include $(RIOTMAKE)/boards/sam0.inc.mk diff --git a/boards/sensebox_samd21/doc.txt b/boards/sensebox_samd21/doc.txt index aa5bdabc1d..d257941249 100644 --- a/boards/sensebox_samd21/doc.txt +++ b/boards/sensebox_samd21/doc.txt @@ -26,8 +26,11 @@ SenseBox board is based on the Atmel SAMD21G18A microcontroller. See ### Accessing STDIO via UART -To access the STDIO of RIOT, a FTDI to USB converted needs to be plugged to -the UART/Serial 1 pins on the board. +STDIO of RIOT is directly available over the USB port. + +The `TERM_DELAY` environment variable can be used to add a delay (in second) +before opening the serial terminal. The default value is 2s which should be +enough in most of the situation. ### On I2C port I2C port is enabled by default. To disable it use ```I2C_DISABLE```. To diff --git a/tests/bench_xtimer/Makefile b/tests/bench_xtimer/Makefile index d9f77767db..0150156d7d 100644 --- a/tests/bench_xtimer/Makefile +++ b/tests/bench_xtimer/Makefile @@ -55,6 +55,7 @@ LOW_MEMORY_BOARDS += \ opencm904 \ saml10-xpro \ saml11-xpro \ + sensebox_samd21 \ serpente \ sodaq-autonomo \ sodaq-explorer \