cancel
Showing results for 
Search instead for 
Did you mean: 

L4 cubeMx package ver 1.12 inconsistency

Hello there,

Here is my CubeMX version:

0690X000006BsfKQAS.png

Here is my L4 libs version:

 0690X000006BsfPQAS.png

I have noticed some disturbing inconsistencies in the #ifdef include guards generated in the default peripherals code. So far all peripherals has guards like this:

#ifndef __STM32L4xx_HAL_FLASH_H
#define __STM32L4xx_HAL_FLASH_H

Now, only some peripherals has those. Some others use these:

#ifndef STM32L4xx_HAL_I2C_H
#define STM32L4xx_HAL_I2C_H

Why remove the "__" suffix in some libs? I only noticed those, because I was using those defines for something. Please confirm. @Imen DAHMEN​ ?

2 REPLIES 2
Imen.D
ST Employee

Hello @Community member​ ,

The double underscore (__) removed to apply MISRA-C 2012 compliance.

Noted that we are still setting the MISRA-C 2012 rules .

With Regards,

Imen

When your question is answered, please close this topic by clicking "Accept as Solution".
Thanks
Imen

Ok, but why only for some files?