2024-08-26 08:35 PM - last edited on 2024-08-30 02:30 AM by SofLit
Hi. I am using NUCLE-F439ZI board
STM32CubeIDE Version: 1.16.0
Build: 21983_20240628_1741 (UTC)
Lately I am experiencing problem, when I make changes in .IOC file and save and generate code
it is messing my main.c file. It is copying big portion of main.c lines and adding them again in main.c file.
It is impossible to continue working. Is this a setting problem or a bug in the software?
Please help.
Thank you.
Rasem
Solved! Go to Solution.
2024-09-02 07:14 PM
This really shouldn't be this difficult.
> I am attaching good main.c which builds without errors.
The main.c file you have attached contains many "/* USER CODE" texts within USER CODE blocks.
It also includes several duplicate definitions, including two of main() where the first one is unfinished. It definitely does not compile.
Perhaps edit your file so "USER CODE" is not used anywhere within the user code sections.
When I edit your file to correct the above errors, it compiles. If I edit the IOC and regenerate code, it does not duplicate sections.
2024-09-02 07:45 PM
Thank you TDK. Perfect solution. Everything is fine now.