AnsweredAssumed Answered

STM32CubeMX bad macro generation (bug)

Question asked by Eugene on Dec 24, 2016
Latest reply on Sep 13, 2017 by Sirma Siang

I use STM32CubeMX v4.18.0. It generates MX_Device.h file for configuring CMSIS-Drivers. I found that there are some macroses use hyphen symbol, which is not allowed:

 

/*-------------------------------- SYS        --------------------------------*/

#define MX_SYS                                  1

/* GPIO Configuration */

/* Pin PE2 */
#define MX_SYS_TRACECLK_Pin                     PE2
#define MX_TRACECLK                             SYS_TRACECLK

/* Pin PA13 */
#define MX_SYS_JTMS-SWDIO_Pin                   PA13
#define MX_SWDIO                                SYS_JTMS-SWDIO

/* Pin PE3 */
#define MX_SYS_TRACED0_Pin                      PE3
#define MX_TRACED0                              SYS_TRACED0

/* Pin PA14 */
#define MX_SYS_JTCK-SWCLK_Pin                   PA14
#define MX_SWCLK                                SYS_JTCK-SWCLK

/* Pin PE6 */
#define MX_SYS_TRACED3_Pin                      PE6
#define MX_TRACED3                              SYS_TRACED3

/* Pin PE4 */
#define MX_SYS_TRACED1_Pin                      PE4
#define MX_TRACED1                              SYS_TRACED1

/* Pin PE5 */
#define MX_SYS_TRACED2_Pin                      PE5
#define MX_TRACED2                              SYS_TRACED2

Outcomes