cancel
Showing results for 
Search instead for 
Did you mean: 

Generating code deletes custom "Source Location" in "Paths and Symbols"

jkercher
Associate II

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.

9 REPLIES 9
jkercher
Associate II

Edit: We are building for STM32WLE5 in case that matters.

Lol.  I found the edit button, but there is no delete button =]

TDK
Guru

Works fine here. Win11, updated.

Add new folder. Generate code. Folder still listed.

TDK_0-1740694646133.png

 

Sure you're in the same configuration you added it to? Generate code doesn't touch the file that this information is stored in.

If you feel a post has answered your question, please click "Accept as Solution".
jkercher
Associate II

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?

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:

before.png

AFTER:

after.png

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. 

Untitled.png

 

Pavel A.
Evangelist III

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.

 

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. 

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.

 

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.