Skip to main content
CGrov.1
Associate III
February 2, 2021
Question

IDE not generating .elf file, Program file does not exist

  • February 2, 2021
  • 4 replies
  • 20077 views

I have a project that compiles with no errors, but when I try to debug I get an error:

"Program Filed does not exist"

With details:

Program file does not exist

C:\HDRlowerMicro\HDRlowerMicro\Debug\HDRlowerMicro.elf not found

C:\HDRlowerMicro\HDRlowerMicro\Debug\HDRlowerMicro.elf not found

C:\HDRlowerMicro\HDRlowerMicro\Debug\HDRlowerMicro.elf not found

When I check the directory there is no .elf files being created. I tried cleaning the project and playing with the debugger settings, but no luck. How do I tell the IDE to generate a .elf file or check where it is being saved?

4 replies

KnarfB
Super User
February 5, 2021

You can check in the Project Explorer view where the binaries were generated. If you open Dubgu Configurations... in the "main" tab you can Search Project...

When you press the bug icon for debugging, make sure that the project is selected in the Project Explorer view.

Cartu38 OpenDev
Graduate II
February 5, 2021

.elf file generation and location is promoted as part of build console log

0693W000007EBkBQAW.jpgFirst build your project. Wait for completion then create a brand new debug configuration ... STM32CubeIDE should found .elf file by itself

LHyun.1
Visitor II
November 22, 2021

Thank you, @KnarfB​ . I also selected the project but didn't select the C/C++ application by using Search Project button right bellow the Project selection.

After the select the C/C++ application, it works very well.

Thanks again and have a good day~

JLope.11
Associate III
February 25, 2025

It happened to me also.
I removed the Debug folder and made Project->clean, then you can build and run.

 

Here are steps to copy and rename project:

To copy an STM32CubeIDE project:

1. Make sure the new name does not exist in the workspace, if it does, then

delete it inside the IDE. Make sure old project is error free.

2. Copy the folder in explorer

3. Rename the folder in explorer

4. Edit .project using vi or other text editor and rename

<name>OLD_PROJECT_NAME</name> to <name>NEW_PROJECT_NAME</name>

in line 3

5. Edit .cproject

Change all references from OLD_PROJECT_NAME to NEW_PROJECT_NAME

6. Start IDE by clicking on .project

Also you can use import