How can I avoid to open main.c file after code generation ?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2023-01-20 8: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.
- Labels:
-
STM32Cube MCU Packages
-
STM32CubeIDE
Accepted Solutions
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2023-01-20 8:37 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2023-01-20 8:37 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2023-01-20 8:42 AM
Thanks!!!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎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.
Click "Accept as Solution" if a reply solved your problem. If no solution was posted please answer with your own.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎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.
