cancel
Showing results for 
Search instead for 
Did you mean: 

IDE not generating .elf file while importing project

NeeleshYadav
Associate II

Dear,

I am facing a problem while importing a project (that is built from another computer) to a new system, IDE is not generating .elf in the debug folder. While compiling is also warning about the same. Suppose I take a .elf from the old system and paste it in the new system (in the debug folder) and provide the path through settings in the debug configuration. In that case, the project is getting built and running with original parameters such as some variables, etc.

The issue here is that

1. if change the value of used variables and build the project, it always starts with old variable values.

for example:

Variable is Idc = 10; // set in old system

and I change it to I dc = 5;

but after building the project it always starts with

Idc = 10;

 

2. Another issue is ADCs are also not affecting by changing any value.

3. Breakpoints are also not working.

 

Kindly help me in this regard

 

Thanks

Neelesh

 

 

 

1 ACCEPTED SOLUTION

Accepted Solutions

Basically what's needed for the project is the files where there is logic code exists. If you can identify all relevant c files, group them. Identify the header files.  You van create a new project in the new machine and generate a project as usual. Copy all relevant c files,  leave the autogenerated files and the ioc file. Re open.  Then follow the instructions to migrate the ioc versions. 

 

Another experiment I have done once was to create a zip file. Copy it into the other computer. Unzip, open the proj file. It will ask if you like to migrate, say yes and follow instructions. 

If you feel a post has answered your question, please click "Accept as Solution".

View solution in original post

12 REPLIES 12
Metyus
Associate II

Hello Neelesh,

Importing mechanism is imperfect and has some flaws, quite a failproof option is to upload the project to some repository and then pull from it, this way everything is preserved, unless this project directory was inside some /user related folder with a specific name.

 

Also .elf breaks whenever either folder was renamed or project inside Cube, without ticking option to "Update all references" this leaves former .elf file with an old name and breaks it.

 

Regarding the import of the project I recommend deleting previously generated Debug and Release folders.

 

Hopefully that helps! 

Dear Metyus,

Thank you for the help, I tried what you suggested. I got an error which I attached long with this reply. Can you help me in this regard?

 

Screenshot 2024-08-29 140321.jpg

Thanks,

Neelesh

Techn
Senior III

Which processor? Can you please attach the project you have imported.  Please attach the details....

If you feel a post has answered your question, please click "Accept as Solution".
NeeleshYadav
Associate II

Hi,

I m using the STM32 as shown in the attached figure. While importing this also comes. Is it necessary to share the project file? Let me know if is it so, I ll try to share the project file as well.

 

Thanks 

 

  

Screenshot 2024-08-29 222559.jpg

Screenshot 2024-08-29 221434.jpg

  

Pavel A.
Evangelist III

From your description it looks like the project fails to (re)build after move to another computer. This is why changes in the source don't propagate to the binary. It simply does not build.

Suggested to use best known methods to move a project to other computer (unless the other computer is exact clone of virtual machine, or like this): Do not copy workspace "metadata" to other machine, create a new workspace folder and import the project. Better do not copy the project metadata as well, let eclipse to re-create it. Refresh (F5) and rebuild completely.

 

Basically what's needed for the project is the files where there is logic code exists. If you can identify all relevant c files, group them. Identify the header files.  You van create a new project in the new machine and generate a project as usual. Copy all relevant c files,  leave the autogenerated files and the ioc file. Re open.  Then follow the instructions to migrate the ioc versions. 

 

Another experiment I have done once was to create a zip file. Copy it into the other computer. Unzip, open the proj file. It will ask if you like to migrate, say yes and follow instructions. 

If you feel a post has answered your question, please click "Accept as Solution".

Hi,

 

Thank you for helping.

 I tried as you suggested and this time binaries and .elf files were generated. 

But I have another issue now. can you give me any suggestions?

 

Screenshot 2024-08-30 162301.jpg

If it works,  please accept it as solution so that it will be useful to others. 

Regarding your issue,  are you able to program the devices? Make sure that you enable the debug pins in the cubeMx.

 

 

 

 

 

If you feel a post has answered your question, please click "Accept as Solution".

Another issue? is there a debug or run configuration (.launch file) copied from other machine? Delete all these .launch files and create new debug or run configurations.