cancel
Showing results for 
Search instead for 
Did you mean: 

Can anyone help me solve the "failed to start GDB server" error.

H.Ahmed
Associate II

I'm trying to program STM32F103C8T6 using CUBEIDE. After solving so many errors now I have this error " failed to start GDB server" tried different PORT NUMBERS and also changed debug prob from " OPEN OCD" to "GDB SERVER" but could not help.

0693W00000UomRtQAJ.png

1 ACCEPTED SOLUTION

Accepted Solutions
MM..1
Chief II

Seems your ST-Link or MCU dont work. Checkthis all first in STLink utility or STMCubeProgrammer sw.

After work try back in debuger.

View solution in original post

21 REPLIES 21
MM..1
Chief II

Seems your ST-Link or MCU dont work. Checkthis all first in STLink utility or STMCubeProgrammer sw.

After work try back in debuger.

PHolt.1
Senior III

This issue has always been there. The software is just not that reliable.

I normally unplug the debugger USB cable and plug it back in and that fixes it - until next time.

The only other fix is to reboot the computer.

It is a real hassle when working remotely. After say 10 debug builds the debugger dies. So when working remotely I use a feature in my product where I upload the code (over http) and it then flashes it, so avoiding any debugger usage. But then obviously I can't "debug" by stepping.

Yes I changed ST-LIINK and STM32F1 but could not help.

It would be tremendous if you can help me to solve this problem.

H.Ahmed
Associate II

I agree with you about the reliability of the both software and hardware.

I would be very thankful if you can help me more.

PHolt.1
Senior III

Are you using a genuine ST STLINK V2 or V3?

There are many chinese counterfeits around and some don't work properly.

If you use STLINK V3 (it is better than V2) then when you connect it to a USB port you should see a "STLINK V3S" drive with a couple of files on it. You need to get this part to work first.

H.Ahmed
Associate II

I'm using ST-LINK V2

H.Ahmed
Associate II

I have selected debug prob to OpenOCD

Is it okay or I have to change it to ST-LINK GDB server??

because when I select OpenOCD this error occur

0693W00000Vi4pyQAB.png

mattias norlander
ST Employee

Hi,

@H.Ahmed​, the STM32F103C8T6 is an MCU which has been particularly subject to cloning by competitors. Maybe because it is embedded on the popular Bluepill board.

The debugger is here detecting that the MCU you have is not a genuine STM32 device. We will never allow non-genuine STM32 devices to be used with our tools as I hope you can understand and respect.

Out of curiosity: From where did you buy this board or MCU?

In general, the only thing I can recommend is to buy MCUs and boards from trustworthy suppliers.

@PHolt.1​, did you read the error message in the OP screenshot? Are you 100% certain that your struggle with ST-LINK debug comes from the same root-cause. I am quite skeptical. Either the device is fake, or it is not. With fake devices I assume we would deny debug 100% of the time.

Feel free to post your screenshots and log-files when you run into debug issues every ~10th launch, and maybe we can find the root-cause. I think we are mixing apples with bananas in this thread. :)

Kind regards, Mattias

PHolt.1
Senior III

If you can tell me where the debugger log is, I will be able to post it.

Yes; my issue is intermittent whereas the OP's is probably constant, so he has another problem.

I am using 100% genuine 32F417VGT6, from UK distributors like Farnell, RS, Anglia. Of course these parts are now nonexistent but I managed to get > 500 before the world went crazy about hoarding stocks.

Many people have reported intermittent STLINK failures, fixable by unplugging the USB cable. That launch sequence error message is completely common.