cancel
Showing results for 
Search instead for 
Did you mean: 

Issue when clone the project in STM32CubeIDE

KKane
Associate II

Dear Sirs,

I copy and pasted to clone the project in project explorer window of STM32CubeIDE.

And some cases "Src" folder is automatically deleted from original project folder.😅

Does anyone faced similar issue ? and how can I clone the project safely in STM32CubeIDE ??

Best regards,

K. Kaneko

22 REPLIES 22
KKane
Associate II

​Many thanks everybody, it seem working correctly so far, also to me :D

KKane
Associate II

​Sorry but, if I do the build main.c for copied project, main.c in original project is still deleted... you have same issue ?

Hvan .2
Associate II

Hi Kazu,

I did not have that problem... To check for you I just redid all the steps I took and wrote them down for you. Maybe you find the solution here:

-right clicked on project in STM32CubeIDE Project explorer

-I chose copy and pasted the project on desktop

-renamed the project folder

-opened the project folder and edited the .project file with Notepad++

-changed the <name> old name <name> section to <name> new name <name>

-I went back to STM32CubeIDE, right clicked on an empty part of Project Explorer and chose Import

-in the import dialog box I chose 'Existing Projects into Workspace'. Then clicked Next.

-in the Root Directory section I browsed to the copied folder on my desktop. Then clicked Finish

-right clicked on empty part of Project Explorer and chose Refresh (just for certainty's

sake (doesn't appear necessary as the project name was visible straight away))

-right clicked on the copied project folder and clicked Clean. Console displayed: make -j4 clean, 

rm -rf * and then finished

-all of the files (Core: Inc, Src, Startup) were present and I could build the project correctly with no

errors or warnings

-I could debug the project correctly. After stopping the debug there was no cross-linkage of the

startup .s file like I had before. So seeing all this Pavel's method appears to work perfectly!

I hope this helps Kazu!

Heiko

KKane
Associate II

​Hello Heiko,

Many thanks for your whole procedure.

I followed step by step, but in the end when I modify .ioc file in CubeMX view and save/generate code in copied new project, main.c file still deleted from original project folder...

I'm using STM32CubeIDE  1.2.0 and installed DevStyle dark view and may be some side effect by such add-ons.

I will try to newly install CubeIDE into another PC and check if situation changes.

Best Regards !

Kazu

Hvan .2
Associate II

Hi Kazu!

I had time to look at what you reported. You are right!

I noticed in my copied project that the .ioc and .launch file still had the old name.

I renamed them just to be sure and then opened the cubeMX file. I added one GPIO

out pin and saved/recompiled the CubeMX.

The Src and FATfs folders of the originator project were completely erased. There remains

a serious bug despite the partial fix that Pavel reported.

Does anyone know how to formally report this with ST?

Heiko

Repeated generation in CubeMX is a separate issue, lets not mix them.

If we want the software to be cheap, even free - have to make concessions...

-- pa

KKane
Associate II

Everytime setting again CubeMX .ioc manually to clone project is really painful...D:

And this issue never happend in True Studio...

gfe
Associate

renaming all references in .project, .cproject and .mxproject is still painful, but works for me and allows subsequent MX runs without deleting sources from the original project

inotec
Associate III

I make 2 copies of the original folder. I use the first copy for the clone. When, as described above, the src is deleted from the original I delete the original and rename the 2nd copy back.

abbb.12
Associate II

I had the same experience,and find why this happen

�?CubeIDE】Why delete my Src folder ?Why haven't you fix it for so long?