cancel
Showing results for 
Search instead for 
Did you mean: 

Bug: STM32CubeIDE deleted all my source code (generate code on imported project)

I imported a project into STM32CubeIDE (from Atollic).

The Release configuration was deleted (bug), but otherwise the project looked OK.

Double-clicked on project's IOC file to start CubeMX (bug, IDE doesn't find this and otherwise CubeMX perspective comes up blank).

IOC was converted to latest version without any errors.

BUG: Generate Code wiped out all of my sources in the imported project!

Yikes.

Is there a stable release coming any time soon?

Meanwhile we'll need to stick with Atollic.

Thanks,

Best Regards, Dave

23 REPLIES 23
Edimahler
Associate III

Just uninstalled the software again after having read this thread, I don't want to risk my files using an immature software tool...

I found this forum and thread because of several compiling failures I've never seen before with STM32CubeIDE. I had no chance to get my firmware, which compiled without any problems before in Atollic Studio, to work. And my previous installation of Atollic crashed after pugging out ST-Link and I could never start it again...

Is there a place to download the original Atollic Studio again for a re-install? Thanks for a link in advance!

EDIT: On the Atollic website, there are only "old" versions available (9.3.0 is the newest and is dated back to February 2019). Are there only updated versions in STM32CubeIDE available any longer?!

Cartu38 OpenDev
Lead II

Sounds lacking firmware packs at a time may have lead to such behavior pain. Definitively a bug.

Sounds some improvements have been done fixing such issue Thanks STM32CubeIDE V1.1.0 just released on st.com

ecode
Associate II

I use stm32cube ide 1.1.0

Laptop un-charged and shut down. The main.c file was deleted when I opened it. main.c is hollow. I am very sad. It was an important project.

main.c :

0000 0000 0000 0000 0000 0000 0000 0000

0000 0000 0000 0000 0000 0000 0000 0000

0000 0000 0000 0000 0000 0000 0000 0000

0000 0000 0000 0000 0000 0000 0000 0000

0000 0000 0000 0000 0000 0000 0000 0000

......

AUrez.1
Associate II

I use version 1.3.0 and have the same problem.

Lose all my code after minimal changes in .ioc

Cartu38 OpenDev
Lead II

Sounds weird ... nobody else is complaining back about on such forum (was a lot prior 1.2.0 release). Are you loosing full file(s) or some custom code added within genrated file(s) ? If generated file update please takes care about predefined user sections ... your custom code as to be part of to be preserved ...

Please confirm your issue and possibly share your project / .ioc file / snapshots.

AUrez.1
Associate II

Thanks for reply.

To tell the truth, I have already found a reason. That was my mistake during CubeMX settings. Now question is closed for me.

EM.1
Associate II

HELP, PLEASE!!!

I just generated code in STM32Cube 1.3 after changing something in the IO configuration, somehow over 1000 lines of code have been deleted, I have been working on this code for a month now,

Does anyone know how to get back this code? I forgot to add to git....

Why does this happen?

Try right-clicking on the folder(s) in windows and "Restore previous versions"

>>Why does this happen?

Well historically it has been the IOC parser detects some syntax error or anomaly, perhaps due to bug fixes (old file now has unacceptable syntax), and rather than recover gracefully it fails hard. As I recall sometimes this had a poorly worded or ambiguous popup giving you a 50/50 chance, or worse, of destroying the project. ie About to erase current project, would you like fries with that? Yes/No

In more conservative auto-gen tools, you'd archive prior content rather than unlink or create-new over the current live project files. At the very least backup any files with user generated content. In a well considered implementation, you'd provide a means to diff/merge, or recover things from the journal of changed project files, and pin/peripherals settings.

How this stuff gets written and tested troubles me.

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
Cartu38 OpenDev
Lead II

Try latest 1.4.1 release despite first time issue reported on 1.3.x ....

Takes care your code has to be included within end user code sections. If not code lost is a feature then ...​