cancel
Showing results for 
Search instead for 
Did you mean: 

STM32CubeMx 6.0.1 code generation wiped out all code and directories.

dhaselwood
Associate II

I did some modifications of several projects without relaunching STM32CubeMX. When I went back to the project that was the main focus everything except the .ioc file had been erased. No directories. No generated code. Nothing but a .ioc file! I restored from my github repo and continued. A week later I discovered that all the other repos in the git organization were in the same condition even though I had not accessed them. Just .ioc files remained.

I am using Ubuntu 16.04.LTS, STM32CubeMX 6.0.1, Sublime editor, gcc, and each project is a git repository in a separate directory under the github organization. Very puzzling. The fact that only .ioc files remained suggests STM32CubeMX had something to do with it. Having more than one repo wiped out indicates that git might be involved. The Sublime editor seems unlikely to be involved.

Less dramatic, I have had other occasions where after doing a code generation STM32CubeMX has to be relaunched to get the gpio pin tab to show up in some of the peripheral configuration boxes. That is a minor irritation, but suggests a re-initialization problem in 'MX after code generation.

A more serious irritation is that I found that when disabling a peripheral (IIRC a timer) it can result in the gpio pin labels that I had added be erased for all the pins, not just the ones associated with the peripheral. Again it appeared to be associated with making changes after doing a code generation and some sort of re-initialization problem in 'MX after code generation. Again not a major problem but something to keep in mind.

Bottom-line: be sure to have a complete backup before making changes to a project, and relaunch STM32CubeMX every time after doing a code generation. (At least for version 6.0.1. I never ran in to this with version 5.)

4 REPLIES 4
Aymen CHAKROUN
ST Employee

Hi @Community member​ ,

Thank your for your post. We [MX team] need a step by step scenario to be able to understand and reproduce your issue.

Can you please give us the exact scenario [as simple as possible] and the ioc file or the all zipped project to try reproduce what you are seeing?

Regards,

Aymen.

Cartu38 OpenDev
Lead II

@Community member​ Which IDE are you using / targeting doing MX code update ?

dhaselwood
Associate II

Aymen,

Unfortunately, I can't give you an exact step by step scenario for file & directory deletions. I should be able to reproduce the more minor problems of the gpio tab going missing, and the gpio names all being erased. I think in all cases the problem arose after doing a generate code, then going back and making changes in 'MX without ever exiting/rebooting 'MX.

I think the project where the deletion was experienced was out on github GliderWinchItems/drum repository, under the branch realfaux. The project has moved ahead since then, and I don't have the exact date of the problem, so the .ioc file at the time is not certain.

Cartu38,

I don't use an IDE. The editor I was using was Sublime and it was open at the time.

Ok about IDE so let me ask another way: which is your target toolchain selection (STM32CubeIDE, MDK-ARM, EWARM, Makefile, ...) asking for code generation within STM32CubeMX ?

As addon what's your target device ?

Thanks.