2020-03-18 13:31:01 +01:00
|
|
|
STDIO_MODULES = \
|
|
|
|
slipdev_stdio \
|
|
|
|
stdio_cdc_acm \
|
|
|
|
stdio_ethos \
|
2022-10-26 21:13:05 +02:00
|
|
|
stdio_native \
|
2019-06-13 14:25:45 +02:00
|
|
|
stdio_nimble \
|
2020-03-18 13:31:01 +01:00
|
|
|
stdio_null \
|
|
|
|
stdio_rtt \
|
2020-02-09 12:52:20 +01:00
|
|
|
stdio_semihosting \
|
2020-03-18 13:31:01 +01:00
|
|
|
stdio_uart \
|
2023-01-02 17:04:58 +01:00
|
|
|
stdio_udp \
|
2021-08-10 17:37:22 +02:00
|
|
|
stdio_telnet \
|
2022-10-26 16:32:58 +02:00
|
|
|
stdio_tinyusb_cdc_acm \
|
2022-12-29 00:35:41 +01:00
|
|
|
stdio_usb_serial_jtag \
|
2023-04-27 15:05:47 +02:00
|
|
|
stdio_fb \
|
2020-03-18 13:31:01 +01:00
|
|
|
#
|
|
|
|
|
2023-06-12 18:18:22 +02:00
|
|
|
STDIO_LEGACY_MODULES = \
|
|
|
|
ethos_stdio \
|
|
|
|
stdio_ethos \
|
|
|
|
stdio_native # requires #19002 \
|
|
|
|
#
|
|
|
|
|
2022-10-26 21:13:05 +02:00
|
|
|
# select stdio_uart if no other stdio module is slected
|
|
|
|
ifeq (,$(filter $(STDIO_MODULES),$(USEMODULE)))
|
|
|
|
USEMODULE += stdio_uart
|
2020-03-18 13:31:01 +01:00
|
|
|
endif
|
|
|
|
|
2023-06-12 18:18:22 +02:00
|
|
|
ifeq (,$(filter $(STDIO_LEGACY_MODULES),$(USEMODULE)))
|
|
|
|
USEMODULE += stdio
|
|
|
|
endif
|
|
|
|
|
|
|
|
ifneq (,$(filter stdin,$(USEMODULE)))
|
|
|
|
USEMODULE += isrpipe
|
|
|
|
endif
|
|
|
|
|
|
|
|
ifneq (1, $(words $(filter $(STDIO_MODULES),$(USEMODULE))))
|
|
|
|
USEMODULE += stdio_dispatch
|
|
|
|
endif
|
|
|
|
|
2020-03-18 13:31:01 +01:00
|
|
|
ifneq (,$(filter stdio_cdc_acm,$(USEMODULE)))
|
|
|
|
USEMODULE += usbus_cdc_acm
|
|
|
|
USEMODULE += isrpipe
|
2021-12-25 13:12:16 +01:00
|
|
|
USEMODULE += stdio_available
|
2020-03-18 13:31:01 +01:00
|
|
|
endif
|
|
|
|
|
2022-10-26 16:32:58 +02:00
|
|
|
ifneq (,$(filter stdio_tinyusb_cdc_acm,$(USEMODULE)))
|
|
|
|
USEPKG += tinyusb
|
|
|
|
endif
|
|
|
|
|
2020-03-18 13:31:01 +01:00
|
|
|
ifneq (,$(filter stdio_rtt,$(USEMODULE)))
|
2021-11-03 11:15:57 +01:00
|
|
|
USEMODULE += ztimer_msec
|
2020-03-18 13:31:01 +01:00
|
|
|
endif
|
|
|
|
|
|
|
|
ifneq (,$(filter stdio_ethos,$(USEMODULE)))
|
2021-11-24 12:34:18 +01:00
|
|
|
USEMODULE += ethos_stdio
|
2020-03-18 13:31:01 +01:00
|
|
|
USEMODULE += stdin
|
|
|
|
endif
|
|
|
|
|
2019-06-13 14:25:45 +02:00
|
|
|
ifneq (,$(filter stdio_nimble,$(USEMODULE)))
|
2021-12-27 14:57:35 +01:00
|
|
|
USEMODULE += stdio_available
|
2019-06-13 14:25:45 +02:00
|
|
|
USEPKG += nimble
|
|
|
|
USEMODULE += tsrb
|
|
|
|
USEMODULE += isrpipe
|
|
|
|
USEMODULE += nimble_svc_gap
|
|
|
|
USEMODULE += nimble_svc_gatt
|
|
|
|
ifneq (,$(filter stdio_nimble_debug,$(USEMODULE)))
|
|
|
|
FEATURES_REQUIRED += periph_uart
|
|
|
|
endif
|
|
|
|
endif
|
|
|
|
|
2020-03-18 13:31:01 +01:00
|
|
|
ifneq (,$(filter stdin,$(USEMODULE)))
|
|
|
|
ifneq (,$(filter stdio_uart,$(USEMODULE)))
|
|
|
|
USEMODULE += stdio_uart_rx
|
|
|
|
endif
|
|
|
|
endif
|
|
|
|
|
|
|
|
ifneq (,$(filter stdio_uart_rx,$(USEMODULE)))
|
|
|
|
USEMODULE += isrpipe
|
|
|
|
USEMODULE += stdio_uart
|
2021-12-25 13:09:45 +01:00
|
|
|
USEMODULE += stdio_available
|
2020-03-18 13:31:01 +01:00
|
|
|
endif
|
|
|
|
|
|
|
|
ifneq (,$(filter stdio_uart,$(USEMODULE)))
|
2021-04-14 13:51:58 +02:00
|
|
|
FEATURES_REQUIRED_ANY += periph_uart|periph_lpuart
|
2020-03-18 13:31:01 +01:00
|
|
|
endif
|
|
|
|
|
2020-02-09 12:52:20 +01:00
|
|
|
ifneq (,$(filter stdio_semihosting,$(USEMODULE)))
|
2021-11-03 11:30:51 +01:00
|
|
|
USEMODULE += ztimer_msec
|
2020-09-09 11:32:30 +02:00
|
|
|
FEATURES_REQUIRED_ANY += cpu_core_cortexm|arch_riscv
|
2020-02-09 12:52:20 +01:00
|
|
|
endif
|
2020-09-01 12:04:26 +02:00
|
|
|
|
2021-08-10 17:37:22 +02:00
|
|
|
ifneq (,$(filter stdio_telnet,$(USEMODULE)))
|
|
|
|
DEFAULT_MODULE += auto_init_telnet
|
|
|
|
USEMODULE += telnet
|
|
|
|
endif
|
|
|
|
|
2023-01-02 17:04:58 +01:00
|
|
|
ifneq (,$(filter stdio_udp,$(USEMODULE)))
|
|
|
|
USEMODULE += sock_udp
|
2023-06-12 18:19:50 +02:00
|
|
|
USEMODULE += sock_async
|
2023-01-02 17:04:58 +01:00
|
|
|
endif
|
|
|
|
|
2020-09-01 12:04:26 +02:00
|
|
|
# enable stdout buffering for modules that benefit from sending out buffers in larger chunks
|
|
|
|
ifneq (,$(filter picolibc,$(USEMODULE)))
|
2023-02-07 22:40:38 +01:00
|
|
|
ifneq (,$(filter stdio_cdc_acm stdio_ethos slipdev_stdio stdio_semihosting stdio_tinyusb_cdc_acm,$(USEMODULE)))
|
2020-09-01 12:04:26 +02:00
|
|
|
USEMODULE += picolibc_stdout_buffered
|
|
|
|
endif
|
|
|
|
endif
|