cancel
Showing results for 
Search instead for 
Did you mean: 

Overide CubeMX\CubeIDE generated elements

egoltzman
Senior

Hello,

I'm working with CubeMX 6.2 & CubeIDE 1.6.0.

I have several problems with the generated code that I would like to know if I can somehow resolve instead of changing the generated code every time after changing something in the CubeMX project.

This is the list:

  • I have a defined symbol under the CubeIDE GCC Compiler preprocessor settings, for example CONFIG_FILE="xyz_config.h". This setting is override by CubeMX
  • When I use ETH with my H743 based project the CubeMX add to main.c a definition of DMA descriptors. I have those descriptors defined somewhere else in the code based on my application specific needs. Is there a way to make CubeMX not to generate this part in main?

Thanks,

Eyal

5 REPLIES 5
Cartu38 OpenDev
Lead II

Myself if 1.6.0 I've no issue to keep my sybol definition despite asking for new code generation (because IP setup update or ...)

0693W000008y8bMQAQ.jpg 

If expecting to prevent DMA descriptors clash I gues sonly way is to not setup such DMA as part of your device configuration activities. If no set for sure no related code will be generated

The ETH peripheral has it's own dedicated DMA and it has no option of not using it. Therefore CubeMX also has no option of not setting up DMA descriptors for it.

Ons KOOLI
Senior III

Hi egoltzman,

Is it possible for you to keep CubeMx generating that peace of code into main and delete it from the other place ?

Best Regards,

Ons.

egoltzman
Senior

Hi Ons,

Yes, it is possible but uncomfortable as the other part is a GIT based submodule and I'll need to "touch" it every time it will be merged.

And this is just an example of something that CubeMX generate and I would like to override, there is other places as well.

CubeMX is GREAT and I enjoy using it but sometimes there is a need to override its output.

This is what I'm looking for.

Thanks,

Eyal

Hi @egoltzman​ ,

Maybe you have to put ETH initialization with the other code and just disable ETH from Mx.

I don't think it is possible to disable DMA descriptors generation since I tried this in Mx and could not.

I will verify this with Mx team and provide you with the exact information.

Best Regards,

Ons.