Skip to content

Commit

Permalink
*/Makefile.dep: remove usage of DEFAULT_MODULE += stdio%
Browse files Browse the repository at this point in the history
  • Loading branch information
fjmolinas committed Apr 2, 2020
1 parent cd0b765 commit 0e5205c
Show file tree
Hide file tree
Showing 6 changed files with 20 additions and 25 deletions.
8 changes: 4 additions & 4 deletions boards/feather-nrf52840/Makefile.dep
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Provide stdio over USB by default
# This is a temporary solution until management of stdio is correctly
# handled by the build system
DEFAULT_MODULE += stdio_cdc_acm
# Use stdio_cdc_acm unless another stdio_% is already used
ifeq (,$(filter stdio_% slipdev_stdio,$(USEMODULE)))
USEMODULE += stdio_cdc_acm
endif

ifneq (,$(filter saul_default,$(USEMODULE)))
USEMODULE += saul_gpio
Expand Down
6 changes: 4 additions & 2 deletions boards/hamilton/Makefile.dep
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,7 @@ ifneq (,$(filter saul_default,$(USEMODULE)))
#USEMODULE += apds9007
endif

# Use Segger's RTT by default for stdio on this board
DEFAULT_MODULE += stdio_rtt
# Use Segger's RTT unless another stdio_% is already used
ifeq (,$(filter stdio_% slipdev_stdio,$(USEMODULE)))
USEMODULE += stdio_rtt
endif
5 changes: 4 additions & 1 deletion boards/pinetime/Makefile.dep
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
DEFAULT_MODULE += stdio_rtt
# Use Segger's RTT unless another stdio_% is already used
ifeq (,$(filter stdio_% slipdev_stdio,$(USEMODULE)))
USEMODULE += stdio_rtt
endif

ifneq (,$(filter mtd,$(USEMODULE)))
USEMODULE += mtd_spi_nor
Expand Down
6 changes: 4 additions & 2 deletions boards/ruuvitag/Makefile.dep
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,10 @@ ifneq (,$(filter saul_default,$(USEMODULE)))
USEMODULE += lis2dh12_spi
endif

# Use Segger's RTT by default for stdio on this board
DEFAULT_MODULE += stdio_rtt
# Use Segger's RTT unless another stdio_% is already used
ifeq (,$(filter stdio_% slipdev_stdio,$(USEMODULE)))
USEMODULE += stdio_rtt
endif

USEMODULE += boards_common_nrf52xxdk

Expand Down
6 changes: 4 additions & 2 deletions boards/thingy52/Makefile.dep
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,9 @@ ifneq (,$(filter saul_default,$(USEMODULE)))
USEMODULE += lps22hb
endif

# Use Segger's RTT by default for stdio on this board
DEFAULT_MODULE += stdio_rtt
# Use Segger's RTT unless another stdio_% is already used
ifeq (,$(filter stdio_% slipdev_stdio,$(USEMODULE)))
USEMODULE += stdio_rtt
endif

include $(RIOTBOARD)/common/nrf52/Makefile.dep
14 changes: 0 additions & 14 deletions makefiles/stdio.inc.mk
Original file line number Diff line number Diff line change
Expand Up @@ -7,20 +7,6 @@ STDIO_MODULES = \
stdio_uart \
#

# Since USEMODULE and DEFAULT_MODULEs are recursively expanded we need to
# disable DEFAULT_MODULEs before any of there dependencies are evaluated,
# otherwise the disabled MODULE will be in USEMODULE (triggering) its
# dependencies, and then removed but leaving its dependencies
ifneq (,$(filter $(filter-out stdio_rtt,$(STDIO_MODULES)),$(USEMODULE)))
# stdio_rtt cannot be used when another STDIO is loaded
DISABLE_MODULE += stdio_rtt
endif

ifneq (,$(filter $(filter-out stdio_cdc_acm,$(STDIO_MODULES)),$(USEMODULE)))
# stdio_cdc_acm cannot be used when another STDIO is loaded
DISABLE_MODULE += stdio_cdc_acm
endif

ifneq (,$(filter newlib,$(USEMODULE)))
ifeq (,$(filter $(STDIO_MODULES),$(USEMODULE)))
USEMODULE += stdio_uart
Expand Down

0 comments on commit 0e5205c

Please sign in to comment.