cederom commented on PR #18766:
URL: https://github.com/apache/nuttx/pull/18766#issuecomment-4290848392

   Works now! Great work @aviralgarg05 !! =)
   
   ```
   % uname -a
   FreeBSD hexagon 14.4-RELEASE-p1 FreeBSD 14.4-RELEASE-p1 GENERIC amd64
   
   % git checkout aviralgarg05/fix/issue-17722-nucleo-f412zg-stlink-console
   HEAD is now at 8d0f4d81c0e boards/arm/stm32: switch nucleo-f412zg console to 
USART3 VCP
   
   
   hexagon% git log -1
   commit 8d0f4d81c0eb25bb6dc65a54f16893ef4876bbac (HEAD, 
aviralgarg05/fix/issue-17722-nucleo-f412zg-stlink-console)
   Author: aviralgarg05 <[email protected]>
   Date:   Tue Apr 21 10:12:17 2026 +0530
   
       boards/arm/stm32: switch nucleo-f412zg console to USART3 VCP
   
       Enable USART3 support for STM32F412 and use it as the default 
NUCLEO-F412ZG nsh console path.
   
       The ST-LINK virtual COM port on this board is wired to USART3 on 
PD8/PD9. Restore USART2 to its header-pin routing, switch the nsh defconfig to 
USART3, and update the board documentation to match the shipped solder-bridge 
configuration described in issue #17722.
   
       Signed-off-by: aviralgarg05 <[email protected]>
   
   
   % gmake clean distclean -j; ./tools/configure.sh -B nucleo-f412zg:nsh && 
gmake -j
   NuttX has not been configured!
   NuttX has not been configured!
   To configure the project:
   To configure the project:
     tools/configure.sh <config>
     tools/configure.sh <config>
   For a list of available configurations:
   For a list of available configurations:
     tools/configure.sh -L
     tools/configure.sh -L
     Copy files
     Select CONFIG_HOST_BSD=y
     Refreshing...
   (..)
   #
   # configuration written to .config
   #
   Create version.h
   LN: platform/board to /XXX/nuttx/pr/nuttx-apps.git/platform/dummy
   Register: nsh
   Register: dd
   Register: sh
   CC:  pthread/pthread_setname_np.c In file included from 
chip/stm32_flash.c:40:
   chip/stm32f20xxf40xx_flash.c:53:4: warning: #warning "Default Flash 
Configuration Used - See Override Flash Size Designator" [-Wcpp]
      53 | #  warning "Default Flash Configuration Used - See Override Flash 
Size Designator"
         |    ^~~~~~~
   CC:  pthread/pthread_getname_np.c chip/stm32_gpio.c:44:11: note: '#pragma 
message: CONFIG_STM32_USE_LEGACY_PINMAP will be deprecated migrate board.h see 
tools/stm32_pinmap_tool.py'
      44 | #  pragma message "CONFIG_STM32_USE_LEGACY_PINMAP will be deprecated 
migrate board.h see tools/stm32_pinmap_tool.py"
         |           ^~~~~~~
   LD: nuttx
   Memory region         Used Size  Region Size  %age Used
              flash:         70 KB         1 MB      6.84%
               sram:        8024 B       256 KB      3.06%
   CP: nuttx.hex
   CP: nuttx.bin
   
   
   % openocd -f  interface/stlink.cfg -f target/stm32f4x.cfg -c 'program 
nuttx.bin 0x08000000; reset run; exit'
   Open On-Chip Debugger 0.12.0
   Licensed under GNU GPL v2
   For bug reports, read
        http://openocd.org/doc/doxygen/bugs.html
   Info : auto-selecting first available session transport "hla_swd". To 
override use 'transport select <transport>'.
   Info : The selected transport took over low-level target control. The 
results might differ compared to plain JTAG/SWD
   Info : clock speed 2000 kHz
   Info : STLINK V2J45M30 (API v2) VID:PID 0483:374B
   Info : Target voltage: 3.273594
   Info : [stm32f4x.cpu] Cortex-M4 r0p1 processor detected
   Info : [stm32f4x.cpu] target has 6 breakpoints, 4 watchpoints
   Info : starting gdb server for stm32f4x.cpu on 3333
   Info : Listening on port 3333 for gdb connections
   Info : Unable to match requested speed 2000 kHz, using 1800 kHz
   Info : Unable to match requested speed 2000 kHz, using 1800 kHz
   [stm32f4x.cpu] halted due to debug-request, current mode: Thread
   xPSR: 0x01000000 pc: 0x08000996 msp: 0x20002358
   Info : Unable to match requested speed 8000 kHz, using 4000 kHz
   Info : Unable to match requested speed 8000 kHz, using 4000 kHz
   ** Programming Started **
   Info : device id = 0x30006441
   Info : flash size = 1024 KiB
   ** Programming Finished **
   Info : Unable to match requested speed 2000 kHz, using 1800 kHz
   Info : Unable to match requested speed 2000 kHz, using 1800 kHz
   
   
   % cu -l /dev/cuaU0 -s 115200
   Connected
   
   nsh> uname -a
   NuttX 10.4.0 8d0f4d81c0e Apr 21 2026 20:05:22 arm nucleo-f412zg
   nsh> ?
   help usage:  help [-v] [<cmd>]
   
       .           cd          expr        mv          usleep      unset
       [           cp          false       printf      source      uptime
       ?           cmp         help        pwd         test        watch
       alias       dirname     hexdump     rm          time        xd
       unalias     dmesg       ls          rmdir       true
       basename    echo        mkdir       set         truncate
       break       exec        mkrd        kill        uname
       cat         exit        mount       sleep       umount
   
   Builtin Apps:
       dd     nsh    sh
   ```


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to