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 ?

40 REPLIES 40
Markus GIRDLAND
ST Employee

Could be quite a few things. Could you activate the gdb server log in the "Debugger" tab there's a "Log to file:" that you can click and then paste here.

Mike Hill
Associate II

0690X00000AriqlQAB.pngI am having the same problem on a project I converted from Atollic TrueStudio 9.1.0. It compiles just fine, but I can't debug now.

Where exactly is the option to log to a file? I can't find what you mean.

I did find this error log about the problem:

!ENTRY org.eclipse.cdt.dsf.gdb 4 5012 2019-11-05 16:04:49.906

!MESSAGE Error with command: gdb --version

!STACK 0

java.io.IOException: Cannot run program "gdb": Launching failed

   at org.eclipse.cdt.utils.spawner.Spawner.exec(Spawner.java:352)

   at org.eclipse.cdt.utils.spawner.Spawner.<init>(Spawner.java:94)

   at org.eclipse.cdt.utils.spawner.Spawner.<init>(Spawner.java:124)

   at org.eclipse.cdt.utils.spawner.ProcessFactory.exec(ProcessFactory.java:73)

   at org.eclipse.cdt.dsf.gdb.launching.LaunchUtils.getGDBVersion(LaunchUtils.java:320)

   at org.eclipse.cdt.dsf.gdb.launching.GdbLaunch.getGDBVersion(GdbLaunch.java:511)

   at org.eclipse.cdt.dsf.gdb.launching.GdbLaunchDelegate.launchDebugSession(GdbLaunchDelegate.java:147)

   at org.eclipse.cdt.dsf.gdb.launching.GdbLaunchDelegate.launchDebugger(GdbLaunchDelegate.java:106)

   at org.eclipse.cdt.dsf.gdb.launching.GdbLaunchDelegate.launch(GdbLaunchDelegate.java:94)

   at org.eclipse.debug.internal.core.LaunchConfiguration.launch(LaunchConfiguration.java:860)

   at org.eclipse.debug.internal.core.LaunchConfiguration.launch(LaunchConfiguration.java:719)

   at org.eclipse.debug.internal.ui.DebugUIPlugin.buildAndLaunch(DebugUIPlugin.java:1017)

   at org.eclipse.debug.internal.ui.DebugUIPlugin$2.run(DebugUIPlugin.java:1220)

   at org.eclipse.core.internal.jobs.Worker.run(Worker.java:63)

Thanks

RMcCa
Senior II

I get errors like that when the debugger isn't connected and i try to start it. Usually saying 'Doh!' and plugging the debugger into the target board and turning it on fixes everything.​

Mike Hill
Associate II

That's definitely not my problem. It has something to do with the new installation of the IDE. My old Atollic version still works just fine.

MikeDB
Lead

As the original creator of this thread, and just for the record, after six months I still haven't solved this problem. Compilation works but debugging in CubeIDE just doesn't ... at least on my system.

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".

For me it is "C:\Program Files (x86)\GNU Tools Arm Embedded\7 2018-q2-update\bin\arm-none-eabi-gdb.exe"

You are correct, but I think the underlying issue is that Atollic installed gdb.exe and STM32CubeIDE does not. At least not for me. I have searched the install path and I can't find it. I assumed it would install everything that was needed just like Atollic did.

KModi.1074
Associate II

I think @Community member​ 's problem is solved, can you check if you are also facing the same issue?

Mike Hill
Associate II

Actually it did not fix my problem. I pointed to gdb.exe from a previous installation and it gave me different errors. The gdb.exe is supposed to be installed with the IDE and for some reason on my machine it is not getting installed.