cancel
Showing results for 
Search instead for 
Did you mean: 

CubeMx User-Labels starting with digits will fail compilation

taraben
Senior
Posted on February 10, 2016 at 18:49

Dear ST,

CubeMx lets me enter user labels. Which is a good feature.

However Label starting with digits will fail in compilation proccess.

In my case I put ''12V_SENSE'' as on the schematic program.

Please check User Labels to match ''C'' convention for variables names.

Or generate a proper sequence. (i.e. putting undeline before - I don't know if this breaks C conventions)

Regards, Adib.

--

#!stm32-!cubemx
2 REPLIES 2
Posted on February 10, 2016 at 21:48

Yes, this has been the case with C identifiers since about 1972.

You COULD change your identifier to V12_SENSE or _12V_SENSE or even _12, and all of those would compile.

Andrei from The Great White North
taraben
Senior
Posted on February 10, 2016 at 23:17

Hello Andrei,

yes I know I am able to change.

But as CubeMx is the Codegenerator for C-Code it must repect that limitation in one or the other way.

Either restrict the user or find a way around.

FYI if you put a space or slash it will be replaced by underline.

So, for me this is clearly a limitation. Call it a bug.

Adib.