Skip to content

Commit

Permalink
boards: provide stdio_rtt as default module where required
Browse files Browse the repository at this point in the history
For the moment, hamilton, ruuvitag and thingy52 use stdio_rtt by default.
  • Loading branch information
aabadie committed Jan 14, 2020
1 parent cfbab79 commit 57d5a1d
Show file tree
Hide file tree
Showing 7 changed files with 31 additions and 13 deletions.
3 changes: 3 additions & 0 deletions boards/hamilton/Makefile.dep
Original file line number Diff line number Diff line change
Expand Up @@ -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
8 changes: 3 additions & 5 deletions boards/hamilton/Makefile.include
Original file line number Diff line number Diff line change
Expand Up @@ -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
3 changes: 3 additions & 0 deletions boards/ruuvitag/Makefile.dep
Original file line number Diff line number Diff line change
Expand Up @@ -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
12 changes: 8 additions & 4 deletions boards/ruuvitag/Makefile.include
Original file line number Diff line number Diff line change
@@ -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
3 changes: 3 additions & 0 deletions boards/thingy52/Makefile.dep
Original file line number Diff line number Diff line change
Expand Up @@ -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
12 changes: 8 additions & 4 deletions boards/thingy52/Makefile.include
Original file line number Diff line number Diff line change
@@ -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
3 changes: 3 additions & 0 deletions makefiles/tools/serial.inc.mk
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit 57d5a1d

Please sign in to comment.