cancel
Showing results for 
Search instead for 
Did you mean: 

Error in final launch sequence: Failed to start GDB server Failed to start GDB

Jopail12
Associate

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)

error1.png

error1cont.png

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)

Jopail12_1-1749656113434.png

 

(UPLOADING THE PROGRAM WITH OPENOCD)

Jopail12_0-1749656091639.png

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. 

Jopail12_2-1749656184849.png

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! 

1 ACCEPTED SOLUTION

Accepted Solutions
Andrew Neil
Super User

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

https://community.st.com/t5/stm32cubeide-mcus/st-link-error-failed-to-bind-to-port-61235-failure-starting-swv/td-p/784642

 

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.

View solution in original post

6 REPLIES 6
Andrew Neil
Super User

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

https://community.st.com/t5/stm32cubeide-mcus/st-link-error-failed-to-bind-to-port-61235-failure-starting-swv/td-p/784642

 

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.
KnarfB
Super User

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

Mahmoud Ben Romdhane
ST Employee

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.


@KnarfB wrote:

Reboot might resolve those issues.


It did for me!

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.
Jopail12
Associate

Hey guys! Thanks for the feedback, and indeed i tried rebooting my PC and it worked after that! Appreciate the help. Cheers! 

Classic 1st step to debugging technique and it works most of the time! haha!

Thanks mate! It worked for me. Cheers!