Skip to main content
MikeDB
Senior II
May 1, 2019
Question

STM32CubeIDE Cannot run program "gdb": Launching failed

  • May 1, 2019
  • 32 replies
  • 23917 views

I'm sure it's something silly and I can't believe I'm the only person who has seen this message but searching this site doesn't yield any clues. Can someone point me to what I am setting up wrong, presumably in the Debug Configuration menu ?

32 replies

Visitor II
April 11, 2024

I also encountered the same problem, and finally solved the problem I encountered after 2 days of trying.
There are two reasons for this problem:
1. The firmware version of ST-LINK is too low, and the connection between ST-Link and gdb cannot be established. To solve this problem, you need to upgrade the firmware of ST-LINK to the latest version.
2. The project of STM32CUBEIDE does not include the correct path of arm-none-eabi. If this path is valid, you can see the includes directory under project.

RayYANG_0-1712826724661.png

C:\ST\STM32CubeIDE_1.13.2\STM32CubeIDE\plugins\com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.1.202309131626\tools\bin

RayYANG_1-1712826787976.png

 

Hope can help you.

Pavel A.
Super User
April 11, 2024

2. The project of STM32CUBEIDE does not include the correct path of arm-none-eabi. 

This is strange, CubeIDE always adds location of its ARM toolchain to PATH automatically. If it can find the compiler, it should find the GDB. If you change the PATH manually you can end up with wrong toolchain as well.

But this issue with "GDB not found" often occurs when projects are moved to other machine - because the debugger path is cached in the .launch files. So the best method is to create a new debug configuration and purge old .launch files.

 

 

Explorer
September 9, 2025

Adding my experience, in case it helps someone.

I ran into the same issue last night. I decided to reinstall the STM32 IDE from "C:\Program Files\..." to "C:\ST", after reading someone's response about avoiding path names with spaces.

Doing so resolved the issue.