Skip to main content
chriskuku
Senior II
November 27, 2022
Question

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

  • November 27, 2022
  • 3 replies
  • 904 views

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
November 27, 2022

0693W00000WJZKWQA5.png

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

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

AScha.3
Super User
November 27, 2022

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""."