cancel
Showing results for 
Search instead for 
Did you mean: 

Is there anyway to customize the sub-project path during code generations?

karenCB
Visitor

Hi,

 

Is there anyway to generate codes in such way that we can customize our sub-project paths? E.g. Instead of having project/core/src, we have project/src... etc? Thanks in advance!

1 ACCEPTED SOLUTION

Accepted Solutions
TDK
Super User

After you generate code, it is locked and can no longer be changed to avoid user code and other files being deleted unintentionally.

To change it, do a Save As on the IOC and it will be available again or manually edit the IOC file. Back up your files first--switching mid-project is not a supported use case.

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

View solution in original post

4 REPLIES 4
TDK
Super User

Nope. The structure is different based on the chip and some other stuff, but it's not flexible.

Options:

  • (recommended) live with what CubeMX generated as-is.
  • add post-generation script to rename. If you use user code, you'll have to un-rename in a pre-generation script.
  • at some point in the project, don't use "Generate Code" functionality any more and make changes manually.
If you feel a post has answered your question, please click "Accept as Solution".
TDK
Super User

You can change the Application Structure between Advanced and Basic which changes how paths are set up. That is the only knob available.

TDK_0-1764631201742.png

 

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

Hi @TDK,

 

Do you know how I can toggle between "Advanced" and "Basic" application structure? In my CubeMX, that option is unhigh-lighted and I can't change from "Advanced" to "Basic".

 

 

TDK
Super User

After you generate code, it is locked and can no longer be changed to avoid user code and other files being deleted unintentionally.

To change it, do a Save As on the IOC and it will be available again or manually edit the IOC file. Back up your files first--switching mid-project is not a supported use case.

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