mirror of
https://github.com/RIOT-OS/RIOT.git
synced 2024-12-29 04:50:03 +01:00
Merge #19651
19651: sys/stdio_semihosting: model in Kconfig r=MrKevinWeiss a=aabadie Co-authored-by: Alexandre Abadie <alexandre.abadie@inria.fr>
This commit is contained in:
commit
ef82aa6acc
@ -24,6 +24,8 @@ config BOARD_COMMON_WEACT_F4X1CX
|
||||
|
||||
select HAVE_SAUL_GPIO
|
||||
select HAVE_MTD_SPI_NOR
|
||||
select MODULE_BOOTLOADER_STM32 if MODULE_STDIO_CDC_ACM
|
||||
select MODULE_USB_BOARD_RESET if KCONFIG_USB && TEST_KCONFIG
|
||||
|
||||
config CLOCK_HSE
|
||||
default 25000000
|
||||
|
@ -12,9 +12,3 @@ FEATURES_PROVIDED += periph_usbdev
|
||||
|
||||
# Various other features (if any)
|
||||
FEATURES_PROVIDED += highlevel_stdio
|
||||
|
||||
# This configuration enables modules that are only available when using Kconfig
|
||||
# module modelling
|
||||
ifeq (1, $(TEST_KCONFIG))
|
||||
KCONFIG_BOARD_CONFIG += $(RIOTBOARD)/common/weact-f4x1cx/weact-f4x1cx.config
|
||||
endif
|
||||
|
@ -1,2 +0,0 @@
|
||||
CONFIG_MODULE_BOOTLOADER_STM32=y
|
||||
CONFIG_MODULE_USB_BOARD_RESET=y
|
@ -20,6 +20,6 @@ config BOARD_NRF51DK
|
||||
|
||||
select HAVE_SAUL_GPIO
|
||||
|
||||
select MODULE_PERIPH_UART_HW_FC if TEST_KCONFIG && HAS_PERIPH_UART_HW_FC
|
||||
select MODULE_PERIPH_UART_HW_FC if HAS_PERIPH_UART_HW_FC && MODULE_PERIPH_UART
|
||||
|
||||
source "$(RIOTBOARD)/common/nrf51/Kconfig"
|
||||
|
@ -2,6 +2,8 @@ ifneq (,$(filter saul_default,$(USEMODULE)))
|
||||
USEMODULE += saul_gpio
|
||||
endif
|
||||
|
||||
FEATURES_REQUIRED += periph_uart_hw_fc
|
||||
ifneq (,$(filter periph_uart,$(USEMODULE)))
|
||||
FEATURES_REQUIRED += periph_uart_hw_fc
|
||||
endif
|
||||
|
||||
include $(RIOTBOARD)/common/nrf51/Makefile.dep
|
||||
|
@ -15,6 +15,6 @@ config BOARD_NRF51DONGLE
|
||||
select HAS_PERIPH_UART
|
||||
select HAS_PERIPH_UART_HW_FC
|
||||
|
||||
select MODULE_PERIPH_UART_HW_FC if TEST_KCONFIG && HAS_PERIPH_UART_HW_FC
|
||||
select MODULE_PERIPH_UART_HW_FC if HAS_PERIPH_UART_HW_FC && MODULE_PERIPH_UART
|
||||
|
||||
source "$(RIOTBOARD)/common/nrf51/Kconfig"
|
||||
|
@ -1,3 +1,6 @@
|
||||
FEATURES_REQUIRED += periph_uart_hw_fc
|
||||
|
||||
ifneq (,$(filter periph_uart,$(USEMODULE)))
|
||||
FEATURES_REQUIRED += periph_uart_hw_fc
|
||||
endif
|
||||
|
||||
include $(RIOTBOARD)/common/nrf51/Makefile.dep
|
||||
|
@ -11,6 +11,6 @@ config BOARD_PARTICLE_ARGON
|
||||
bool
|
||||
default y
|
||||
select BOARD_COMMON_PARTICLE_MESH
|
||||
select MODULE_PERIPH_UART_HW_FC if TEST_KCONFIG && HAS_PERIPH_UART_HW_FC && MODULE_PERIPH_UART
|
||||
select MODULE_PERIPH_UART_HW_FC if HAS_PERIPH_UART_HW_FC && MODULE_PERIPH_UART
|
||||
|
||||
source "$(RIOTBOARD)/common/particle-mesh/Kconfig"
|
||||
|
@ -11,6 +11,6 @@ config BOARD_PARTICLE_BORON
|
||||
bool
|
||||
default y
|
||||
select BOARD_COMMON_PARTICLE_MESH
|
||||
select MODULE_PERIPH_UART_HW_FC if TEST_KCONFIG && HAS_PERIPH_UART_HW_FC && MODULE_PERIPH_UART
|
||||
select MODULE_PERIPH_UART_HW_FC if HAS_PERIPH_UART_HW_FC && MODULE_PERIPH_UART
|
||||
|
||||
source "$(RIOTBOARD)/common/particle-mesh/Kconfig"
|
||||
|
@ -34,7 +34,7 @@ config BOARD_STM32F723E_DISCO
|
||||
|
||||
select HAVE_SAUL_GPIO
|
||||
select HAVE_FT5X06
|
||||
select MODULE_PERIPH_UART_HW_FC if TEST_KCONFIG && HAS_PERIPH_UART_HW_FC && MODULE_PERIPH_UART
|
||||
select MODULE_PERIPH_UART_HW_FC if HAS_PERIPH_UART_HW_FC && MODULE_PERIPH_UART
|
||||
# Workaround due to stdout only working with stdin enabled
|
||||
select MODULE_STDIN if TEST_KCONFIG
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
ifneq (,$(filter periph_uart,$(USEMODULE)))
|
||||
USEMODULE += periph_uart_hw_fc
|
||||
FEATURES_REQUIRED += periph_uart_hw_fc
|
||||
endif
|
||||
|
||||
ifneq (,$(filter saul_default,$(USEMODULE)))
|
||||
|
@ -41,7 +41,7 @@ config BOARD_STM32L496G_DISCO
|
||||
select HAVE_FT5X06
|
||||
|
||||
select MODULE_PERIPH_LPUART if MODULE_PERIPH_UART
|
||||
select MODULE_PERIPH_UART_HW_FC if MODULE_PERIPH_UART && !MODULE_PERIPH_SPI_STMOD
|
||||
select MODULE_PERIPH_UART_HW_FC if MODULE_PERIPH_UART && !MODULE_PERIPH_SPI_STMOD && HAS_PERIPH_UART_HW_FC
|
||||
|
||||
source "$(RIOTBOARD)/common/stm32/Kconfig"
|
||||
|
||||
|
@ -14,6 +14,6 @@ ifneq (,$(filter periph_uart,$(USEMODULE)))
|
||||
USEMODULE += periph_lpuart
|
||||
ifeq (,$(filter periph_spi_stmod_plus,$(USEMODULE)))
|
||||
# if STMod+ is not used with SPI (default), the UART interface uses HW FC
|
||||
USEMODULE += periph_uart_hw_fc
|
||||
FEATURES_REQUIRED += periph_uart_hw_fc
|
||||
endif
|
||||
endif
|
||||
|
@ -28,7 +28,7 @@ config BOARD_UBLOX_C030_U201
|
||||
select BOARD_HAS_LSE
|
||||
|
||||
select HAVE_SAUL_GPIO
|
||||
select MODULE_PERIPH_UART_HW_FC if TEST_KCONFIG && HAS_PERIPH_UART_HW_FC
|
||||
select MODULE_PERIPH_UART_HW_FC if HAS_PERIPH_UART_HW_FC && MODULE_PERIPH_UART
|
||||
|
||||
config CLOCK_HSE
|
||||
default 12000000
|
||||
|
@ -1,4 +1,7 @@
|
||||
USEMODULE += periph_uart_hw_fc
|
||||
ifneq (,$(filter periph_uart,$(USEMODULE)))
|
||||
FEATURES_REQUIRED += periph_uart_hw_fc
|
||||
endif
|
||||
|
||||
|
||||
ifneq (,$(filter saul_default,$(USEMODULE)))
|
||||
USEMODULE += saul_gpio
|
||||
|
@ -14,5 +14,6 @@ config MODULE_STDIO_TINYUSB_CDC_ACM
|
||||
depends on MODULE_TINYUSB_DEVICE
|
||||
depends on MODULE_TINYUSB_CLASS_CDC
|
||||
select MODULE_STDIO_AVAILABLE
|
||||
select USE_STDOUT_BUFFERED
|
||||
|
||||
endchoice
|
||||
|
@ -7,7 +7,7 @@
|
||||
|
||||
if MODULE_PICOLIBC
|
||||
|
||||
config PICOLIBC_STDOUT_BUFFERED
|
||||
config MODULE_PICOLIBC_STDOUT_BUFFERED
|
||||
bool "Buffered standard output"
|
||||
default USE_STDOUT_BUFFERED
|
||||
help
|
||||
|
@ -29,6 +29,13 @@ config MODULE_STDIO_RTT
|
||||
select MODULE_ZTIMER
|
||||
select MODULE_ZTIMER_MSEC
|
||||
|
||||
config MODULE_STDIO_SEMIHOSTING
|
||||
bool "ARM and RISC-V Semihosting"
|
||||
depends on HAS_ARCH_ARM || HAS_ARCH_RISCV
|
||||
select MODULE_ZTIMER
|
||||
select MODULE_ZTIMER_MSEC
|
||||
select USE_STDOUT_BUFFERED
|
||||
|
||||
config MODULE_SLIPDEV_STDIO
|
||||
bool "SLIP network device"
|
||||
depends on MODULE_SLIPDEV
|
||||
|
@ -61,5 +61,7 @@ config MODULE_STDIO_CDC_ACM
|
||||
depends on MODULE_USBUS_CDC_ACM && !MODULE_TINYUSB_DEVICE
|
||||
select MODULE_ISRPIPE
|
||||
select MODULE_STDIO_AVAILABLE
|
||||
select USE_STDOUT_BUFFERED
|
||||
|
||||
|
||||
endchoice
|
||||
|
5
tests/sys/stdio_semihosting/app.config.test
Normal file
5
tests/sys/stdio_semihosting/app.config.test
Normal file
@ -0,0 +1,5 @@
|
||||
CONFIG_MODULE_STDIO_SEMIHOSTING=y
|
||||
CONFIG_MODULE_SHELL=y
|
||||
CONFIG_MODULE_SHELL_CMDS_DEFAULT=y
|
||||
CONFIG_MODULE_PS=y
|
||||
CONFIG_FORCE_USB_STDIO=n
|
Loading…
Reference in New Issue
Block a user