cancel
Showing results for 
Search instead for 
Did you mean: 

Problems with GDB Server

Moritz1
Associate III

I am using STM32CubeIDE V1.11.0

I have exactly the same issue which was described in this post:

https://community.st.com/t5/stm32-mcus-boards-and-hardware/st-link-gdb-server-issues/m-p/64010#M623

Multiple weeks everything works fine. But suddenly it stops working and i always get this error message when I try to Debug my code in CubeIDE:

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.

 I tried multiple things:

  • Shuting down PC completely (and disconnect from power supply) and booting again multiple times - it didn't change anything
  • I changed the Port in the Settings to 61238 - same error message, but with the 61238 port number
  • I changed the ST-Link Device - same error message
  • I connected the ST-Link to an other board with an other controller (and selected the appropriate project in cube) but get the same error - so this error seems to be independent of the selected project and Microcontroller.
  • I tryed to connect to the target with STM32CubeProgrammer. This works. I can read out the Flash and I did a full chip erase. Than I changed back to the CubeIDE and tryed again to download and debug - but I get the same error message again.

I enabled the "log file" option in the debugger settings. This file says:

COM frequency = 4000 kHz
Target connection mode: Attach
Reading ROM table for AP 0 @0xe00fefd0
Hardware watchpoint supported by the target
ST-LINK Firmware version : V2J40S7
Device ID: 0x450
PC: 0x79fb70
ST-LINK device status: LOCKUP
Enter STM32_SystemReset() function
ST-LINK detects target voltage = 3.24 V
Device in lock up state, possibly "read and debug" protected. Use monitor commands to remove the protection
ST-LINK device initialization OK
Stm32Device, pollAndNotify running...
ST-LINK device status: HALT_MODE
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.
GdbSrv, deInit entry.
Shutting down...
GdbSessionManager, deInit entry.
GdbSessionManager, deInit exit
SwvSrv deInit entry
SwvSrv deInit exit
Stm32Device, closeDevice() entry
Stm32Device, pollAndNotify stopped
Stm32Device, closeDevice() exit
Stm32Device, deInit success
GdbSrv, deInit exit.
Exit.

What does it mean with "Device in lock up state"? There are no lock fuses set in the target. And the CubeProgrammer can read and write the target without any problems.

I am completly stucked with this problem. And everything I read in the Internet about this error does not helped. Maybe some one here can help me?

 

12 REPLIES 12
Moritz1
Associate III

Any idea?

GDB Server still not working.

I think, i would not try to play around with this sick...

Update or better : install new version of IDE , should work with the new. (you can have more > 1 IDE same time).

If you feel a post has answered your question, please click "Accept as Solution".

Okay, I did a new Installation of STM32CubeIDE. Now the GDB Server works again. 👍