2025-02-27 1:48 PM - edited 2025-02-27 1:52 PM
I didn't know where else to post this. I couldn't find a public repo to post an issue.
Generating code wipes out any custom paths in "Source Location." It does not touch any custom paths in the "Includes" tab. (Not sure why Eclipse insists on treating these differently anyway.)
Version: 1.17.0
Build: 23558_20241125_2245 (UTC)
Confirmed on both Linux and Windows.
Edit: We are building for STM32WLE5 in case that matters.
2025-02-27 1:51 PM - edited 2025-02-27 1:52 PM
Edit: We are building for STM32WLE5 in case that matters.
Lol. I found the edit button, but there is no delete button =]
2025-02-27 2:18 PM
Works fine here. Win11, updated.
Add new folder. Generate code. Folder still listed.
Sure you're in the same configuration you added it to? Generate code doesn't touch the file that this information is stored in.
2025-02-28 7:36 AM
I should have maybe provided more context. I'm only adding one source path and it is the root project directory. We are using Windows 10 and Fedora Linux. I will try to create actual reproducible steps, but cube stopped generating code all of the sudden. It says it is generating code. Then, it completes very fast, and no changes are made to the code. It seems like some kind of silent failure. So.. unrelated question: What can cause that to happen? Is there a code generation log I can dig up?
2025-03-03 5:46 AM
Okay... able to reliably reproduce this every time. I didn't do anything other than generate. It may be an issue with using the root project folder as a "Source Location"
BEFORE:
AFTER:
2025-03-23 8:53 AM
Hi @jkercher
I am experiencing the same problem, did you find a solution ?
It deletes the first line whenever I generate code with CubeMX.
Regards.
2025-03-23 11:20 AM
Bug reports are welcome here.
Unfortunately re-generation of a project is still kind of bristle.
The best we can do is tracking changes in version control and revert undesired changes after re-generation. This saves us time and nerve cells.
2025-03-23 12:00 PM - edited 2025-03-23 12:05 PM
Hi @Pavel A. ,
I can handle this manually, but there is another disaster one... I have tried to implement USB HID, but this implementation can not be achieved only changing the code between the USER CODE... sections. So whenever you re-generate the code with CubeMX, all the changes should be made again and again.
2025-03-23 1:07 PM - edited 2025-03-23 1:09 PM
Same method. Review changes after re-generation, revert wrong changes. Be careful.
Thanks to version control tools, reverting whole code blocks takes only one click in compare GUI, you don't have to retype or copy/paste.
2025-03-23 3:21 PM
It seems easy if all CubeMx procedure is completed and only minor changes are required rarely.
But it is a headache during board bring up procedures since HW portions is adding gradually.