From 87922c1b357d96a60b0c3269c8fc15a6aa69b389 Mon Sep 17 00:00:00 2001 From: Benjamin Valentin Date: Thu, 13 Mar 2025 23:59:47 +0100 Subject: [PATCH 1/6] makefiles/stdio.inc.mk: don't count the same stdio twice --- makefiles/stdio.inc.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/makefiles/stdio.inc.mk b/makefiles/stdio.inc.mk index 9c29cf5037..df0221ddd0 100644 --- a/makefiles/stdio.inc.mk +++ b/makefiles/stdio.inc.mk @@ -33,7 +33,7 @@ ifneq (,$(filter stdin,$(USEMODULE))) USEMODULE += isrpipe endif -ifneq (1, $(words $(filter $(STDIO_MODULES),$(USEMODULE)))) +ifneq (1, $(words $(sort $(filter $(STDIO_MODULES),$(USEMODULE))))) USEMODULE += stdio_dispatch endif From 9ba1514914705bd24ad11a6d81549fc814f60528 Mon Sep 17 00:00:00 2001 From: Benjamin Valentin Date: Thu, 13 Mar 2025 10:56:34 +0100 Subject: [PATCH 2/6] pseudomodules: introduce stdio_default --- Makefile.dep | 5 +++++ makefiles/pseudomodules.inc.mk | 7 +++++++ 2 files changed, 12 insertions(+) diff --git a/Makefile.dep b/Makefile.dep index d636d64468..912a209eaf 100644 --- a/Makefile.dep +++ b/Makefile.dep @@ -2,6 +2,11 @@ -include $(APPDIR)/Makefile.board.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 $(BOARDDIR)/Makefile.dep diff --git a/makefiles/pseudomodules.inc.mk b/makefiles/pseudomodules.inc.mk index 2cebdfe864..9505365486 100644 --- a/makefiles/pseudomodules.inc.mk +++ b/makefiles/pseudomodules.inc.mk @@ -488,6 +488,13 @@ PSEUDOMODULES += soft_uart_modecfg PSEUDOMODULES += stdin PSEUDOMODULES += stdio_available 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_ethos PSEUDOMODULES += stdio_nimble_debug From 171d5ff31501ed73306774711a506fe9e3b1a329 Mon Sep 17 00:00:00 2001 From: Benjamin Valentin Date: Thu, 13 Mar 2025 16:02:30 +0100 Subject: [PATCH 3/6] cpu/arm7tdmi_gba: make use of stdio_default --- cpu/arm7tdmi_gba/Makefile | 2 +- cpu/arm7tdmi_gba/Makefile.dep | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/cpu/arm7tdmi_gba/Makefile b/cpu/arm7tdmi_gba/Makefile index 47f9d0499b..b528759960 100644 --- a/cpu/arm7tdmi_gba/Makefile +++ b/cpu/arm7tdmi_gba/Makefile @@ -4,7 +4,7 @@ include $(RIOTCPU)/$(CPU)/Makefile.include DIRS = $(RIOTCPU)/arm7_common -ifneq (,$(filter stdio_%,$(USEMODULE))) +ifneq (,$(filter stdio_fb,$(USEMODULE))) DIRS += stdio_fb endif diff --git a/cpu/arm7tdmi_gba/Makefile.dep b/cpu/arm7tdmi_gba/Makefile.dep index 51481f9a83..f6fa0acdf7 100644 --- a/cpu/arm7tdmi_gba/Makefile.dep +++ b/cpu/arm7tdmi_gba/Makefile.dep @@ -1,6 +1,6 @@ USEMODULE += arm7_common -ifeq (,$(filter stdio_%,$(USEMODULE))) +ifneq (,$(filter stdio_default,$(USEMODULE))) USEMODULE += stdio_fb endif From 233a62b792d8ce55a9cda9514c2b19fc976b920f Mon Sep 17 00:00:00 2001 From: Benjamin Valentin Date: Thu, 13 Mar 2025 10:54:13 +0100 Subject: [PATCH 4/6] boards: move to stdio_default --- boards/common/makefiles/stdio_cdc_acm.dep.mk | 2 +- .../makefiles/stdio_tinyusb_cdc_acm.dep.mk | 2 +- boards/esp32c3-wemos-mini/Makefile.dep | 2 +- boards/esp32s3-box/Makefile.dep | 22 ++++++++++--------- boards/esp32s3-pros3/Makefile.dep | 22 ++++++++++--------- boards/esp32s3-usb-otg/Makefile.dep | 22 ++++++++++--------- boards/esp32s3-wt32-sc01-plus/Makefile.dep | 22 ++++++++++--------- boards/hamilton/Makefile.dep | 2 +- boards/hip-badge/Makefile.dep | 2 +- boards/pinetime/Makefile.dep | 2 +- boards/ruuvitag/Makefile.dep | 2 +- boards/thingy52/Makefile.dep | 2 +- cpu/native/Makefile.dep | 2 +- 13 files changed, 57 insertions(+), 49 deletions(-) diff --git a/boards/common/makefiles/stdio_cdc_acm.dep.mk b/boards/common/makefiles/stdio_cdc_acm.dep.mk index 1bbdcdf911..4800823512 100644 --- a/boards/common/makefiles/stdio_cdc_acm.dep.mk +++ b/boards/common/makefiles/stdio_cdc_acm.dep.mk @@ -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))) # Use stdio_tinyusb_cdc_acm only if no other stdio is requested explicitly # and tinyusb_device is used for any other reason diff --git a/boards/common/makefiles/stdio_tinyusb_cdc_acm.dep.mk b/boards/common/makefiles/stdio_tinyusb_cdc_acm.dep.mk index 8aae180b72..1254cd5955 100644 --- a/boards/common/makefiles/stdio_tinyusb_cdc_acm.dep.mk +++ b/boards/common/makefiles/stdio_tinyusb_cdc_acm.dep.mk @@ -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. # and usbus is used for any other reason ifneq (,$(filter usbus,$(USEMODULE))) diff --git a/boards/esp32c3-wemos-mini/Makefile.dep b/boards/esp32c3-wemos-mini/Makefile.dep index 2b25c2a442..b2909c3d65 100644 --- a/boards/esp32c3-wemos-mini/Makefile.dep +++ b/boards/esp32c3-wemos-mini/Makefile.dep @@ -1,4 +1,4 @@ -ifeq (,$(filter stdio_% slipdev_stdio,$(USEMODULE))) +ifneq (,$(filter stdio_default,$(USEMODULE))) USEMODULE += stdio_usb_serial_jtag endif diff --git a/boards/esp32s3-box/Makefile.dep b/boards/esp32s3-box/Makefile.dep index 1c09d058f4..5ee0fd4ec5 100644 --- a/boards/esp32s3-box/Makefile.dep +++ b/boards/esp32s3-box/Makefile.dep @@ -1,13 +1,15 @@ -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 +ifneq (,$(filter stdio_default,$(USEMODULE))) + ifeq (,$(filter 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 endif ifneq (,$(filter disp_dev,$(USEMODULE))) diff --git a/boards/esp32s3-pros3/Makefile.dep b/boards/esp32s3-pros3/Makefile.dep index 4159038b8d..07891db96f 100644 --- a/boards/esp32s3-pros3/Makefile.dep +++ b/boards/esp32s3-pros3/Makefile.dep @@ -1,13 +1,15 @@ -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 +ifneq (,$(filter stdio_default,$(USEMODULE))) + ifeq (,$(filter 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 endif ifneq (,$(filter saul_default,$(USEMODULE))) diff --git a/boards/esp32s3-usb-otg/Makefile.dep b/boards/esp32s3-usb-otg/Makefile.dep index 88ec8eaa8b..bd175596d2 100644 --- a/boards/esp32s3-usb-otg/Makefile.dep +++ b/boards/esp32s3-usb-otg/Makefile.dep @@ -1,13 +1,15 @@ -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 +ifneq (,$(filter stdio_default,$(USEMODULE))) + ifeq (,$(filter 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 endif include $(RIOTBOARD)/common/esp32s3/Makefile.dep diff --git a/boards/esp32s3-wt32-sc01-plus/Makefile.dep b/boards/esp32s3-wt32-sc01-plus/Makefile.dep index 0128b651b3..ce4ce0fa9b 100644 --- a/boards/esp32s3-wt32-sc01-plus/Makefile.dep +++ b/boards/esp32s3-wt32-sc01-plus/Makefile.dep @@ -1,13 +1,15 @@ -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 +ifneq (,$(filter stdio_default,$(USEMODULE))) + ifeq (,$(filter 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 endif include $(RIOTBOARD)/common/esp32s3/Makefile.dep diff --git a/boards/hamilton/Makefile.dep b/boards/hamilton/Makefile.dep index 0c3f1f2795..6f96388ab7 100644 --- a/boards/hamilton/Makefile.dep +++ b/boards/hamilton/Makefile.dep @@ -14,6 +14,6 @@ ifneq (,$(filter saul_default,$(USEMODULE))) endif # Use Segger's RTT unless another stdio_% is already used -ifeq (,$(filter stdio_% slipdev_stdio,$(USEMODULE))) +ifneq (,$(filter stdio_default,$(USEMODULE))) USEMODULE += stdio_rtt endif diff --git a/boards/hip-badge/Makefile.dep b/boards/hip-badge/Makefile.dep index 840d0a4ca8..94128b55a2 100644 --- a/boards/hip-badge/Makefile.dep +++ b/boards/hip-badge/Makefile.dep @@ -1,4 +1,4 @@ -ifeq (,$(filter stdio_% slipdev_stdio,$(USEMODULE))) +ifneq (,$(filter stdio_default,$(USEMODULE))) USEMODULE += stdio_usb_serial_jtag endif diff --git a/boards/pinetime/Makefile.dep b/boards/pinetime/Makefile.dep index 331a4cf3e7..b80599f39b 100644 --- a/boards/pinetime/Makefile.dep +++ b/boards/pinetime/Makefile.dep @@ -1,5 +1,5 @@ # Use Segger's RTT unless another stdio_% is already used -ifeq (,$(filter stdio_% slipdev_stdio,$(USEMODULE))) +ifneq (,$(filter stdio_default,$(USEMODULE))) USEMODULE += stdio_rtt endif diff --git a/boards/ruuvitag/Makefile.dep b/boards/ruuvitag/Makefile.dep index 1944a9ab7a..a06987f43c 100644 --- a/boards/ruuvitag/Makefile.dep +++ b/boards/ruuvitag/Makefile.dep @@ -5,7 +5,7 @@ ifneq (,$(filter saul_default,$(USEMODULE))) endif # Use Segger's RTT unless another stdio_% is already used -ifeq (,$(filter stdio_% slipdev_stdio,$(USEMODULE))) +ifneq (,$(filter stdio_default,$(USEMODULE))) USEMODULE += stdio_rtt endif diff --git a/boards/thingy52/Makefile.dep b/boards/thingy52/Makefile.dep index a47e07b05e..e997e6e43c 100644 --- a/boards/thingy52/Makefile.dep +++ b/boards/thingy52/Makefile.dep @@ -5,7 +5,7 @@ ifneq (,$(filter saul_default,$(USEMODULE))) endif # Use Segger's RTT unless another stdio_% is already used -ifeq (,$(filter stdio_% slipdev_stdio,$(USEMODULE))) +ifneq (,$(filter stdio_default,$(USEMODULE))) USEMODULE += stdio_rtt endif diff --git a/cpu/native/Makefile.dep b/cpu/native/Makefile.dep index a41f94b2d5..cd33b6ea55 100644 --- a/cpu/native/Makefile.dep +++ b/cpu/native/Makefile.dep @@ -13,7 +13,7 @@ else endif endif -ifeq (,$(filter stdio_%,$(USEMODULE))) +ifneq (,$(filter stdio_default,$(USEMODULE))) USEMODULE += stdio_native endif From ad02bb1eccdc1cd95b67d22a1b9c58a0b888d307 Mon Sep 17 00:00:00 2001 From: Benjamin Valentin Date: Fri, 14 Mar 2025 00:19:24 +0100 Subject: [PATCH 5/6] boards/common/esp32s3: provide stdio_esp32s3_default.dep.mk --- .../esp32s3/stdio_esp32s3_default.dep.mk | 19 +++++++++++++++++++ boards/esp32s3-box/Makefile.dep | 16 +--------------- boards/esp32s3-pros3/Makefile.dep | 16 +--------------- boards/esp32s3-usb-otg/Makefile.dep | 16 +--------------- boards/esp32s3-wt32-sc01-plus/Makefile.dep | 16 +--------------- 5 files changed, 23 insertions(+), 60 deletions(-) create mode 100644 boards/common/esp32s3/stdio_esp32s3_default.dep.mk diff --git a/boards/common/esp32s3/stdio_esp32s3_default.dep.mk b/boards/common/esp32s3/stdio_esp32s3_default.dep.mk new file mode 100644 index 0000000000..0fad20764b --- /dev/null +++ b/boards/common/esp32s3/stdio_esp32s3_default.dep.mk @@ -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 diff --git a/boards/esp32s3-box/Makefile.dep b/boards/esp32s3-box/Makefile.dep index 5ee0fd4ec5..3e5cbc162a 100644 --- a/boards/esp32s3-box/Makefile.dep +++ b/boards/esp32s3-box/Makefile.dep @@ -1,17 +1,3 @@ -ifneq (,$(filter stdio_default,$(USEMODULE))) - ifeq (,$(filter 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 -endif - ifneq (,$(filter disp_dev,$(USEMODULE))) USEMODULE += ili9341 endif @@ -20,5 +6,5 @@ ifneq (,$(filter saul_default,$(USEMODULE))) USEMODULE += saul_gpio endif +include $(RIOTBOARD)/common/esp32s3/stdio_esp32s3_default.dep.mk include $(RIOTBOARD)/common/esp32s3/Makefile.dep -include $(RIOTBOARD)/common/makefiles/stdio_cdc_acm.dep.mk diff --git a/boards/esp32s3-pros3/Makefile.dep b/boards/esp32s3-pros3/Makefile.dep index 07891db96f..14a46b0147 100644 --- a/boards/esp32s3-pros3/Makefile.dep +++ b/boards/esp32s3-pros3/Makefile.dep @@ -1,20 +1,6 @@ -ifneq (,$(filter stdio_default,$(USEMODULE))) - ifeq (,$(filter 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 -endif - ifneq (,$(filter saul_default,$(USEMODULE))) USEMODULE += saul_gpio endif +include $(RIOTBOARD)/common/esp32s3/stdio_esp32s3_default.dep.mk include $(RIOTBOARD)/common/esp32s3/Makefile.dep -include $(RIOTBOARD)/common/makefiles/stdio_cdc_acm.dep.mk diff --git a/boards/esp32s3-usb-otg/Makefile.dep b/boards/esp32s3-usb-otg/Makefile.dep index bd175596d2..c8b90d8ebb 100644 --- a/boards/esp32s3-usb-otg/Makefile.dep +++ b/boards/esp32s3-usb-otg/Makefile.dep @@ -1,19 +1,5 @@ -ifneq (,$(filter stdio_default,$(USEMODULE))) - ifeq (,$(filter 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 -endif - +include $(RIOTBOARD)/common/esp32s3/stdio_esp32s3_default.dep.mk include $(RIOTBOARD)/common/esp32s3/Makefile.dep -include $(RIOTBOARD)/common/makefiles/stdio_cdc_acm.dep.mk # default to using fatfs on SD card ifneq (,$(filter vfs_default,$(USEMODULE))) diff --git a/boards/esp32s3-wt32-sc01-plus/Makefile.dep b/boards/esp32s3-wt32-sc01-plus/Makefile.dep index ce4ce0fa9b..127742cdb0 100644 --- a/boards/esp32s3-wt32-sc01-plus/Makefile.dep +++ b/boards/esp32s3-wt32-sc01-plus/Makefile.dep @@ -1,19 +1,5 @@ -ifneq (,$(filter stdio_default,$(USEMODULE))) - ifeq (,$(filter 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 -endif - +include $(RIOTBOARD)/common/esp32s3/stdio_esp32s3_default.dep.mk include $(RIOTBOARD)/common/esp32s3/Makefile.dep -include $(RIOTBOARD)/common/makefiles/stdio_cdc_acm.dep.mk # default to using fatfs on SD card ifneq (,$(filter vfs_default,$(USEMODULE))) From 50259008513fa397e5f6d118da3e742f8c8715e5 Mon Sep 17 00:00:00 2001 From: Benjamin Valentin Date: Thu, 13 Mar 2025 10:56:56 +0100 Subject: [PATCH 6/6] examples/telnet_server: select stdio_default --- examples/networking/misc/telnet_server/Makefile | 3 +++ examples/networking/misc/telnet_server/main.c | 1 - 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/examples/networking/misc/telnet_server/Makefile b/examples/networking/misc/telnet_server/Makefile index 24cae7524c..e4d53c3cfb 100644 --- a/examples/networking/misc/telnet_server/Makefile +++ b/examples/networking/misc/telnet_server/Makefile @@ -34,6 +34,9 @@ USEMODULE += ps # Include the telnet server USEMODULE += stdio_telnet +# select a 2nd stdio method +USEMODULE += stdio_default + # Enable faster re-connects CFLAGS += -DCONFIG_GNRC_TCP_EXPERIMENTAL_DYN_MSL_EN=1 diff --git a/examples/networking/misc/telnet_server/main.c b/examples/networking/misc/telnet_server/main.c index aed0a26fb3..9e36799b9b 100644 --- a/examples/networking/misc/telnet_server/main.c +++ b/examples/networking/misc/telnet_server/main.c @@ -79,7 +79,6 @@ int main(void) /* start shell */ printf("All up, awaiting connection on port %u\n", CONFIG_TELNET_PORT); - puts("Local shell disabled"); char line_buf[SHELL_DEFAULT_BUFSIZE]; shell_run(NULL, line_buf, SHELL_DEFAULT_BUFSIZE);