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

Hi Mattias

Thanks for your reply. I had to give up on CubeIDE for the project I was working on at the time as the H7xx wasn’t supported properly at the time so I changed over to using an NXP i.mx device, so I haven’t got the system configured on my PC at the moment I’m afraid.  I notice the latest version does support the H7 better so I may use it again later, and I’ll see if gdb works then.

Best regards

Mike

AGal
Associate

I have a project that I started and am currently debugging with STM32CubeIDE. Seemingly overnight it decided to start showing me that same error message whenever I clicked on the debug icon. For me the problem ended up being that I somehow had selected to debug as "C/C++ application" instead of "STM32 C/C++ Application". I couldn't quite figure out how to set up the "C/C++ application" configurations to work, but I'm back up and running again with the STM32 application that I had set up previously. That one seems to be ready to go with minimal to no changes on initial setup.

0690X00000DXHnmQAH.png

DSAN.1
Associate

In my project, "Name_of_project Debug.launch" file was missing.

I restored it, and it started to work.

GAndr.1
Associate

So...I had the same problem, but not for the MCU debbuging, but for the C/C++ Application debbug. (STMCubeIDE 1.4.0)

I just installed the gdb file in MinGW and added the path C:\MinGW\bin\gdb.exe to C/C++ -> GDB -> Debug configuration Defaults -> GDB debugger.

GDevi.1
Associate

I have the same issue but only in Ubuntu on a fresh install and imported project. I tried multiple things but can’t find a way to fit it, it’s very annoying…

Kepo
Associate II

Error caused by ProjectName.launch file not created.

Make sure the project name is selected -> "debug as" -> STM32 Cortex-M C/C++ Application.

BReza.1
Associate

Hi. Please

1) check your programming type

2) regenerate cube MX in your project.

3) CTRL+S (for save)

4) start to test programming and debug

;)

0693W00000DmCziQAF.png

3 years later and I'm also having this same problem! The sad fact is that STM32CubeIDE is a little unstable and buggy and it looks like STM needs to focus more resources and a good manager to solve these problems before they lose credibility.

Can´t believe I'm suffering from this bug today 3 years later! A massive Cube update was just installed and the bug persists. Before I had to run the debugger at least twice to get it to work, now it fails continuously, and searching for gnu.exe in the STM folder is so far not listing it. Is there an update on how to fix this correctly?

In my case on windows it was located at C:\ST\STM32CubeIDE_1.12.0\STM32CubeIDE\plugins\com.st.stm32cube.ide.mcu.externaltools.openocd.win32_2.2.300.202301161003\tools\bin\openocd.exe