This is an automated email from the ASF dual-hosted git repository.

xiaoxiang781216 pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/nuttx.git

commit f3949cc4f9cffdcd61a4fc3ae8b9cad873fc1676
Author: raiden00pl <[email protected]>
AuthorDate: Mon Oct 19 14:32:50 2026 +0200

    boards/nucleo-g474re: use the ST-LINK virtual COM port as default console
    
    nsh and usbserial move from USART3 (Morpho CN7) to LPUART1, the
    STLINK-V3E virtual COM port already used by lpuartnsh.
    
    Signed-off-by: raiden00pl <[email protected]>
    Assisted-by: Claude Code
---
 Documentation/platforms/arm/stm32g4/boards/nucleo-g474re/index.rst | 6 +++++-
 boards/arm/stm32g4/nucleo-g474re/configs/nsh/defconfig             | 4 ++--
 boards/arm/stm32g4/nucleo-g474re/configs/usbserial/defconfig       | 4 ++--
 3 files changed, 9 insertions(+), 5 deletions(-)

diff --git a/Documentation/platforms/arm/stm32g4/boards/nucleo-g474re/index.rst 
b/Documentation/platforms/arm/stm32g4/boards/nucleo-g474re/index.rst
index de96e226ec0..dbde5514cd6 100644
--- a/Documentation/platforms/arm/stm32g4/boards/nucleo-g474re/index.rst
+++ b/Documentation/platforms/arm/stm32g4/boards/nucleo-g474re/index.rst
@@ -77,8 +77,12 @@ The board has 1 user LED.
 Serial Consoles
 ===============
 
+The default console is LPUART1 on PA2/PA3, which the board wires to the
+STLINK-V3E virtual COM port, so the console is available on the USB
+connection without extra wiring (``nsh``, ``lpuartnsh`` and ``usbserial``).
+
 The MCU's USART3 is exposed to the pin 1 and 2 of the "Morpho connector" CN7
-on the board.
+on the board and can be selected as console instead.
 
 FLASH Bootloader Support
 ========================
diff --git a/boards/arm/stm32g4/nucleo-g474re/configs/nsh/defconfig 
b/boards/arm/stm32g4/nucleo-g474re/configs/nsh/defconfig
index 6f6a0cc64d8..7d8640e0e72 100644
--- a/boards/arm/stm32g4/nucleo-g474re/configs/nsh/defconfig
+++ b/boards/arm/stm32g4/nucleo-g474re/configs/nsh/defconfig
@@ -27,6 +27,7 @@ CONFIG_DEBUG_SYMBOLS=y
 CONFIG_INIT_ENTRYPOINT="nsh_main"
 CONFIG_LIBM=y
 CONFIG_LINE_MAX=64
+CONFIG_LPUART1_SERIAL_CONSOLE=y
 CONFIG_NSH_FILEIOSIZE=512
 CONFIG_NSH_READLINE=y
 CONFIG_PRIORITY_INHERITANCE=y
@@ -36,8 +37,7 @@ CONFIG_RAW_BINARY=y
 CONFIG_SCHED_HPWORK=y
 CONFIG_SCHED_LPWORK=y
 CONFIG_SCHED_WAITPID=y
-CONFIG_STM32_USART3=y
+CONFIG_STM32_LPUART1=y
 CONFIG_SYSTEM_NSH=y
-CONFIG_USART3_SERIAL_CONSOLE=y
 CONFIG_USERLED=y
 CONFIG_USERLED_LOWER=y
diff --git a/boards/arm/stm32g4/nucleo-g474re/configs/usbserial/defconfig 
b/boards/arm/stm32g4/nucleo-g474re/configs/usbserial/defconfig
index d26f370aadc..f5f922f1be2 100644
--- a/boards/arm/stm32g4/nucleo-g474re/configs/usbserial/defconfig
+++ b/boards/arm/stm32g4/nucleo-g474re/configs/usbserial/defconfig
@@ -32,6 +32,7 @@ CONFIG_DEBUG_USB_WARN=y
 CONFIG_INIT_ENTRYPOINT="nsh_main"
 CONFIG_LIBM=y
 CONFIG_LINE_MAX=64
+CONFIG_LPUART1_SERIAL_CONSOLE=y
 CONFIG_NSH_FILEIOSIZE=512
 CONFIG_NSH_READLINE=y
 CONFIG_PRIORITY_INHERITANCE=y
@@ -41,10 +42,9 @@ CONFIG_RAW_BINARY=y
 CONFIG_SCHED_HPWORK=y
 CONFIG_SCHED_LPWORK=y
 CONFIG_SCHED_WAITPID=y
-CONFIG_STM32_USART3=y
+CONFIG_STM32_LPUART1=y
 CONFIG_STM32_USBFS=y
 CONFIG_SYSTEM_NSH=y
-CONFIG_USART3_SERIAL_CONSOLE=y
 CONFIG_USBDEV_BUSPOWERED=y
 CONFIG_USBDEV_DUALSPEED=y
 CONFIG_USBDEV_ISOCHRONOUS=y

Reply via email to