cancel
Showing results for 
Search instead for 
Did you mean: 

STM32CubeIDE - Code layout of main.c always gets garbled when saving project.ioc file

chriskuku
Senior II

Is there a way to "heal" or tidy up the layout of main.c? A tool or button that can rearrange User code and while code sections? Recently every save of the project's .ioc file results in a closing brace "}" getting deleted in the main.c file. Has the "User Code begin while/end while" to be outside of the while loop or inside? And begin user code 3/end user code 3 outside of the main.c body or inside?

3 REPLIES 3
AScha.3
Chief III

0693W00000WJZKWQA5.png

If you feel a post has answered your question, please click "Accept as Solution".
chriskuku
Senior II

Thanks. But your example would help better, if it only had one while loop. This way it is doubly confusing.

AScha.3
Chief III

ok, so just make a new project in your IDE, name test_1 , make a clocktree without errors (maybe auto is doing it), generate code.

then you see a 100% new and empty code as yor reference. (needs about 5 mins. )

+

 When your question is answered, please close this topic by choosing Select as Best.

If you feel a post has answered your question, please click "Accept as Solution".