cancel
Showing results for 
Search instead for 
Did you mean: 

STM32CubeMX Feature missing? User labels

mklatt9
Associate II
Posted on April 15, 2015 at 11:52

Hello,

perhaps I missed something... Is it correct, that the user labels in CubeMX are not used in the generated code? I've seen this in other code configurator tools. I didn't found a way to benefit from the pin definitions in the code, like ''LED_RED''.

If this is not implemented, this is a great feature! I know tools which writes a pin definition file with a bunch of defines like PIN_LED_RED_SetHigh(), PIN_LED_RED_Toggle(),

PIN_LED_RED_SetAsOutput(), PIN_LED_RED_EnablePullUp()

and so on for the correct replacement with the already mapped HAL functions, pins and ports.

Thanks for any help.

Greetings

STM32CubeMX 4.7.0 / HAL F4 1.5.0 / STM32F407

#user-labels #feature #stm32cube #solved
14 REPLIES 14
Walid FTITI_O
Senior II
Posted on October 05, 2016 at 11:06

Hi mk@sch, 

Behind Great Clients comes great progress. Thank you for your contribution.

-Hannibal-

Posted on January 10, 2018 at 06:35

I have a colleague using

Version 4.23.0

STM32Cube V1.0

'Lord I don't understand your version numbering scheme.'

He added User Labels to various pins.

These User Labels are visible in the STM32CubeMX Pins/Signals Options... as well as in the GUI around the MCU, and also in the GPIO Pin Configuration of the Configuration Tab.

NONE OF THESE USER LABELS EVER SHOW UP IN THE GENERATED CODE? WHY? I HAD THE IMPRESSION THAT THIS WAS A FEATURE. AM I NOT INTERPRETING WHAT I AM READING HERE?

His development system is Atollic True Studio Version 8.1

Jeanne Joly
Senior III
Posted on February 01, 2018 at 14:40

Hello all,

I think that the first point (raised by

66794

) was answered and solved since a long time ago.

Regarding your post

tomkins.richard

, indeed, user labels are correctly generated. Here, I took an example of STM32F722ZETX with the pin PC13 named Jeanne_GPIO as below :

0690X00000609RaQAI.png

and after generating the code, I can find this user label in the main.c in the GPIO configuration part :

0690X00000609ZiQAI.png

I think that fully answered the initial topic.

If not, could you please be more precise in your request?

BR. Jeanne

Posted on February 01, 2018 at 14:58

 ,

 ,

I find my user defined names ♯ defined in main.h

Posted on March 19, 2018 at 03:07

I'm sorry, I've been away on an extended, well, it's a log story.

In any event, I shall get back to this in the very near future, as my experience was the opposite of yours.