From 57d5a1db1c04edcfff21429b7a6610af03ac5ca0 Mon Sep 17 00:00:00 2001 From: Alexandre Abadie Date: Sat, 16 Nov 2019 14:23:13 +0100 Subject: [PATCH 1/5] boards: provide stdio_rtt as default module where required For the moment, hamilton, ruuvitag and thingy52 use stdio_rtt by default. --- boards/hamilton/Makefile.dep | 3 +++ boards/hamilton/Makefile.include | 8 +++----- boards/ruuvitag/Makefile.dep | 3 +++ boards/ruuvitag/Makefile.include | 12 ++++++++---- boards/thingy52/Makefile.dep | 3 +++ boards/thingy52/Makefile.include | 12 ++++++++---- makefiles/tools/serial.inc.mk | 3 +++ 7 files changed, 31 insertions(+), 13 deletions(-) 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/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 From f5cbe00118193cecedc9b3c941faab265b35e38b Mon Sep 17 00:00:00 2001 From: Alexandre Abadie Date: Sat, 16 Nov 2019 14:26:02 +0100 Subject: [PATCH 2/5] Makefile.dep: disable stdio_rtt when stdio_uart is used --- Makefile.dep | 3 +++ 1 file changed, 3 insertions(+) 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))) From 01d7384b7dbcf41e9e7ec81879032317dd36f6b7 Mon Sep 17 00:00:00 2001 From: Alexandre Abadie Date: Sat, 16 Nov 2019 14:27:57 +0100 Subject: [PATCH 3/5] tests/gnrc_*: remove useless BOARD_BLACKLIST chronos is indirectly blacklisted because of missing periph_uart feature. hamilton doesn't provide periph_uart when stdio_rtt is disabled (because of ethos dependency to stdio_uart) and ruuvitag/thingy52 provide the periph_uart feature so stdio_uart can work on these boards. --- tests/gnrc_ipv6_ext/Makefile | 3 --- tests/gnrc_ipv6_ext_frag/Makefile | 3 --- tests/gnrc_rpl_srh/Makefile | 3 --- tests/gnrc_sock_dns/Makefile | 3 --- tests/gnrc_tcp/Makefile | 3 --- 5 files changed, 15 deletions(-) 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 From a12af69752de9d5cdda783bd52aa9111837edd63 Mon Sep 17 00:00:00 2001 From: Alexandre Abadie Date: Sat, 16 Nov 2019 14:38:12 +0100 Subject: [PATCH 4/5] examples/gnrc_border_router: remove BOARD_BLACKLIST variable pic32 boards now provide an UART, and this the periph_uart feature ruuvitag/thingy52 provide the periph_uart feature so stdio_uart can work on these boards. --- examples/gnrc_border_router/Makefile | 3 --- 1 file changed, 3 deletions(-) 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))) From 024d4abd999be6ffd35852870b6383b30b389a78 Mon Sep 17 00:00:00 2001 From: Alexandre Abadie Date: Sat, 16 Nov 2019 14:39:25 +0100 Subject: [PATCH 5/5] examples/suit_update: remove boards from insufficient memory list ruuvitag/thingy52 provide the periph_uart feature so stdio_uart can work on these boards even if stdio_rtt is disabled because of ethos. --- examples/suit_update/Makefile.ci | 2 -- 1 file changed, 2 deletions(-) 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 \