From e26f08d1796f6afd68e4527a60570912d932bb63 Mon Sep 17 00:00:00 2001 From: Gunar Schorcht Date: Mon, 3 Jul 2023 11:48:01 +0200 Subject: [PATCH] boards/seeedsudio-gd32: documentation fix --- boards/seeedstudio-gd32/doc.txt | 20 +++++++++++++++----- 1 file changed, 15 insertions(+), 5 deletions(-) diff --git a/boards/seeedstudio-gd32/doc.txt b/boards/seeedstudio-gd32/doc.txt index d55b1dcc8a..bc4a4add70 100644 --- a/boards/seeedstudio-gd32/doc.txt +++ b/boards/seeedstudio-gd32/doc.txt @@ -46,7 +46,7 @@ on-board components: | I2S | 2 | no | | CAN | 2 x CAN 2.0B with up to 1 Mbps | no | | PWM | 6 Channels | yes | -| USB | 1 x USB FS OTG | no | +| USB | 1 x USB FS OTG | yes | | Vcc | 3.0V - 3.6V | | | Datasheet | [Datasheet](https://gd32mcu.com/data/documents/datasheet/GD32VF103_Datasheet_Rev1.6.pdf) | | | Reference Manual | [Reference Manual](https://gd32mcu.com/download/down/document_id/222/path_type/1) | | @@ -167,18 +167,28 @@ If another adapter is used, it can be specified using variable OPENOCD_DEBUG_ADAPTER=jlink BOARD=seeedstudio-gd32 make -C examples/hello-world flash ``` -## Accessing STDIO via UART +## Accessing STDIO -The `stdio` is directly accessible through the first UART interface. If an +By default, the `stdio` is provided by the USBUS CDC ACM module `stdio_cdc_acm`. +This interface is mapped to `/dev/ttyACM` on a Linux host, where `` is +the index of the CDC ACM interface, which is 0 by default. + +To use the first UART interface for `stdio` instead, the `stdio_uart` module +has to be enabled: +``` +USEMODULE=stdio_uart BOARD=seeedstudio-gd32 make -C examples/hello-world flash +``` + +The `stdio` is then directly accessible through the first UART interface. If an external USB-to-UART interface is used, this interface is mapped to `/dev/ttyUSB` on a Linux host, where `` is the index of the UART interface, which is 0 by default. Use the `term` target to connect to the board using `/dev/ttyUSB0`: ``` -BOARD=seeedstudio-gd32 make -C examples/hello-world term +BOARD=seeedstudio-gd32 make -C examples/hello-world term PORT=/dev/ttyUSB0 ``` -If the UART interface index of board's USB to UART bridge is not 0, use +If the UART interface index of the USB-to-UART interface is not 0, use the following command to connect: ``` BOARD=seeedstudio-gd32 make -C examples/hello-world term PORT=/dev/ttyUSB