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

KlausF01
Associate II
February 21, 2020

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
MikeDBAuthor
Senior II
February 21, 2020

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 ?

mattias norlander
ST Employee
February 24, 2020

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.

MikeDB
MikeDBAuthor
Senior II
February 24, 2020

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

Glados
Visitor II
February 23, 2020

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

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

AGal
Explorer
February 25, 2020

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
Visitor II
April 23, 2020

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

I restored it, and it started to work.

GAndr.1
Visitor II
October 11, 2020

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
Visitor II
January 26, 2021

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
Visitor II
April 8, 2021

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
Visitor II
September 5, 2021

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

Visitor II
September 17, 2023

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.