Skip to content

boards/arm/stm32: route nucleo-f412zg console through ST-LINK VCP.#18766

Open
aviralgarg05 wants to merge 1 commit intoapache:masterfrom
aviralgarg05:fix/issue-17722-nucleo-f412zg-stlink-console
Open

boards/arm/stm32: route nucleo-f412zg console through ST-LINK VCP.#18766
aviralgarg05 wants to merge 1 commit intoapache:masterfrom
aviralgarg05:fix/issue-17722-nucleo-f412zg-stlink-console

Conversation

@aviralgarg05
Copy link
Copy Markdown
Contributor

Summary

Fixed the NUCLEO-F412ZG board default console routing so nsh uses the on-board ST-LINK virtual COM port by default.

The board header now maps USART2 to the PA2/PA3 pinmux instead of the PD5/PD6 header pins. This matches the board’s shipped solder-bridge configuration and aligns the default console path with the hardware wiring described in issue #17722.

Impact

This change affects only the boards/arm/stm32/nucleo-f412zg board configuration.

  • User impact: the default nsh console now appears on the ST-LINK VCP, which is the expected out-of-the-box serial path.
  • Build impact: no new files or dependencies were added.
  • Compatibility impact: no ABI/API changes; this is a board-level pinmux correction.
  • Documentation impact: none required for this fix, since it corrects existing default board behavior rather than introducing a new feature.

Testing

Host: macOS on Apple Silicon, using the local NuttX workspace and the Apache NuttX Linux CI container image for a clean build environment.

Validation performed:

  • ./tools/checkpatch.sh -c -u -m -f boards/arm/stm32/nucleo-f412zg/include/board.h
  • Clean configure/build in a fresh tree using the Linux CI container:
    • ./tools/configure.sh -E -l nucleo-f412zg:nsh
    • make -j8
  • Repeated the same clean configure/build in a second fresh tree to confirm the result was reproducible.

Build result:

  • nuttx linked successfully.
  • nuttx.hex and nuttx.bin were generated successfully.
  • No warnings or errors were introduced by the board pinmux change.

Use the default USART2 PA2/PA3 pinmux for the NUCLEO-F412ZG board so the nsh console comes up on the on-board ST-LINK virtual COM port instead of the PD5/PD6 header pins.

This matches the board's shipped solder-bridge routing and fixes the default console path described in issue apache#17722.

Signed-off-by: aviralgarg05 <gargaviral99@gmail.com>
@github-actions github-actions bot added Size: XS The size of the change in this PR is very small Board: arm labels Apr 20, 2026
Copy link
Copy Markdown
Contributor

@linguini1 linguini1 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please document this change on the board docs.

Can you please test on hardware?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Board: arm Size: XS The size of the change in this PR is very small

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[FEATURE] nucleo-f412zg reroute uart console to stlink.

3 participants