From 3e1f5edb8f8964a194d1b7db87af941979978187 Mon Sep 17 00:00:00 2001 From: Benjamin Valentin Date: Tue, 7 Feb 2023 19:24:38 +0100 Subject: [PATCH 1/2] boards/stm32f4discovery: default to stdio via CDC ACM --- boards/stm32f4discovery/Kconfig | 9 +++++++++ boards/stm32f4discovery/Makefile.dep | 2 ++ boards/stm32f4discovery/Makefile.features | 2 ++ boards/stm32f4discovery/doc.txt | 4 ++++ 4 files changed, 17 insertions(+) diff --git a/boards/stm32f4discovery/Kconfig b/boards/stm32f4discovery/Kconfig index a79d46d75679..e405c8b46fdb 100644 --- a/boards/stm32f4discovery/Kconfig +++ b/boards/stm32f4discovery/Kconfig @@ -28,12 +28,21 @@ config BOARD_STM32F4DISCOVERY # Various other features (if any) select HAS_ARDUINO select HAS_TINYUSB_DEVICE + select HAS_HIGHLEVEL_STDIO # Clock configuration select BOARD_HAS_HSE select HAVE_SAUL_GPIO + select MODULE_USBUS if TEST_KCONFIG && !PACKAGE_TINYUSB + select MODULE_USBUS_CDC_ACM if TEST_KCONFIG && !PACKAGE_TINYUSB + +choice STDIO_IMPLEMENTATION + default MODULE_STDIO_CDC_ACM if MODULE_USBUS + default MODULE_STDIO_TINYUSB_CDC_ACM if PACKAGE_TINYUSB +endchoice + source "$(RIOTBOARD)/common/stm32/Kconfig" config ERROR_MODULES_CONFLICT diff --git a/boards/stm32f4discovery/Makefile.dep b/boards/stm32f4discovery/Makefile.dep index 5472bf8b8d8f..3b1c190aad8c 100644 --- a/boards/stm32f4discovery/Makefile.dep +++ b/boards/stm32f4discovery/Makefile.dep @@ -1,3 +1,5 @@ ifneq (,$(filter saul_default,$(USEMODULE))) USEMODULE += saul_gpio endif + +include $(RIOTBOARD)/common/makefiles/stdio_cdc_acm.dep.mk diff --git a/boards/stm32f4discovery/Makefile.features b/boards/stm32f4discovery/Makefile.features index a111fc95a8d3..24ec337fec72 100644 --- a/boards/stm32f4discovery/Makefile.features +++ b/boards/stm32f4discovery/Makefile.features @@ -17,6 +17,8 @@ FEATURES_PROVIDED += periph_usbdev FEATURES_PROVIDED += arduino FEATURES_PROVIDED += tinyusb_device +FEATURES_PROVIDED += highlevel_stdio + # TODO: re-think concept for conflicts based on actual used peripherals... FEATURES_CONFLICT += periph_spi:periph_dac FEATURES_CONFLICT_MSG += "On stm32f4discovery boards there are the same pins for the DAC and/or SPI_0." diff --git a/boards/stm32f4discovery/doc.txt b/boards/stm32f4discovery/doc.txt index 46a58fc1fd57..ef2e773c17a6 100644 --- a/boards/stm32f4discovery/doc.txt +++ b/boards/stm32f4discovery/doc.txt @@ -58,7 +58,11 @@ arbitrary and can be altered by editing the LEDs LD7 and LD8 are used by the USB connector for over-current (LD8) and data (LD7) indication. +### USB Device Interface +The board has a micro USB port that can be used for USB device mode. +As the ST-Link on the board does not provide a USB-UART interface, the STDIO is +mapped to the micro USB port by default (via CDC ACM). ### Accelerometer From 1cd2c16a75a67205e5fccae1f8ece28ff7ad7e47 Mon Sep 17 00:00:00 2001 From: Benjamin Valentin Date: Tue, 7 Feb 2023 22:54:11 +0100 Subject: [PATCH 2/2] tests/xtimer_now{32, 64}: blacklist stm32f4discovery --- tests/xtimer_now32_overflow/Makefile | 1 + tests/xtimer_now64_continuity/Makefile | 1 + 2 files changed, 2 insertions(+) diff --git a/tests/xtimer_now32_overflow/Makefile b/tests/xtimer_now32_overflow/Makefile index cd4ba65a177b..574e1cb06685 100644 --- a/tests/xtimer_now32_overflow/Makefile +++ b/tests/xtimer_now32_overflow/Makefile @@ -14,6 +14,7 @@ BOARD_BLACKLIST += \ pinetime \ ruuvitag \ stm32f429i-disco \ + stm32f4discovery \ thingy52 \ waspmote-pro \ weact-f401cc \ diff --git a/tests/xtimer_now64_continuity/Makefile b/tests/xtimer_now64_continuity/Makefile index a792249fdeb7..0f47d9548532 100644 --- a/tests/xtimer_now64_continuity/Makefile +++ b/tests/xtimer_now64_continuity/Makefile @@ -15,6 +15,7 @@ BOARD_BLACKLIST += \ pinetime \ ruuvitag \ stm32f429i-disco \ + stm32f4discovery \ thingy52 \ waspmote-pro \ weact-f401cc \