2015-06-10 08:04 PM
Hi, I'm evaluating using Cube + MX for a commercial project. Seems like public opinion is pretty negative about this tool and ecosystem however. Has anyone had a positive experience in using Cube for a commercial project?
These are my main concerns:* Buggy HAL libraries* Code generation tool producing messy code, have to carefully place user code between sections* No way to add user code to header files #cube #stm32cubemx2015-06-10 10:52 PM
2015-06-11 12:20 AM
Thanks for the reply Mark,
Are you using the Code Generation Tool? It's certainly helpful, but I'm definitely concerned it's going to mash my code at some point in the future...In hindsight do you think it would be better to stick to using the SPL? This is my first project using ARM core (10+yrs experience with AVR Megas, so bit of a learning curve).2015-06-11 02:41 AM
2015-06-11 09:16 AM
I haven't used the SPL because I have only recently moved to using ST devices but from what I read on this forum, it sounds like it is mature and, maybe, not so buggy. Others can surely comment on this.
The SPL has always had a VERY low bug density, it's a very thin abstraction layer. ST's silicon has also been very solid, and not constantly stepped to the point you have to be acutely aware of if. There are some silicon bugs, and there's an errata sheet.I've made some long standing observations about HAL/Cube, I don't plan to revisit them here. I would recommend that anyone using any manufacture library do a code walk on it and apply the same rigour their company would expect of them.2015-06-11 11:21 AM
1) Buggy code libraries - I haven't had much problem with it. I suspect that ST borrowed heavily from their previous library code. There's going to be teething pains, but they seem to be fixing issues quickly. (Another 12-bit processor company could learn from ST)
2) Messy generated code - If the generated code is treated as gospel code that never gets touched, there are more than enough affordances for you to call ST's code without putting your code within the user code sections.3) Code into header files - ??? code doesn't go into header files? I'm not sure what you're saying here.A2015-06-11 04:06 PM
Andrei - 3) code in header files, I meant function prototypes, defines etc. If you add your own functions to the generated .c files (e.g. additional ADC routines to adc.c) then there is no way of including a function prototype in the .h file that I can see. I guess the work around here is to not put any user code in the generated files at all, if you want it accessible to other files.
Thanks for all your responses.