Overide CubeMX\CubeIDE generated elements
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2021-03-29 12:27 AM
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
- Labels:
-
STM32CubeIDE
-
STM32CubeMX
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2021-03-29 1:03 AM
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 ...)
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2021-04-02 2:37 AM
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2021-04-02 2:46 AM
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2021-04-13 12:51 AM
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2021-05-07 9:49 AM
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.
