2023-01-20 08:33 AM
Hi!
In stm32cubeIde, when I press code generation, automatically after the main.c file is opened. I would like to know how deactivate this option if it is possible.
I have many main.c files in other projects folders that are excluded from compilation but all are opened after code generation and it is a bit annoying
Thanks!!
Solved! Go to Solution.
2023-01-20 08:37 AM
2023-01-20 08:37 AM
2023-01-20 08:42 AM
Thanks!!!
2023-01-20 12:56 PM
Another way is to install STM32CubeMX. I personally find it easier to use a separate tool instead of the build-in one. But that's my preference.
2024-07-11 11:36 AM
Clearing the "Do switch to C/C++ perspective" options indeed seems to stop the unwanted behavior. However, it also stops wanted behavior. I do want to automatically switch back to C/C++ perspective after IOC generates code. I don't want it to recurse the entire project folder and open every single "main.c" it finds (there are 30+ in my project, thanks to tinyusb's examples folder).
Suggested new options:
[ ] Do switch to C/C++ perspective on code generation - this ONLY switches back to C/C++ perspective and DOES NOT open any files (ideally moving focus back to the last file I was editing)
[ ] Open modified source files - This opens any modified .c source files ONLY under "Core/Src" (for typical project layout).
It's senseless in all cases to open files the code generator didn't touch.
BUG: After modifying these settings, the default behavior of asking if I want to generate code when saving the .ioc went away, and I can't seem to get it back.