Skip to main content
chriskuku
Senior II
Nov 27, 2022 8:55 AM UTC
Question

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

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?

This topic has been closed for replies.

3 replies

AScha.3
Super User
Nov 27, 2022 12:54 PM UTC

0693W00000WJZKWQA5.png

If you feel a post has answered your question, please click on " Best Answer ".
chriskuku
chriskukuAuthor
Senior II
Nov 27, 2022 3:02 PM UTC

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

AScha.3
Super User
Nov 27, 2022 3:28 PM UTC

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 on " Best Answer ".