diff --git a/Makefile.dep b/Makefile.dep index dde5823a2e..50cff55a02 100644 --- a/Makefile.dep +++ b/Makefile.dep @@ -468,6 +468,9 @@ endif ifneq (,$(filter stdio_uart,$(USEMODULE))) FEATURES_REQUIRED += periph_uart + + # stdio_rtt cannot be used when stdio_uart is loaded + DISABLE_MODULE += stdio_rtt endif ifneq (,$(filter isrpipe,$(USEMODULE))) diff --git a/boards/hamilton/Makefile.dep b/boards/hamilton/Makefile.dep index ad80fdaf73..6cd0a4e555 100644 --- a/boards/hamilton/Makefile.dep +++ b/boards/hamilton/Makefile.dep @@ -12,3 +12,6 @@ ifneq (,$(filter saul_default,$(USEMODULE))) # ToDo: peripherals to be added in the future #USEMODULE += apds9007 endif + +# Use Segger's RTT by default for stdio on this board +DEFAULT_MODULE += stdio_rtt diff --git a/boards/hamilton/Makefile.include b/boards/hamilton/Makefile.include index 5e5da486c9..b946467ae6 100644 --- a/boards/hamilton/Makefile.include +++ b/boards/hamilton/Makefile.include @@ -3,10 +3,8 @@ export JLINK_DEVICE := atsamr21e18a OBJDUMPFLAGS += --disassemble --source --disassembler-options=force-thumb OFLAGS := --gap-fill 0xff -# Configure terminal, hamilton doesn't provide any UART, thus use RTT -TERMPROG = $(RIOTTOOLS)/jlink/jlink.sh -TERMFLAGS = term-rtt - -USEMODULE += stdio_rtt +# use JLink Segger RTT by default +RIOT_TERMINAL ?= jlink +include $(RIOTMAKE)/tools/serial.inc.mk include $(RIOTMAKE)/tools/jlink.inc.mk diff --git a/boards/ruuvitag/Makefile.dep b/boards/ruuvitag/Makefile.dep index 6cc6655ce2..5a8a397363 100644 --- a/boards/ruuvitag/Makefile.dep +++ b/boards/ruuvitag/Makefile.dep @@ -4,4 +4,7 @@ ifneq (,$(filter saul_default,$(USEMODULE))) USEMODULE += lis2dh12_spi endif +# Use Segger's RTT by default for stdio on this board +DEFAULT_MODULE += stdio_rtt + include $(RIOTBOARD)/common/nrf52/Makefile.dep diff --git a/boards/ruuvitag/Makefile.include b/boards/ruuvitag/Makefile.include index eff65c33fe..048ba8f4f6 100644 --- a/boards/ruuvitag/Makefile.include +++ b/boards/ruuvitag/Makefile.include @@ -1,7 +1,11 @@ -# for this board, we are using Segger's RTT as default terminal interface -USEMODULE += stdio_rtt -TERMPROG = $(RIOTTOOLS)/jlink/jlink.sh -TERMFLAGS = term-rtt +# HACK: replicate dependency resolution in Makefile.dep, only works +# if `USEMODULE` or `DEFAULT_MODULE` is set by the command line or in the +# application Makefile. +ifeq (,$(filter stdio_%,$(DISABLE_MODULE) $(USEMODULE))) + RIOT_TERMINAL ?= jlink +endif + +include $(RIOTMAKE)/tools/serial.inc.mk # use shared Makefile.include include $(RIOTBOARD)/common/nrf52xxxdk/Makefile.include diff --git a/boards/thingy52/Makefile.dep b/boards/thingy52/Makefile.dep index 546af9f8f8..529678057b 100644 --- a/boards/thingy52/Makefile.dep +++ b/boards/thingy52/Makefile.dep @@ -4,4 +4,7 @@ ifneq (,$(filter saul_default,$(USEMODULE))) USEMODULE += lps22hb endif +# Use Segger's RTT by default for stdio on this board +DEFAULT_MODULE += stdio_rtt + include $(RIOTBOARD)/common/nrf52/Makefile.dep diff --git a/boards/thingy52/Makefile.include b/boards/thingy52/Makefile.include index 8d7bb8eeeb..c73c953414 100644 --- a/boards/thingy52/Makefile.include +++ b/boards/thingy52/Makefile.include @@ -1,7 +1,11 @@ -# for this board, we are using Segger's RTT as default terminal interface -USEMODULE += stdio_rtt -TERMPROG = $(RIOTTOOLS)/jlink/jlink.sh -TERMFLAGS = term-rtt +# HACK: replicate dependency resolution in Makefile.dep, only works +# if `USEMODULE` or `DEFAULT_MODULE` is set by the command line or in the +# application Makefile. +ifeq (,$(filter stdio_%,$(DISABLE_MODULE) $(USEMODULE))) + RIOT_TERMINAL ?= jlink +endif + +include $(RIOTMAKE)/tools/serial.inc.mk # use shared Makefile.include include $(RIOTBOARD)/common/nrf52/Makefile.include diff --git a/examples/gnrc_border_router/Makefile b/examples/gnrc_border_router/Makefile index 30fdec09ef..b8f129551a 100644 --- a/examples/gnrc_border_router/Makefile +++ b/examples/gnrc_border_router/Makefile @@ -7,9 +7,6 @@ BOARD ?= samr21-xpro # This has to be the absolute path to the RIOT base directory: RIOTBASE ?= $(CURDIR)/../.. -# The following boards do not have an available UART -BOARD_BLACKLIST += pic32-wifire pic32-clicker ruuvitag thingy52 - # use ethos (ethernet over serial) for network communication and stdio over # UART, but not on native, as native has a tap interface towards the host. ifeq (,$(filter native,$(BOARD))) diff --git a/examples/suit_update/Makefile.ci b/examples/suit_update/Makefile.ci index 977248ea1e..40076ce49e 100644 --- a/examples/suit_update/Makefile.ci +++ b/examples/suit_update/Makefile.ci @@ -18,12 +18,10 @@ BOARD_INSUFFICIENT_MEMORY := \ nucleo-l031k6 \ nucleo-l053r8 \ nucleo-l073rz \ - ruuvitag \ saml10-xpro \ saml11-xpro \ stm32f0discovery \ telosb \ - thingy52 \ waspmote-pro \ wsn430-v1_3b \ wsn430-v1_4 \ diff --git a/makefiles/tools/serial.inc.mk b/makefiles/tools/serial.inc.mk index 570fe1c2b5..6653c5e13d 100644 --- a/makefiles/tools/serial.inc.mk +++ b/makefiles/tools/serial.inc.mk @@ -26,4 +26,7 @@ else ifeq ($(RIOT_TERMINAL),miniterm) # The RIOT shell will still transmit back a CRLF, but at least with --eol LF # we avoid sending two lines on every "enter". TERMFLAGS ?= --eol LF "$(PORT)" "$(BAUD)" +else ifeq ($(RIOT_TERMINAL),jlink) + TERMPROG = $(RIOTTOOLS)/jlink/jlink.sh + TERMFLAGS = term-rtt endif diff --git a/tests/gnrc_ipv6_ext/Makefile b/tests/gnrc_ipv6_ext/Makefile index 778d361c70..188911d7a6 100644 --- a/tests/gnrc_ipv6_ext/Makefile +++ b/tests/gnrc_ipv6_ext/Makefile @@ -2,9 +2,6 @@ DEVELHELP := 1 # name of your application include ../Makefile.tests_common -# chronos, hamilton and ruuvitag boards don't support ethos -BOARD_BLACKLIST := chronos hamilton ruuvitag - export TAP ?= tap0 # use Ethernet as link-layer protocol diff --git a/tests/gnrc_ipv6_ext_frag/Makefile b/tests/gnrc_ipv6_ext_frag/Makefile index d3e2748da0..eaac0d07b8 100644 --- a/tests/gnrc_ipv6_ext_frag/Makefile +++ b/tests/gnrc_ipv6_ext_frag/Makefile @@ -2,9 +2,6 @@ DEVELHELP := 1 # name of your application include ../Makefile.tests_common -# chronos, hamilton, ruuvitag, and thingy52 boards don't support ethos -BOARD_BLACKLIST := chronos hamilton ruuvitag thingy52 - export TAP ?= tap0 CFLAGS += -DOUTPUT=TEXT diff --git a/tests/gnrc_rpl_srh/Makefile b/tests/gnrc_rpl_srh/Makefile index 344c66dc78..05100fdc92 100644 --- a/tests/gnrc_rpl_srh/Makefile +++ b/tests/gnrc_rpl_srh/Makefile @@ -2,9 +2,6 @@ DEVELHELP := 1 # name of your application include ../Makefile.tests_common -# chronos, hamilton and ruuvitag boards don't support ethos -BOARD_BLACKLIST := chronos hamilton ruuvitag - export TAP ?= tap0 CFLAGS += -DOUTPUT=TEXT diff --git a/tests/gnrc_sock_dns/Makefile b/tests/gnrc_sock_dns/Makefile index 33a6424400..ea4515e19d 100644 --- a/tests/gnrc_sock_dns/Makefile +++ b/tests/gnrc_sock_dns/Makefile @@ -2,9 +2,6 @@ include ../Makefile.tests_common RIOTBASE ?= $(CURDIR)/../.. -# chronos, hamilton and ruuvitag boards don't support ethos -BOARD_BLACKLIST := chronos hamilton ruuvitag - export TAP ?= tap0 USEMODULE += sock_dns diff --git a/tests/gnrc_tcp/Makefile b/tests/gnrc_tcp/Makefile index 4c89226c4a..09320692b5 100644 --- a/tests/gnrc_tcp/Makefile +++ b/tests/gnrc_tcp/Makefile @@ -8,9 +8,6 @@ TAP ?= tap0 MSL_US ?= 1000000 TIMEOUT_US ?= 3000000 -# unsupported by ethos: chronos, hamilton, ruuvitag -BOARD_BLACKLIST := chronos hamilton ruuvitag thingy52 - # This test depends on tap device setup (only allowed by root) # Suppress test execution to avoid CI errors TEST_ON_CI_BLACKLIST += all