2020-03-20 07:28 AM
Using Stm32CubeIDE 1.3.0...
When I Copy and Paste a project in the Project Explorer (and name differently), it does copy the project. I also renamed the CubeMX IOC file to match the new project name. Then I did a Clean and a new Build.
However, when I go to Debug, I get a number.
To verify that the new project is using the new project paths I do a "Close" on the first project, then rename the old project in Windows Explorer.
Builds fine, but when debugging it is complains that it can't find source files.
It is still looking for the source files in the original project.... I changed the source lookup path in the Debug Configurations > Source to look in this project, and it still cannot find the files.
And when checking if there are any files in the new project's Debug folders, they are indeed empty.
Does anyone have an idea how to fix this?
Solved! Go to Solution.
2020-03-20 02:39 PM
I did get this to work following the following steps:
1) Edit > Copy.
2) Edit > Paste.
3) Rename the ioc files.
4) Delete the Debug.launch file.
5) Project > Clean.
6) Generate the CubeMX.
7) Project > Build Project.
8) Debug As Stm32 Application.
9) And debug the application.
2020-03-20 02:21 PM
IMHO the quickest, most reliable procedure to fix such errors is :
* close the project
* delete it in eclipse (this will only remove the project from workspace and purge the accumulated debris)
* import it again into the workspace
* Refresh, clean, rebuild index
* build
-- pa
2020-03-20 02:39 PM
I did get this to work following the following steps:
1) Edit > Copy.
2) Edit > Paste.
3) Rename the ioc files.
4) Delete the Debug.launch file.
5) Project > Clean.
6) Generate the CubeMX.
7) Project > Build Project.
8) Debug As Stm32 Application.
9) And debug the application.
2020-03-22 01:26 PM
With Keil, I simply copy and paste project folder. I get something like old_project_copy folder, then I rename only the folder name. Files inside keep their names. When I changed file names too, I got errors.
2020-04-02 11:19 AM
@LMI2 I appreciate the input. I am using Stm32CubeIDE and this post is tagged for it as well.
2021-03-14 10:43 AM
Below cloning works, but I found that in my case it deletes src folder in the old project, so that file needs to be copied back to the old project! Do this by making 2 copies…
1) Copy and paste 2 copies
2) Rename new folder (Copy 2)
In new folder…
3) Rename the ioc files.
4) Delete the Debug.launch file
5) Open IDE project in MXIDE
6) Rename project
7) Project > Clean.
8)Build
9)Open .ioc
10) Generate the CubeMX. THIS will delete src folder in the original folder.
11) So delete the original folder and change name of –Copy folder back to the original name
12 Project > Build Project.
13) Debug and test
2022-09-13 05:32 AM
Remember to have the project in debug configuration set active, otherwise for me it causes missing source files upon trying to debug.
2022-09-13 08:09 AM
2023-04-06 06:04 PM
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
7. Import should start automatically.
8. Use your new project and enjoy!
2023-04-07 06:38 AM
Thank you, Rajat!
Very helpful!