Showing results for 
Search instead for 
Did you mean: 

Failed to start GDB server Error in initialising ST-Link device

Associate II

Hello folks,

I am new to STM32 and have been using it (STM32H7A3ZIQ) for a while, everything was fine with download and debugging codes until a week ago when STM32CubeIDE suddenly has stopped launching the debug session. An error msg -failed to start GDB server (see attached) pops out whenever I want to debug codes, I have been trying to resolve this very problem for the past week by following other people's solutions on Youtube, but all my attempts were in vain.

In addition, I installed different ST-Link programs provided by ST such that ST-Link server (Utility), STSW 004, 007, and 009. But even by doing so, I couldn't resolve this matter and no device found remains.


  • Even after having updated my device (V3.J8.M3) by using ST-Link 007, STM32CubeIDE doesn't recognise it at all (no device found on target).
  • ST-Link utility also cannot connect to the target

I hope someone could help me to get back coding.

I look forward to hearing your expert thoughts on how to resolve it.




I began having the "failed to start GDB server" error after changing the version of STM32CudeIDE. The solution was to create a new Debug launch configuration using these steps.

Run > Debug Configurations... > New Launch Configuration*

* New Launch Configuration is the icon on the left of the Debug Configurations dialog window.

It may be necessary to copy some of the settings from a previously working launch configuration into the new one.


Hello ADabl.1,

I understand your frustration with the STM32CubeIDE not launching the debug session and the issues with the ST-Link connection. I experienced a similar problem recently with my STM32F401CCU6, and I found a solution that worked for me.


The key was to press both the RESET and BOOT0 buttons on the MCU during the programming and debugging process. Here's the step-by-step procedure that resolved my issue:

  1. Connect Your STM32 to Your Computer: Ensure your STM32 board is connected to your computer via USB.
  2. Set BOOT0 to High: Press and hold the BOOT0 button. This puts the microcontroller into system memory boot mode, allowing it to enter the built-in bootloader.
  3. Press RESET: While holding the BOOT0 button, press the RESET button on the MCU. This action resets the microcontroller and ensures it starts in bootloader mode.
  4. Release RESET: Release the RESET button while still holding BOOT0.
  5. Release BOOT0: After a few seconds, release the BOOT0 button. This sequence ensures that the microcontroller enters a state where it can be reprogrammed and debugged.
  6. Start Debugging in STM32CubeIDE: Open STM32CubeIDE and attempt to start the debug session again.

Additional Tips:

  • Update Firmware: Ensure your ST-Link firmware is up to date. You've already updated to V3.J8.M3, which is good.
  • Check Connections: Double-check all connections between your ST-Link programmer and the MCU. Loose connections can often cause issues.
  • Try Different USB Ports/Cables: Sometimes, the issue might be with the USB port or cable, so try different ones if possible.
  • Reinstall STM32CubeIDE and ST-Link Utilities: As a last resort, uninstall and reinstall the STM32CubeIDE and ST-Link utilities.

After following these steps, my STM32CubeIDE successfully recognized the device, and I was able to debug my codes without any issues.

I hope this solution works for you as well. Please let me know if you need any further assistance.

Best regards,