2025-04-01 7:59 AM
Hi all,
once again I stumble across CubeMX being so inflexible in its code generation.
I use CubeMX to generate initialization code but I'm also using C++ and that's where CubeMX has major downsides.
For example it is still not possible to tell CubeMX to generate the MX_XXX_Init function calls anywhere but in main.
Further more an option to add a simple pointer to all HandleTypeDefs which is free to use would help a lot.
From my experience STM HAL drivers are actually working pretty much ok but sometimes the are based on assumptions that a either flawed or don't apply in the project context.
Hence you have to write your own driver.
Just a simple pointer so I can pass additional information together with the handle struct would make life much easier especially when trying to implement a driver as C++ class.
To any ST employee reading this:
Are there any plans to make CubeMX more flexible?
To all users of CubeMX:
What would you really like ST to change in CubeMX?
BR
2025-04-01 8:16 AM - edited 2025-04-01 8:25 AM
@EStei.3 wrote:it is still not possible to tell CubeMX to generate the MX_XXX_Init function calls anywhere but in main.
But you can tell it not to generate them at all.
@EStei.3 wrote:Just a simple pointer so I can pass additional information together with the handle struct would make life much easier especially when trying to implement a driver as C++ class.
Recent discussion about that:
2025-04-01 8:26 AM
@Andrew Neil wrote:
But you can tell it not to generate them at all.
Yeah, both options are not really useful.
@Andrew Neil wrote:
Recent discussion about that:
https://community.st.com/t5/stm32-mcus-embedded-software/user-defined-context-in-hal-callbacks/m-p/783093
Thanks, couldn't find that one!
2025-04-01 1:49 PM - edited 2025-04-01 1:52 PM
>To all users of CubeMX:
>What would you really like ST to change in CubeMX?
Power it up with some AI engine already ))) And a cloud based workspace, like on Github, so we won't struggle with linux versions and updates. But this isn't going to be free?
> so inflexible
Other words for it are stable, classic, minimalist, old & proven...
> Are there any plans to make CubeMX more flexible?
Just note that any added option will require more testing. Willing to sponsor this?