cancel
Showing results for 
Search instead for 
Did you mean: 

Why can't ST-LINK_gdbserver connect to my NUCLEO-H7S3L8?

PhucXDoan
Associate III

All I'm looking for is to just somehow set up a GDB server for the NUCELO-H7S3L8 so I can do some debugging. My other board (NUCLEO-L476RG) worked fine using openocd, but my H7 has decided to siphon my precious humanity by being insanely difficult. I tried to use ST-LINK_gdbserver because I assume this is what CubeIDE uses under the hood. In fact, I can create a basic blinking program for the H7, compile it, upload it, and debug it all in CubeIDE just fine, but this is just not my preferred style of development. But CubeIDE apparently has some sort of magical incantation that my lowly existence doesn't know about in order to get ST-LINK_gdbserver to actually connect to the H7 target.

 

> C:\ST\STM32CubeIDE_1.16.1\STM32CubeIDE\plugins\com.st.stm32cube.ide.mcu.externaltools.stlink-gdb-server.win32_2.1.400.202404281720\tools\bin>ST-LINK_gdbserver.exe -cp C:\ST\STM32CubeIDE_1.15.1\STM32CubeIDE\plugins\com.st.stm32cube.ide.mcu.externaltools.cubeprogrammer.win32_2.1.201.202404072231\tools\bin -d

STMicroelectronics ST-LINK GDB server. Version 7.8.0
Copyright (c) 2024, STMicroelectronics. All rights reserved.

Starting server with the following options:
        Persistent Mode            : Disabled
        Logging Level              : 31
        Listen Port Number         : 61234
        Status Refresh Delay       : 15s
        Verbose Mode               : Disabled
        SWD Debug                  : Enabled

COM frequency = 24000 kHz
Target connection mode: Default
Target connection failed. Try connecting under reset
Target connection failed
COM frequency = 8000 kHz
Target connection mode: Default
Target connection failed. Try connecting under reset
Target connection failed
COM frequency = 3300 kHz
Target connection mode: Default
Target connection failed. Try connecting under reset
Target connection failed
COM frequency = 1000 kHz
Target connection mode: Default
Target connection failed. Try connecting under reset
Target connection failed
COM frequency = 200 kHz
Target connection mode: Default
Target connection failed. Try connecting under reset
Target connection failed
COM frequency = 50 kHz
Target connection mode: Default
Target connection failed. Try connecting under reset
Target connection failed
COM frequency = 5 kHz
Target connection mode: Default
Target connection failed. Try connecting under reset
Target connection failed
Target unknown error 32

Error in initializing ST-LINK device.
Reason: Unknown. Please check power and cabling to target.

 

 This is obviously not a connection issue, because once again: it works in CubeIDE.

Am I stuck in purgatory? What's going on? Again, all I want to do is just set up a debugging session; I frankly don't even care about ST-LINK_gdbserver...

1 REPLY 1
MM..1
Chief II

Try use config file and start over bat

@Echo off
cmd /K "ST-LINK_gdbserver.exe -c config.txt || echo GDB server exited"

too check if STLink isnt used by other...