2024-08-29 01:09 AM
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
Solved! Go to Solution.
2024-08-29 08:40 PM - edited 2024-08-29 08:41 PM
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.
2024-08-29 01:53 AM
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!
2024-08-29 04:06 AM
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?
Thanks,
Neelesh
2024-08-29 08:39 AM
Which processor? Can you please attach the project you have imported. Please attach the details....
2024-08-29 12:30 PM
2024-08-29 05:42 PM
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.
2024-08-29 08:40 PM - edited 2024-08-29 08:41 PM
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.
2024-08-30 06:26 AM
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?
2024-08-30 08:24 AM
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.
2024-08-30 01:45 PM
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.