cancel
Showing results for 
Search instead for 
Did you mean: 

What is the best technic to clone stm32CUBE project? I tried by suggested change of .cproject file, but it didn't work. ======================================================== Finally found reliable way to do it in a few steps described below.

SShva.2
Associate

After I tried to clone in suggested 3 steps, one of which was to modify new project name in project.c file I got the same name of .ioc file and error in .s startup file?

Sorry, I was wrong, according to suggesting I should edit with the new name

.project file not .cproject.

After I corrected my mistake and edited .project file I still got old name in .ioc

file which didn't work in new project.

========================================================

Steps to Clone STM32CUBE projects.

  1. Open STM32CubeMX, in Home tab find your project which needs to be cloned and click on it. As result you are getting your current project in STM32CubeMX environment.
  2. In the File menu select Save Project As and will get dialog box in which can create new directory for a new project and then click SAVE button.
  3. Click GENERATE CODE button on the top right of the STM32CubeMX environment.
  4. On the message box, which popped up after code generation finished click Open project button and you will get your cloned project with new name and new .ioc file.

4 REPLIES 4
Cartu38 OpenDev
Lead II

If STM32CubeIDE even more obvious let's rely too on File > New > STM32 Project from an existing STM32CubeMX configuration file (.ioc)

Result should be same. Then I would not call such as a clone procedure. All such is cloning project basis (device configuration, project structure, part of setup) but lacking end user code and end user setups if some. Not a big deal I agree to perform some copy paste to complete cloning work then.

All such can be useful.

Andrew Neil
Evangelist III

The Project Explorer has 'Copy' and 'Paste' - that can be used to duplicate a project...

Pavel A.
Evangelist III

> After I corrected my mistake and edited .project file I still got old name in .ioc

Well so edit the .ioc too. Not all CubeIDE projects are based on .ioc.

The Eclipse part of CubeIDE is not aware of the .ioc file after generation of the project.

-- pa

warm38
Associate III

I was happy to see this topic, but it was short lived. What if you want to clone one of the examples or demos? Few, if any, of which have even have .ioc files. Then you will have problems. In that case it is a matter of copying the individual files. You can copy the project, but you can't paste it, and you absolutely cannot "Save As", according to my version 1.5.1. It sure would have saved me a lot of copy/paste time.