2025-06-11 8:39 AM - last edited on 2025-06-11 9:13 AM by Andrew Neil
Hello guys,
Hope you could help me with this error.
For context, I've been using my STM32 nucleo f446re board with no problems in the past. This is the first time I've encountered this error whenever I try to program the chip or debug it using STLINK GDB SERVER. (See attached image for reference)
What's weird is that, when I try to upload my program or debug it with OPENOCD i do not encounter such errors, but I do notice when I go out of debug mode the MCU does not function, it's only when in debug mode that the MCU functions as programmed.
(in debug mode with OPENOCD)
(UPLOADING THE PROGRAM WITH OPENOCD)
I've tried using stm32cubeprogrammer to try and communicate with the MCU, it communicates with the MCU no problem, it can even read the flash, and I've tried erasing the contents of flash using the programmer in the hopes of fixing the error. But after erasing the flash the error still persists.
I've also tried connecting the BOOT0 pin to Vdd and erasing the flash after but still the same error.
Any inputs regarding this error would greatly help. Thanks!
Solved! Go to Solution.
2025-06-11 8:55 AM
Have you tried turning it off and on again?
https://community.st.com/t5/stm32cubeide-mcus/failed-to-bind-to-port-61234/m-p/789052
2025-06-11 8:55 AM
Have you tried turning it off and on again?
https://community.st.com/t5/stm32cubeide-mcus/failed-to-bind-to-port-61234/m-p/789052
2025-06-11 8:56 AM
TCP port related errors may indicate that those ports are still used by other tasks which could be some old gdb session "hanging". Reboot might resolve those issues.
hth
KnarfB
2025-06-11 8:59 AM
Hello @Jopail12
First let me thank you for posting and welcome to the ST Community.
For more investigation, I suggest that you provide the STM32CubeIDE Debug configuration tab and your project.
Thanks.
Mahmoud
To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.
2025-06-11 9:12 AM
@KnarfB wrote:Reboot might resolve those issues.
It did for me!
2025-06-11 8:50 PM
Hey guys! Thanks for the feedback, and indeed i tried rebooting my PC and it worked after that! Appreciate the help. Cheers!
2025-06-11 8:53 PM
Classic 1st step to debugging technique and it works most of the time! haha!
Thanks mate! It worked for me. Cheers!