cancel
Showing results for 
Search instead for 
Did you mean: 

Cloning STM32CubeIDE project to new micro

RSoen.1
Associate II

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

6 REPLIES 6
Imen.D
ST Employee

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

When your question is answered, please close this topic by clicking "Accept as Solution".
Thanks
Imen
RSoen.1
Associate II

Imen,

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

There is is no File->Import project option.

rwx
Associate III

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.
Evangelist III

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

-- pa

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
Associate II

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