mirror of
https://github.com/RIOT-OS/RIOT.git
synced 2025-12-23 13:33:49 +01:00
Merge pull request #21294 from benpicco/stdio_default
boards: introduce `stdio_default`
This commit is contained in:
commit
f3dbed405e
@ -2,6 +2,11 @@
|
|||||||
-include $(APPDIR)/Makefile.board.dep
|
-include $(APPDIR)/Makefile.board.dep
|
||||||
-include $(APPDIR)/Makefile.$(TOOLCHAIN).dep
|
-include $(APPDIR)/Makefile.$(TOOLCHAIN).dep
|
||||||
|
|
||||||
|
# select default stdio provider if no other is selected
|
||||||
|
ifeq (,$(filter stdio_% slipdev_stdio,$(USEMODULE)))
|
||||||
|
USEMODULE += stdio_default
|
||||||
|
endif
|
||||||
|
|
||||||
# include board dependencies
|
# include board dependencies
|
||||||
-include $(BOARDDIR)/Makefile.dep
|
-include $(BOARDDIR)/Makefile.dep
|
||||||
|
|
||||||
|
|||||||
19
boards/common/esp32s3/stdio_esp32s3_default.dep.mk
Normal file
19
boards/common/esp32s3/stdio_esp32s3_default.dep.mk
Normal file
@ -0,0 +1,19 @@
|
|||||||
|
ifneq (,$(filter stdio_default,$(USEMODULE)))
|
||||||
|
ifneq (,$(filter usbus,$(USEMODULE)))
|
||||||
|
USEMODULE += stdio_cdc_acm
|
||||||
|
FEATURES_REQUIRED += highlevel_stdio
|
||||||
|
else ifneq (,$(filter tinyusb_device,$(USEMODULE)))
|
||||||
|
USEMODULE += stdio_tinyusb_cdc_acm
|
||||||
|
FEATURES_REQUIRED += highlevel_stdio
|
||||||
|
else
|
||||||
|
# Use stdio_usb_serial_jtag if no other stdio is requested explicitly
|
||||||
|
# and neither USBUS nor tinyusb_device are used
|
||||||
|
USEMODULE += stdio_usb_serial_jtag
|
||||||
|
endif
|
||||||
|
# Even if only stdio_usb_serial_jtag is enabled, usb_board_reset is enabled
|
||||||
|
# since there should be a CDC ACM interface in any case. This is necessary,
|
||||||
|
# for example, to reset the board if stdio_cdc_acm or stdio_tinyusb_cdc_acm
|
||||||
|
# was previously used.
|
||||||
|
USEMODULE += usb_board_reset
|
||||||
|
include $(RIOTMAKE)/tools/usb_board_reset.mk
|
||||||
|
endif
|
||||||
@ -1,4 +1,4 @@
|
|||||||
ifeq (,$(filter-out stdio_cdc_acm,$(filter stdio_% slipdev_stdio,$(USEMODULE))))
|
ifneq (,$(filter stdio_default,$(USEMODULE)))
|
||||||
ifneq (,$(filter tinyusb_device,$(USEMODULE))$(filter tinyusb,$(USEPKG)))
|
ifneq (,$(filter tinyusb_device,$(USEMODULE))$(filter tinyusb,$(USEPKG)))
|
||||||
# Use stdio_tinyusb_cdc_acm only if no other stdio is requested explicitly
|
# Use stdio_tinyusb_cdc_acm only if no other stdio is requested explicitly
|
||||||
# and tinyusb_device is used for any other reason
|
# and tinyusb_device is used for any other reason
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
ifeq (,$(filter stdio_% slipdev_stdio,$(USEMODULE)))
|
ifneq (,$(filter stdio_default,$(USEMODULE)))
|
||||||
# Use stdio_tinyusb_cdc_acm only if no other stdio is requested explicitly.
|
# Use stdio_tinyusb_cdc_acm only if no other stdio is requested explicitly.
|
||||||
# and usbus is used for any other reason
|
# and usbus is used for any other reason
|
||||||
ifneq (,$(filter usbus,$(USEMODULE)))
|
ifneq (,$(filter usbus,$(USEMODULE)))
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
ifeq (,$(filter stdio_% slipdev_stdio,$(USEMODULE)))
|
ifneq (,$(filter stdio_default,$(USEMODULE)))
|
||||||
USEMODULE += stdio_usb_serial_jtag
|
USEMODULE += stdio_usb_serial_jtag
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
|||||||
@ -1,15 +1,3 @@
|
|||||||
ifeq (,$(filter stdio_% slipdev_stdio usbus usbus% tinyusb_device,$(USEMODULE)))
|
|
||||||
# Use stdio_usb_serial_jtag if no other stdio is requested explicitly
|
|
||||||
# and neither USBUS nor tinyusb_device are used
|
|
||||||
USEMODULE += stdio_usb_serial_jtag
|
|
||||||
# Even if only stdio_usb_serial_jtag is enabled, usb_board_reset is enabled
|
|
||||||
# since there should be a CDC ACM interface in any case. This is necessary,
|
|
||||||
# for example, to reset the board if stdio_cdc_acm or stdio_tinyusb_cdc_acm
|
|
||||||
# was previously used.
|
|
||||||
USEMODULE += usb_board_reset
|
|
||||||
# include $(RIOTMAKE)/tools/usb_board_reset.mk
|
|
||||||
endif
|
|
||||||
|
|
||||||
ifneq (,$(filter disp_dev,$(USEMODULE)))
|
ifneq (,$(filter disp_dev,$(USEMODULE)))
|
||||||
USEMODULE += ili9341
|
USEMODULE += ili9341
|
||||||
endif
|
endif
|
||||||
@ -18,5 +6,5 @@ ifneq (,$(filter saul_default,$(USEMODULE)))
|
|||||||
USEMODULE += saul_gpio
|
USEMODULE += saul_gpio
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
include $(RIOTBOARD)/common/esp32s3/stdio_esp32s3_default.dep.mk
|
||||||
include $(RIOTBOARD)/common/esp32s3/Makefile.dep
|
include $(RIOTBOARD)/common/esp32s3/Makefile.dep
|
||||||
include $(RIOTBOARD)/common/makefiles/stdio_cdc_acm.dep.mk
|
|
||||||
|
|||||||
@ -1,18 +1,6 @@
|
|||||||
ifeq (,$(filter stdio_% slipdev_stdio usbus usbus% tinyusb_device,$(USEMODULE)))
|
|
||||||
# Use stdio_usb_serial_jtag if no other stdio is requested explicitly
|
|
||||||
# and neither USBUS nor tinyusb_device are used
|
|
||||||
USEMODULE += stdio_usb_serial_jtag
|
|
||||||
# Even if only stdio_usb_serial_jtag is enabled, usb_board_reset is enabled
|
|
||||||
# since there should be a CDC ACM interface in any case. This is necessary,
|
|
||||||
# for example, to reset the board if stdio_cdc_acm or stdio_tinyusb_cdc_acm
|
|
||||||
# was previously used.
|
|
||||||
USEMODULE += usb_board_reset
|
|
||||||
include $(RIOTMAKE)/tools/usb_board_reset.mk
|
|
||||||
endif
|
|
||||||
|
|
||||||
ifneq (,$(filter saul_default,$(USEMODULE)))
|
ifneq (,$(filter saul_default,$(USEMODULE)))
|
||||||
USEMODULE += saul_gpio
|
USEMODULE += saul_gpio
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
include $(RIOTBOARD)/common/esp32s3/stdio_esp32s3_default.dep.mk
|
||||||
include $(RIOTBOARD)/common/esp32s3/Makefile.dep
|
include $(RIOTBOARD)/common/esp32s3/Makefile.dep
|
||||||
include $(RIOTBOARD)/common/makefiles/stdio_cdc_acm.dep.mk
|
|
||||||
|
|||||||
@ -1,17 +1,5 @@
|
|||||||
ifeq (,$(filter stdio_% slipdev_stdio usbus usbus% tinyusb_device,$(USEMODULE)))
|
include $(RIOTBOARD)/common/esp32s3/stdio_esp32s3_default.dep.mk
|
||||||
# Use stdio_usb_serial_jtag if no other stdio is requested explicitly
|
|
||||||
# and neither USBUS nor tinyusb_device are used
|
|
||||||
USEMODULE += stdio_usb_serial_jtag
|
|
||||||
# Even if only stdio_usb_serial_jtag is enabled, usb_board_reset is enabled
|
|
||||||
# since there should be a CDC ACM interface in any case. This is necessary,
|
|
||||||
# for example, to reset the board if stdio_cdc_acm or stdio_tinyusb_cdc_acm
|
|
||||||
# was previously used.
|
|
||||||
USEMODULE += usb_board_reset
|
|
||||||
include $(RIOTMAKE)/tools/usb_board_reset.mk
|
|
||||||
endif
|
|
||||||
|
|
||||||
include $(RIOTBOARD)/common/esp32s3/Makefile.dep
|
include $(RIOTBOARD)/common/esp32s3/Makefile.dep
|
||||||
include $(RIOTBOARD)/common/makefiles/stdio_cdc_acm.dep.mk
|
|
||||||
|
|
||||||
# default to using fatfs on SD card
|
# default to using fatfs on SD card
|
||||||
ifneq (,$(filter vfs_default,$(USEMODULE)))
|
ifneq (,$(filter vfs_default,$(USEMODULE)))
|
||||||
|
|||||||
@ -1,17 +1,5 @@
|
|||||||
ifeq (,$(filter stdio_% slipdev_stdio usbus usbus% tinyusb_device,$(USEMODULE)))
|
include $(RIOTBOARD)/common/esp32s3/stdio_esp32s3_default.dep.mk
|
||||||
# Use stdio_usb_serial_jtag if no other stdio is requested explicitly
|
|
||||||
# and neither USBUS nor tinyusb_device are used
|
|
||||||
USEMODULE += stdio_usb_serial_jtag
|
|
||||||
# Even if only stdio_usb_serial_jtag is enabled, usb_board_reset is enabled
|
|
||||||
# since there should be a CDC ACM interface in any case. This is necessary,
|
|
||||||
# for example, to reset the board if stdio_cdc_acm or stdio_tinyusb_cdc_acm
|
|
||||||
# was previously used.
|
|
||||||
USEMODULE += usb_board_reset
|
|
||||||
# include $(RIOTMAKE)/tools/usb_board_reset.mk
|
|
||||||
endif
|
|
||||||
|
|
||||||
include $(RIOTBOARD)/common/esp32s3/Makefile.dep
|
include $(RIOTBOARD)/common/esp32s3/Makefile.dep
|
||||||
include $(RIOTBOARD)/common/makefiles/stdio_cdc_acm.dep.mk
|
|
||||||
|
|
||||||
# default to using fatfs on SD card
|
# default to using fatfs on SD card
|
||||||
ifneq (,$(filter vfs_default,$(USEMODULE)))
|
ifneq (,$(filter vfs_default,$(USEMODULE)))
|
||||||
|
|||||||
@ -14,6 +14,6 @@ ifneq (,$(filter saul_default,$(USEMODULE)))
|
|||||||
endif
|
endif
|
||||||
|
|
||||||
# Use Segger's RTT unless another stdio_% is already used
|
# Use Segger's RTT unless another stdio_% is already used
|
||||||
ifeq (,$(filter stdio_% slipdev_stdio,$(USEMODULE)))
|
ifneq (,$(filter stdio_default,$(USEMODULE)))
|
||||||
USEMODULE += stdio_rtt
|
USEMODULE += stdio_rtt
|
||||||
endif
|
endif
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
ifeq (,$(filter stdio_% slipdev_stdio,$(USEMODULE)))
|
ifneq (,$(filter stdio_default,$(USEMODULE)))
|
||||||
USEMODULE += stdio_usb_serial_jtag
|
USEMODULE += stdio_usb_serial_jtag
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
# Use Segger's RTT unless another stdio_% is already used
|
# Use Segger's RTT unless another stdio_% is already used
|
||||||
ifeq (,$(filter stdio_% slipdev_stdio,$(USEMODULE)))
|
ifneq (,$(filter stdio_default,$(USEMODULE)))
|
||||||
USEMODULE += stdio_rtt
|
USEMODULE += stdio_rtt
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
|||||||
@ -5,7 +5,7 @@ ifneq (,$(filter saul_default,$(USEMODULE)))
|
|||||||
endif
|
endif
|
||||||
|
|
||||||
# Use Segger's RTT unless another stdio_% is already used
|
# Use Segger's RTT unless another stdio_% is already used
|
||||||
ifeq (,$(filter stdio_% slipdev_stdio,$(USEMODULE)))
|
ifneq (,$(filter stdio_default,$(USEMODULE)))
|
||||||
USEMODULE += stdio_rtt
|
USEMODULE += stdio_rtt
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
|||||||
@ -5,7 +5,7 @@ ifneq (,$(filter saul_default,$(USEMODULE)))
|
|||||||
endif
|
endif
|
||||||
|
|
||||||
# Use Segger's RTT unless another stdio_% is already used
|
# Use Segger's RTT unless another stdio_% is already used
|
||||||
ifeq (,$(filter stdio_% slipdev_stdio,$(USEMODULE)))
|
ifneq (,$(filter stdio_default,$(USEMODULE)))
|
||||||
USEMODULE += stdio_rtt
|
USEMODULE += stdio_rtt
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
|||||||
@ -4,7 +4,7 @@ include $(RIOTCPU)/$(CPU)/Makefile.include
|
|||||||
|
|
||||||
DIRS = $(RIOTCPU)/arm7_common
|
DIRS = $(RIOTCPU)/arm7_common
|
||||||
|
|
||||||
ifneq (,$(filter stdio_%,$(USEMODULE)))
|
ifneq (,$(filter stdio_fb,$(USEMODULE)))
|
||||||
DIRS += stdio_fb
|
DIRS += stdio_fb
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
USEMODULE += arm7_common
|
USEMODULE += arm7_common
|
||||||
|
|
||||||
ifeq (,$(filter stdio_%,$(USEMODULE)))
|
ifneq (,$(filter stdio_default,$(USEMODULE)))
|
||||||
USEMODULE += stdio_fb
|
USEMODULE += stdio_fb
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
|||||||
@ -13,7 +13,7 @@ else
|
|||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
|
|
||||||
ifeq (,$(filter stdio_%,$(USEMODULE)))
|
ifneq (,$(filter stdio_default,$(USEMODULE)))
|
||||||
USEMODULE += stdio_native
|
USEMODULE += stdio_native
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
|||||||
@ -34,6 +34,9 @@ USEMODULE += ps
|
|||||||
# Include the telnet server
|
# Include the telnet server
|
||||||
USEMODULE += stdio_telnet
|
USEMODULE += stdio_telnet
|
||||||
|
|
||||||
|
# select a 2nd stdio method
|
||||||
|
USEMODULE += stdio_default
|
||||||
|
|
||||||
# Enable faster re-connects
|
# Enable faster re-connects
|
||||||
CFLAGS += -DCONFIG_GNRC_TCP_EXPERIMENTAL_DYN_MSL_EN=1
|
CFLAGS += -DCONFIG_GNRC_TCP_EXPERIMENTAL_DYN_MSL_EN=1
|
||||||
|
|
||||||
|
|||||||
@ -79,7 +79,6 @@ int main(void)
|
|||||||
|
|
||||||
/* start shell */
|
/* start shell */
|
||||||
printf("All up, awaiting connection on port %u\n", CONFIG_TELNET_PORT);
|
printf("All up, awaiting connection on port %u\n", CONFIG_TELNET_PORT);
|
||||||
puts("Local shell disabled");
|
|
||||||
char line_buf[SHELL_DEFAULT_BUFSIZE];
|
char line_buf[SHELL_DEFAULT_BUFSIZE];
|
||||||
shell_run(NULL, line_buf, SHELL_DEFAULT_BUFSIZE);
|
shell_run(NULL, line_buf, SHELL_DEFAULT_BUFSIZE);
|
||||||
|
|
||||||
|
|||||||
@ -488,6 +488,13 @@ PSEUDOMODULES += soft_uart_modecfg
|
|||||||
PSEUDOMODULES += stdin
|
PSEUDOMODULES += stdin
|
||||||
PSEUDOMODULES += stdio_available
|
PSEUDOMODULES += stdio_available
|
||||||
PSEUDOMODULES += stdio_cdc_acm
|
PSEUDOMODULES += stdio_cdc_acm
|
||||||
|
## @defgroup sys_stdio_default Default STDIO provider
|
||||||
|
## @ingroup sys_stdio
|
||||||
|
## @{
|
||||||
|
## This module selects the default STDIO method of a given board.
|
||||||
|
## It will be enabled by default if no other stdio method is selected.
|
||||||
|
PSEUDOMODULES += stdio_default
|
||||||
|
## @}
|
||||||
PSEUDOMODULES += stdio_dispatch
|
PSEUDOMODULES += stdio_dispatch
|
||||||
PSEUDOMODULES += stdio_ethos
|
PSEUDOMODULES += stdio_ethos
|
||||||
PSEUDOMODULES += stdio_nimble_debug
|
PSEUDOMODULES += stdio_nimble_debug
|
||||||
|
|||||||
@ -33,7 +33,7 @@ ifneq (,$(filter stdin,$(USEMODULE)))
|
|||||||
USEMODULE += isrpipe
|
USEMODULE += isrpipe
|
||||||
endif
|
endif
|
||||||
|
|
||||||
ifneq (1, $(words $(filter $(STDIO_MODULES),$(USEMODULE))))
|
ifneq (1, $(words $(sort $(filter $(STDIO_MODULES),$(USEMODULE)))))
|
||||||
USEMODULE += stdio_dispatch
|
USEMODULE += stdio_dispatch
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user