2023-12-19 12:00 AM
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:
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?
Solved! Go to Solution.
2024-01-31 11:38 AM
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).
2023-12-19 02:25 AM
2023-12-19 03:52 AM
Its a very complex self made board - i cant provide you the complete Schematic/Design.
But it worked multiple weeks with this board without any problem.
And as I told: I also tryed out other Controllers on other boards (which previously worked). With all of them I have exactly the same issue. I also tryed it on an original NUCLEO-H743 with the integrated ST-LINK - still the same error.
The second point is: If I use the CubeProgrammer I can read and write the Controller on my board without any problems.
So I do not think that the issue has something to do with the board.
2023-12-19 04:11 AM
You could try switching to other debug : in configurations.. -> openOCD
+ set in generator options : software reset , or try "under reset" :
2023-12-19 05:18 AM
Thanks for your answer.
With openOCD everything works fine.
2023-12-19 07:46 AM
Hello,
The issue does not exist for Nucleo-H743ZI with a combination of following software versions:
Try the ST-Link upgrade . Otherwise, it would be better to re-install ST-LINK server software.
Thanks,
Rim
2023-12-21 12:55 AM
Hello,
Could you also provide the settings for the debug configuration?
2023-12-25 02:17 AM
Which settings you mean exactly? How can I provide them?
2023-12-25 06:07 AM
Hello,
I mean the Debug configuration as shown in the screenshot:
2023-12-29 05:36 AM
This is my setting (it should be default, I havent changed anything here):