cancel
Showing results for 
Search instead for 
Did you mean: 

Making a REAL copy of an STM32CubeMX project

kevin2399
Associate III
Posted on May 05, 2016 at 15:28

I would like to make a copy of an existing Stm32CubeMX project and save it under a different project name.  I am trying to upgrade to the latest TrueStudio and want to keep my current project associated with the older version so I have something to go back to if I run into problems (which I am).  I tried the Save Project As... option, but all that did is save the STM32CubeMX file under a different folder. Not helpful at all, because my cube project has user code added all over the place, as well as additional files and folders.

 I would like to retain the entire project structure, TrueStudio project info, etc.

Since there is apparently not a way to make a copy of the project within the cube environment, what must I do to manually make a copy that will work (beyond copying the folder tree and changing file names to match the new project name.  Are there files that need to be edited as well? 
3 REPLIES 3
childresss
Associate II
Posted on May 10, 2016 at 04:20

I have the same question. CubeMX targeting IAR.

kevin2399
Associate III
Posted on May 12, 2016 at 15:47

I ended up copying the entire folder tree and then going into the project files and changing the name of the project everywhere I could find it to match the folder name I made.  Also had to change the name of any files that contained the old project name, as well as the folder name generated by your Tool's code generator.  Look at the mxproject file, the STM32CUBEmx file, the .project and the .cproject files.

It was really painful.  IMO, the CubeMX project should be considered to be the ENTIRE project, including everything generated by the code generator.

In hindsight, maybe an easier way to do it is to regenerate code using the 'Saved As' project, then copy the Drivers, Inc, Src, Middlewares, and TrueStudio (or in your case EWARM) folders from the original project over the generated ones for the new project, then change the folder name under your tool's folder. I think that might do it as well.

From: childress.steve

Posted: Tuesday, May 10, 2016 4:20 AM

Subject: Making a REAL copy of an STM32CubeMX project

I have the same question. CubeMX targeting IAR.

stm32cube-t
Senior III
Posted on October 07, 2016 at 17:52

Hello,

You have to use the menu ''save project as'', change the project name and re-generate the project. Otherwise only the directory and .ioc file see their name changed.

Best regards