2020-08-12 10:44 PM
Hello,
I'm using STM32CubeIDE to write code for STM32F103C board. Comming back to work on a project that was closed, first main.c file dissapeared. I tried different operations files dissapering one by one, but eventually when I generate code all my files are gone and CubeIDE generate complete new main.c and other files in the SRC folder (see picture - .H files are still there but the .C files not).
Strange thing is, when I open CubeIDE it is like is in the debug mode (see second picture ).
I hope they are just moved somewhere. My backup project is old and there was a lot of code.
Am I doing something wrong? Do we know conditions for this behavior of the CubeIDE interface?
Thanks,
2020-08-13 12:59 AM
Please try and see if there is a local history of the <main.c> file in STM32CubeIDE.
To view history of the file. Select the <main.c> file in the Project explorer view, and right click on it. Then select "Team"->"Show local history"
2020-08-13 02:14 AM
I was lucky I found I actually had a resonable good backup of the project.
Still I would really like to understand what triggered this behavior of the interface?
2020-08-13 02:25 AM
That's good you had a manual backup! Could you please also check if there the history in STM32CubeIDE keeps some old versions of files.
Regarding the reason why the files seemed to be removed I do not know but there has been some issues with CubeMX in STM32CubeIDE which overwrites old files when new files are generated. This is under investigation.
In your case the files seemed to be already removed when you opened the project without generating new files with MX. Is this correct analyze on my side?
You mentioned that the it looked as the IDE was in debug mode when opening the project. Do you know if the C/C++ perspective was opened or was it the Debug perspective?
2020-08-13 06:55 AM
Can you please let us know which version of CubeIDE you are using? 1.2.x? 1.3.x? 1.4.0? 1.4.1?
2020-08-13 09:24 AM
Windows might also get copied use Right Click -> Restore previous versions
CubeMX/IDE tools have a systemic issue related to .IOC parsing and errors (bugs removed, but old syntax now unacceptable) related to changing tool versions, and file/folder destruction. We've seen numerous reports of this, so it's not something I attribute to user error, but rather the constant push to newer versions, and poor handling of legacy project files, transition, and failure/error recovery.
2020-08-14 09:28 AM
To answer some questions..