Mbed with STM32CubeIDE Duplicating a project

Now that you have created an Mbed project in the IDE, you may want to make a duplicate of the project.
In this article, I will explain how to do that.

The title of this article is “Mbed with STM32CubeIDE: Duplicating a project”, but of course you can duplicate any project except Mbed.

Changing the project name

First, back up the files in the F401mbedBase project folder.
Next, start the IDE and in the Project Explorer, right click on the project name and select Rename to rename it.

In the same Project Explorer, right-click on the F401mbedBase.ioc file and select Rename to rename it.

The following is the development environment at the time of submission.

PC: Windows 10 OS
IDE: STM32CubeIDE Version1.1.0
Configurator: STM32CubeMX Version5.4.0
Board: STM32Nucleo-F401RE

Change the path name

In the Project Explorer, click on the project name to select it, and then select Project – Properties.

Select the Includes tab under C/C++ General – Paths and Symbosl and change the pathname for Language GNU C and C++.

Change the F401mbedBase part to the changed xxxxx.

(Note: You need to change this for both GNU C and C++.

After the changes are done, build the program.

(Note: You need to change the path name for both GNU C and C++.

For those who think “Can’t we do something about it?”, I’ll introduce a secret technique.

Quit the IDE and open the .project file in your project folder with a text editor.

Use the search function of the editor to find the path name you want to change, for example “F401mbedBase”.

You will find workspace_loc:/ followed by F401mbedBase, so change all of them to the path name you want to change and save the file.

Note that there are still two parts that need to be modified for C and C++.

(Note: This method involves editing the project file, so be careful not to touch anything else.

Start the IDE, go to Project – Properties – C/C++ General – Paths and Symbosl, select the Includes tab, and make sure that the path names for Language GNU C and C++ have been changed.

Leave a Reply