2015-04-15 02:52 AM
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 #solved2015-04-15 03:50 AM
I vote for this feature!
2015-04-15 06:17 AM
I also vote for this!
2015-04-29 10:08 AM
Dear All,
Thank you for your feedback. Indeed, this feature is not implemented yet but the request has been logged. Can you actually state what you would like to be generated (other than only the label). Here are some suggestions below (is this useful, other things you may want to add?): With Label BLUE_LED, generate for example#define BLUE_LED
#define BLUE_LED_PIN GPIO_PIN_12
#define BLUE_LED_GPIO_PORT GPIOD
With
USARTx_TX and USARTx_RX
Labels
generate :#define USARTx USART1
#define USARTx_AF GPIO_AF7_USART1
#define USARTx_TX_PIN GPIO_PIN_9
#define USARTx_TX_GPIO_PORT GPIOA
#define USARTx_RX_PIN GPIO_PIN_10
#define USARTx_RX_GPIO_PORT GPIOA
Best regardsI also vote for this!
2015-04-29 11:44 AM
2015-04-29 01:48 PM
My variant
#define BLUE_LED
GPIOD,
GPIO_PIN_12
#define BLUE_LED_PIN GPIO_PIN_12
#define BLUE_LED_GPIO_PORT GPIOD
in this case you can use: HAL_GPIO_WritePin(BLUE_LED, GPIO_PIN_SET) HAL_GPIO_ReadPin(BLUE_LED
)2015-04-29 04:03 PM
Hi,
This would be a huge help but the comment from Vladimir is better.Regards,Osto2015-05-09 10:32 AM
Vote for too.
2015-11-13 08:31 AM
Where are the definitions stored?
2016-10-04 03:16 AM
Hey cool,
I'm very happy to see, that my original feature request was implemented for a while and now I and many others benefit from this. :-))) After some posts from me rebuking the lack of a bug tracker and some other annoying bugs (yes, first one is also a bug :) ), I want to say THANK YOU - really good done. After checking the generated code I saw that CubeMX even uses that generated labels in a really good way in the initialization codes. Very well done!! Please could at least five of you at ST go to that person who has improved the software this much, pat him or her on the back and forward my and many other user's happiness and praise? Too bad, that there is no good way to tag this as solved, so that everyone can see ''feature, discussion, solved in version xy'' :| . This would be a good entry for such a list... Thanks, MK