I am using cubemx to generate a CMAKE project for a NUCLEO_144 based board (NUCLEO_H563).
Project generation creates a cmake/stm32cubemx/CmakeLists.txt file that generates a macro define "USE_NUCLEO_144".
it also auto creates a stm32h5xx_nucleo_conf.h file that also creates the same define:
/** @defgroup STM32H5XX_NUCLEO_CONFIG_Exported_Constants Exported Constants
* @{
*/
/* Nucleo pin and part number defines */
#define USE_NUCLEO_144
/* #define USE_NUCLEO_64 */
This creates a duplicate redefinition warning upon build in many places as this header is included throughout my project in many places.
This is extremely annoying.
I can suppress the warning by adding:
#if !defined (USE_NUCLEO_144)
#define USE_NUCLEO_144
#endif /* USE_NUCLEO_144 */
to the stm32h5xx_nucleo_conf.h file
but of course, this change gets wiped out upon next cubemx code regeneration.
It would be so helpful if this guard was included if whatever mechanism you use to generate the _conf.h file.