cancel
Showing results for 
Search instead for 
Did you mean: 

Warning from preprocessor defines checks in STM32Cube FW_U3 V1.3.0

CecilW
Associate

If the user uses "-Wundef" the header "stm32u3xx_hal_def.h" creates a lot of warnings due to a missing check if a preprocessor macro is defined before evaluating it.

The warning gets emmited by the following #ifs used in STM32Cube FW_U3 V1.3.0 inside "stm32u3xx_hal_def.h":

#if defined ( __CC_ARM ) || ((__ARMCC_VERSION) && (__ARMCC_VERSION >= 6010050)) || defined ( __GNUC__ )

e.g. in line 142

This is how it was correctly checked in e.g. the STM32Cube FW_G0 V1.6.3 in the hal def header for the stm32g0 hal:

#if defined ( __CC_ARM ) || (defined (__ARMCC_VERSION) && (__ARMCC_VERSION >= 6010050))

 

Best Regards

1 REPLY 1
Saket_Om
ST Employee

Hello @CecilW 

Thank you for bringing this issue to our attention.

I reported this internally.

Internal ticket number: CDM0062496 (This is an internal tracking number and is not accessible or usable by customers).

To give better visibility on the answered topics, please click on "Accept as Solution" on the reply which solved your issue or answered your question.
Saket_Om