cancel
Showing results for 
Search instead for 
Did you mean: 

renaming projects with SW4STM32

Dave Jones
Associate III
Posted on March 05, 2017 at 19:48

I asked in their forums, but got no reply. Is there a recommended method for renaming a project in System Workbench (SW4STM32)? I tried just right clicking on the project name in Project Explorer and selecting 'Rename'. But that seemed to break links to files in the project.

All of the projects in the STM32L4 firmware package all have the same project name, so I want to rename some of them so I can add more than one of them to the same workspace. I also need to be able to rename projects so I can easily make branches and derivative projects.

2 REPLIES 2
Dave Jones
Associate III
Posted on March 07, 2017 at 22:35

I don't know if this is the right way or not, but this is what I did:

1 - delete the project from the workspace

2 - rename the project folder

3 - edit the .project and .cproject files in a text editor and change all references to the name

4 - delete the debug folder ( I haven't done any projects with a release configuration, but assume other configs have a folder like the debug one that also need to be deleted)

5 - import the project back into the workspace

Diego Ballen
Associate II
Posted on August 15, 2017 at 15:35

Hello everyone,

I tried the following steps to succesfuly rename a project:

1.    Copy and paste the folder with the project in the desired location.

2.    Change the name of the folder to the new name of the project (optional).

3.    Delete the folders “Debugâ€� and “Releaseâ€� if they exist inside the project folder.

4.    If you are using Cube rename the Cube File (.ioc) to the new name of the project. This is highly important. Otherwise cube will not be able to modify the new project.

5.    Rename the CFG File which has the format “ProjectName Runâ€�. Only replace the “ProjectNameâ€� with the new name. Keep the space character between both words.

6.    Open the CPROJECT-File (usually has not a name assigned) with a text editor. Replace all instances of the old name of the project with the new name. Save and close the file.

7.    Open the PROJECT-File (usually has not a name assigned) with a text editor. Replace all instances of the old name of the project with the new name. Save and close the file.

8.    Open the project and compile it.

9.    Flash the microcontroller.

10.    If any error appears try by making a full build of the project: right click to the name of the project in the project explorer, then “Build Configurationsâ€� and finally “Build Allâ€�. Try flashing again.

It worked for me. I hope for you too!

Best regards,

Diego Ballen