cancel
Showing results for 
Search instead for 
Did you mean: 

STM32CubeIDE Cannot run program "gdb": Launching failed

MikeDB
Lead

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 ?

42 REPLIES 42
Slayer
Associate

In my case this has fixed the problem (on Windows): just open the STMCubeIDE and create a new workspace. In this new workspace open your project (File>Open Projects from File System ...) and then continue as before.

RayYANG
Associate

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.

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.