Skip to main content
RSoen.1
Associate III
December 16, 2020
Question

Cloning STM32CubeIDE project to new micro

I have an existing project that I would like to port to another device, from the STM32L073 to the STM32L053. I have tried various methods without success. The methods I find don't seem to apply. The project uses an ioc file.

Thank you

This topic has been closed for replies.

6 replies

ST Technical Moderator
December 17, 2020

Hello @RSoen.1​ ,

I recommend you to follow the instructions in the UM1718 to import your CubeMx project to another MCU (sections "Import Project window" and "Switching to another MCU")

Hope this helps you.

Please mark my answer as best by clicking on the "Select as Best" button if it fully solved your issue. This will help other users find this solution more quickly.

Imen

In order to give better visibility on the answered topics, please click on 'Best answer' on the reply which solved your issue or answered your question. Thanks
RSoen.1
RSoen.1Author
Associate III
December 17, 2020

Imen,

I am using the STM32CubeIDE (Mac) not the STM32CubeMX.

There is is no File->Import project option.

Associate
December 18, 2020

Hi @RSoen.1​ ,

I've had the displeasure doing this twice in the last week to port an existing project to two new targets. I can definitely tell you that you can't blindly file copy-paste and tweak the .project and .cproject files as the .cproject file has a bunch of guid-like values, which link things together. So when you add the new file copy-pasted projects into the existing workspace and try change any of the new projects options, it changes the original project options simultaneously (due to these 'guids' I guess?).

Our CubeIDE projects are 'customised' to use CMake so there wasn't too much ceremony required in just creating the new projects from scratch as we don't use the .ioc or any of the generated src, inc, folders at all.

From my experience, I would follow something similar to what @Imen DAHMEN​ suggests, and create a new ST project by from the current projects .ioc file, then either copy/paste all the source files into the new project location, or use Eclipse folder links to point back to the original projects code - see this for some ideas: https://mcuoneclipse.com/2014/08/15/link-to-files-and-folders-in-eclipse .

 0693W000006GHQXQA4.pngMatthew.

Pavel A.
December 18, 2020

@Community member​  Could you share more details how you use CMake with CubeIDE?

-- pa

Associate
December 18, 2020

Hi @Pavel A.​ ,

It's been on my list for while to document what I do, so I created a new post to help anyone wanting to try use CMake in CubeIDE:

ST forums > STM32CubeIDE CMake integration

Sorry about the formatting, but copy-pasting from OneNote and the limited formatting in the forum don't make for decent layout!

RSoen.1
RSoen.1Author
Associate III
January 2, 2021

Wow, such a late response, I apologize. Thank you both @Pavel A.​  and @Community member​ . It is looking like the L073 and L053 are not pin-pin (sub-functions) compatible so I am not being required to pursue a dual part solution.

I appreciate the help, thank you.

Rich