cancel
Showing results for 
Search instead for 
Did you mean: 

What is the best way to duplicate a project in a workspace in Stm32CubeIDE?

scottSD
Senior III

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?

10 REPLIES 10
BMcKe.2
Associate II

Duplicating a Project in STMCubeIDE

  1. Go to ProjectClean and clean the project you want to duplicate.
  2. Go to  FileNewSTM32 Project from an Existing STMCubeMX Configuration File .ioc.
  3. Select the .ioc file from the project folder that you want to duplicate.
  4. Type in a name for the new project. Create the new project.
  5. Open the CoreSrcmain.c  in the new project.
  6. Select All and then delete the entire contents of the file.
  7. Open the CoreSrcmain.c  of the original project, Select All the contents and Copy.
  8. Return to the new empty main.c file and Paste the contents of the old file in it.
  9. Save All.

Check that everything works in the new project by doing a Build.