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 cd37093e54c422919fd57d9f469e36743ec9ec26
Author: raiden00pl <[email protected]>
AuthorDate: Mon Oct 19 14:32:50 2026 +0200

    boards/nucleo-f429zi: make the ST-LINK virtual COM port the default console
    
    Define the USART3 (virtual COM port) and USART6 (Arduino) pins
    unconditionally and default the console choice to the virtual COM port,
    so builds that bypass the board Kconfig still get a console.
    
    Signed-off-by: raiden00pl <[email protected]>
    Assisted-by: Claude Code
---
 boards/arm/stm32f4/nucleo-f429zi/Kconfig              |  2 +-
 .../stm32f4/nucleo-f429zi/configs/netnsh/defconfig    |  1 -
 .../arm/stm32f4/nucleo-f429zi/configs/nsh/defconfig   |  1 -
 .../arm/stm32f4/nucleo-f429zi/configs/trace/defconfig |  1 -
 boards/arm/stm32f4/nucleo-f429zi/include/board.h      | 19 ++++++-------------
 5 files changed, 7 insertions(+), 17 deletions(-)

diff --git a/boards/arm/stm32f4/nucleo-f429zi/Kconfig 
b/boards/arm/stm32f4/nucleo-f429zi/Kconfig
index f517fa46882..3dea12d8cb1 100644
--- a/boards/arm/stm32f4/nucleo-f429zi/Kconfig
+++ b/boards/arm/stm32f4/nucleo-f429zi/Kconfig
@@ -7,7 +7,7 @@ if ARCH_BOARD_NUCLEO_F429ZI
 
 choice
        prompt "Select Console wiring."
-       default NUCLEO_F429ZI_CONSOLE_ARDUINO
+       default NUCLEO_F429ZI_CONSOLE_VIRTUAL
        ---help---
                Select where you will connect the console.
 
diff --git a/boards/arm/stm32f4/nucleo-f429zi/configs/netnsh/defconfig 
b/boards/arm/stm32f4/nucleo-f429zi/configs/netnsh/defconfig
index 2832169e69c..f73c7f82f5b 100644
--- a/boards/arm/stm32f4/nucleo-f429zi/configs/netnsh/defconfig
+++ b/boards/arm/stm32f4/nucleo-f429zi/configs/netnsh/defconfig
@@ -51,7 +51,6 @@ CONFIG_NET_UDP_CHECKSUMS=y
 CONFIG_NSH_BUILTIN_APPS=y
 CONFIG_NSH_FILEIOSIZE=512
 CONFIG_NSH_READLINE=y
-CONFIG_NUCLEO_F429ZI_CONSOLE_VIRTUAL=y
 CONFIG_PREALLOC_TIMERS=4
 CONFIG_RAM_SIZE=114688
 CONFIG_RAM_START=0x20000000
diff --git a/boards/arm/stm32f4/nucleo-f429zi/configs/nsh/defconfig 
b/boards/arm/stm32f4/nucleo-f429zi/configs/nsh/defconfig
index fe9b8d93a56..a63ce68b6db 100644
--- a/boards/arm/stm32f4/nucleo-f429zi/configs/nsh/defconfig
+++ b/boards/arm/stm32f4/nucleo-f429zi/configs/nsh/defconfig
@@ -30,7 +30,6 @@ CONFIG_MM_REGIONS=2
 CONFIG_NSH_BUILTIN_APPS=y
 CONFIG_NSH_FILEIOSIZE=512
 CONFIG_NSH_READLINE=y
-CONFIG_NUCLEO_F429ZI_CONSOLE_VIRTUAL=y
 CONFIG_PREALLOC_TIMERS=4
 CONFIG_RAM_SIZE=114688
 CONFIG_RAM_START=0x20000000
diff --git a/boards/arm/stm32f4/nucleo-f429zi/configs/trace/defconfig 
b/boards/arm/stm32f4/nucleo-f429zi/configs/trace/defconfig
index f2f91adebdb..ea735bf8bdd 100644
--- a/boards/arm/stm32f4/nucleo-f429zi/configs/trace/defconfig
+++ b/boards/arm/stm32f4/nucleo-f429zi/configs/trace/defconfig
@@ -53,7 +53,6 @@ CONFIG_NET_UDP_CHECKSUMS=y
 CONFIG_NSH_BUILTIN_APPS=y
 CONFIG_NSH_FILEIOSIZE=512
 CONFIG_NSH_READLINE=y
-CONFIG_NUCLEO_F429ZI_CONSOLE_VIRTUAL=y
 CONFIG_PREALLOC_TIMERS=4
 CONFIG_RAM_SIZE=114688
 CONFIG_RAM_START=0x20000000
diff --git a/boards/arm/stm32f4/nucleo-f429zi/include/board.h 
b/boards/arm/stm32f4/nucleo-f429zi/include/board.h
index 228fa5f5cb7..749067ea206 100644
--- a/boards/arm/stm32f4/nucleo-f429zi/include/board.h
+++ b/boards/arm/stm32f4/nucleo-f429zi/include/board.h
@@ -238,7 +238,10 @@
 #define GPIO_TIM3_CH1OUT (GPIO_TIM3_CH1OUT_1|GPIO_SPEED_50MHz)
 #define GPIO_TIM4_CH1OUT (GPIO_TIM4_CH1OUT_1|GPIO_SPEED_50MHz)
 
-#if defined(CONFIG_NUCLEO_F429ZI_CONSOLE_ARDUINO)
+/* USART3: ST-LINK virtual COM port (PD8 TX, PD9 RX), the default console */
+
+#define GPIO_USART3_RX (GPIO_USART3_RX_3|GPIO_SPEED_100MHz)
+#define GPIO_USART3_TX (GPIO_USART3_TX_3|GPIO_SPEED_100MHz)
 
 /* USART6:
  *
@@ -254,18 +257,8 @@
  *   -- ----- --------- -----
  */
 
- #  define GPIO_USART6_RX (GPIO_USART6_RX_2|GPIO_SPEED_100MHz)
- #  define GPIO_USART6_TX (GPIO_USART6_TX_2|GPIO_SPEED_100MHz)
-#endif
-
-/* USART3:
- * Use  USART3 and the USB virtual COM port
- */
-
-#if defined(CONFIG_NUCLEO_F429ZI_CONSOLE_VIRTUAL)
- #  define GPIO_USART3_RX (GPIO_USART3_RX_3|GPIO_SPEED_100MHz)
- #  define GPIO_USART3_TX (GPIO_USART3_TX_3|GPIO_SPEED_100MHz)
-#endif
+#define GPIO_USART6_RX (GPIO_USART6_RX_2|GPIO_SPEED_100MHz)
+#define GPIO_USART6_TX (GPIO_USART6_TX_2|GPIO_SPEED_100MHz)
 
 /* DMA channels *************************************************************/
 

Reply via email to