Is that possible to enable/disable editing the generated code with CubeMx
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2024-09-13 7:07 AM - last edited on ‎2024-09-13 7:35 AM by mƎALLEm
Hi,
is any possibility to protect editing code generated with in STM32Cube. I sometimes made some mistake and change the generated code. It would by good, if it is in STMCube some toggle button, that I can enable disable editing the the code generated with STMCube. The user code would be editable every time.
The best solution would be if the not editable text code will be sad or grey.
Solved! Go to Solution.
- Labels:
-
STM32CubeMX
Accepted Solutions
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2024-09-13 7:40 AM
Hello,
There is no feature to lock the code generated by CubeMx.
Only "don't generate main.c" (from Project manager) and "don't generate function call" (from Advanced Settings) are available.
Meanwhile, for this:
@Scipio wrote:
I sometimes made some mistake and change the generated code.
I suggest to use one of the versioning tool like git/github to keep traces of your modification and be able to revert to a previous version.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2024-09-13 7:40 AM
Hello,
There is no feature to lock the code generated by CubeMx.
Only "don't generate main.c" (from Project manager) and "don't generate function call" (from Advanced Settings) are available.
Meanwhile, for this:
@Scipio wrote:
I sometimes made some mistake and change the generated code.
I suggest to use one of the versioning tool like git/github to keep traces of your modification and be able to revert to a previous version.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2024-09-13 8:44 AM
STM32CubeIDE doesn’t offer a direct "toggle read-only" feature for generated code sections. You can use external text editors like Visual Studio Code with specific plugins that allow locking parts of the code or syntax highlighting that dims auto-generated code.
