2015-11-15 07:31 AM
Hi,
when CubeMX generates code, it is intended by 2 spaces. Ist there the possibility to change this behaviour to get a tab character instead. I searched in the forum and googled for a while but unfortunately, I didn't find any solution for that. I should have this due to some company policies. And, please, do not open a new scene in the holy war about tabs/spaces. I know this quite well and there are (dis)advantages for both versions. It's just, I'm bound to the tab side... ;) Thanks in advance! Have a nice day, BernhardSolved! Go to Solution.
2017-10-13 02:31 AM
For this very old thread,
I would recommend to use an external tool (astyle) which is available for all platforms (Win, Linux and MacOS). It allows to format the source code in a very flexible way. It is intensively used at Linux Kernel side. It is available from github: Kind regardsSirma2015-11-15 04:28 PM
Somehow I suspect your request is going to be difficult to apply universally, and with rigour. ie require far too much effort.
I should have this due to some company policies... It's just, I'm bound to the tab side.. Then presumably an issue you've addressed before, multiple times, around here we have custom tools that get it done in a way the formatting deities instruct. See also http://uncrustify.sourceforge.net/2015-11-16 02:12 PM
Move all of Cube's generated code into a directory called hal.
Rename their main.c to stcubeinit.c or whatever your style guidelines permits.Rename ST's main() to something like STCubeInit() and comment out their infinite loop. Declare this code gospel and it must never be messed with outside of cube, except perhaps assert_failed().Create your own main.c and main() that calls STCubeInit().Treat the cube code as a code library and don't put your code in the user sections at all.Carry on.2016-01-15 08:37 AM
Dear user,
We have logged your enhancement request but do not have a plan yet for its delivery. Sorry for the inconvenience. Best regards2017-10-13 02:31 AM
For this very old thread,
I would recommend to use an external tool (astyle) which is available for all platforms (Win, Linux and MacOS). It allows to format the source code in a very flexible way. It is intensively used at Linux Kernel side. It is available from github: Kind regardsSirma