cancel
Showing results for 
Search instead for 
Did you mean: 

What is the best way to back up a STM32CubeIDE project?

Not applicable

I usually copy the project folder from the workspace, delete the files from the Debug and Release folder, and compact in zip format.

I noticed that the project cleanup function does not clean both Debug and Release folders at the same time.

And I also noticed that the clean function is not very interesting to always do, because the compilation takes longer, especially if the IDE is still being used.

I'm asking this, because I had backups of 20MB each, which amounted to 1GB, and after cleaning the Debug and Release folders, the files only occupied 150MB.

Due to the files being compressed and using Linux, I was able to clean the Debug and Release folders with this command:

$for i in *;do zip -d "$i" USB_HOST_HID*/Debug/\* USB_HOST_HID*/Release/\*; done

Note: USB_HOST_HID = my project folder

Is there an automatic way to backup the projects?

2 REPLIES 2
Pavel A.
Evangelist III

Version control tools such as git exist specially for this.

If you keep the project in git: open a terminal and type:

git archive --format zip -o [zip_file_name] HEAD

and it will create a nice zip archive for you. Only with files that are checked in, no garbage,

-- pa

Cartu38 OpenDev
Lead II

Most probably Eclipse native File>Export>Archive File is doing job for you.

A​bout clean target ... such is working per active build configuration so no cleaning Debug and Release at once is common Eclipse behavior.