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
mattias norlander
ST Employee

Two things to check if you experience this problem:

  1. Are you using the right debug configuraiton type?
    1. Go to Run -> Debug configurations... The debug config (referred to as launch configuration in Eclipse world) must be of type "STM32 C/C++ Application". You should not have any configurations under the other nodes in the left-side panel. Well, maybe you have downloaded a PC toolchain to also make some x86/PC application in that case those would be launched with "C/C++ Application" configurations...
  2. We have historically seen quite some hungry anti-virus tools who thinks gdb looks tasty or sick?! As a result they eat/delete or quarantine the gdb client.
    1. Double-check that the file "arm-none-eabi-gdb.exe" still exists in your installation folder which would be something like here: C:\ST\STM32CubeIDE_1.2.0\STM32CubeIDE\plugins\com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.7-2018-q2-update.win32_1.0.0.201904181610\tools\bin
    2. If you have this issue I am afraid that you may need to re-install and check the anti-virus tool so that it does not happen again. You can try to switch to the other toolchain to see if this gdb version still is available and able to debug the project: Project Properties -> C/C++ Build -> Settings -> Toolchain versions. Here change to Fixed and GNU ARM Embedded.

I hope this solves the issues for some of you.

S.Ma
Principal

Thanks for the input. Sometime I see such gdb fail message, click a source file in project, open it, and sometime recovers. Probably related to how eclipse guess the user's context? with 1.21k views, this topic seems of interest to users.

Thanks mattias for the detailed info!

That's very helpful to better understand what's going on.

DHoyo
Associate

Hello, I get the same error, after change my debug configutation, it sems that it works... I don't know why... but works.

0690X00000D8EFhQAN.png

GOmon.1
Associate III

I agree . I have just come across the same problem, and cant seem to fix it.

I have even reinstalled gdb and pointed eclipse/Cubeide at it and still get launching failed.

The .gdbinit file does not seem to exist either.

Really buggy, before you even get any of your own bugs.

Please help.

BRose.2
Associate

I also ran into this issue after a couple days of everything working. This worked for me:

Select Project/Properties and select Run/Debug Settings. Delete all of the Launch configurations listed. Click Apply and Close.

The next time you try and debug, the Debug As dialog will pop up, select the STM32 Cortex-M C/C++ Application. That should fix it.

Until the next time it happens and you need to do all this again.

KlausF01
Associate II

I run into this problem, after cubeIDE crashed and had to be canceled with task-manager.

>"Looks like you don't have it pointed to the correct exe. In the "Debugger" tab give full path of the gdb.exe(Windows machine) of the cross compiler that you might have

> installed as the "GDB command"."

I have no idea, where to find this tab! All configurations I looked through, there was no path to be edited.

What's really weared: When I setup a new project, this error this error does not occure at the new project. So, the crashing IDE must have overwritten something within the project, I'm unable to find out.

With the new project, GDB seems to work, but after the crash I'm no longer able to porgramm the nucleo-64 board. I do get a "Error Programming Flash Memory". Really frustrating, as no solution in sight!

MikeDB
Lead

To ST Employees

This is 9 months since I posted this problem and it's obvious many users are still having it. It's not affecting everybody, but once you have the problem it takes a lot of effort to fix it. I accept this is free software and you get what you pay for, but it's causing a lot of people a lot of grief.

Can't someone in the software development team look at this issue and fix it properly ? In fact is there an official issue tracking system for CubeIDE we can at least view so we know the problem is known about ?

Glados
Associate

You can follow this tutorial in order to install and point to gdb.

https://www.youtube.com/watch?v=BoB-4O3ZyhQ

Sent you an e-mail for further discussion. So far we have found some different root-causes leading to the same symptoms/problem. But beyond the fixes we mentioned here, we have not been able to reproduce the problem in other ways. Let's see if we can narrow the problem down on your PC via e-mail.