cancel
Showing results for 
Search instead for 
Did you mean: 

Board not connecting in IDE after powering down during debugging

DHOUT19
Associate

I am using the Nucleo-N657X0 for a project. I was in the middle debugging my project and unplugged my board. Now I am unable to connect to my board for debugging or programming in the IDE. I can however connect to the board in CubeProgramming. How do I get my board to connect for debugging and programming again in IDE? I have the boot pins set to the following (just in case this helps):

BOOT0 = 0

BOOT1 = 1

This is what the console outputs when trying to connect.

 

Failed to bind to port 61235, error code -1: No error

Failure starting SWV server on TCP port: 61235

Failed to bind to port 61234, error code -1: No error

Failure starting GDB server: TCP port 61234 not available.

Shutting down...

Exit.

 

Thanks

3 REPLIES 3
STackPointer64
ST Employee

Hello @DHOUT19, and welcome to the community!

Unplugging your board during a debugging session can sometimes cause the GDB server to hang, leaving the process running in the background. To fix this, open the Task Manager, go to the Details tab, locate the ST-LINK_gdbserver.exe process, right-click it, and select End Process. This will free the previously occupied port and allow you to restart your debugging session.

Best regards,

STackPointer64_0-1754299584802.png

To improve visibility of answered topics, please click 'Accept as Solution' on the reply that resolved your issue or answered your question.
Andrew Neil
Super User

@DHOUT19 wrote:

Failed to bind to port 61234, error code -1: No errorks


In true IT fashion, have you tried restarting your computer (not just the IDE)?

See: Failed to bind to port 61234.

A complex system that works is invariably found to have evolved from a simple system that worked.
A complex system designed from scratch never works and cannot be patched up to make it work.

Restarting the computer will also resolve the issue, as it terminates the hanging process during shutdown. However, simply restarting the IDE won’t help because the GDB server runs as a separate process. While the IDE normally starts and stops this process, it sometimes fails to terminate it when it hangs.

To improve visibility of answered topics, please click 'Accept as Solution' on the reply that resolved your issue or answered your question.