We are running a survey to help us improve the experience for all of our members. If you see the survey appear, please take the time to tell us about your experience if you can.
Hi,
I am migrating my project from Compiler 5 to Compiler 6.
While doing this, I found out that in stm32f4xx_hal_def.h, the Macro re-definition of __pakced does not actually comply with armclang. Following is the snippet from the header file:
* ARM Compiler 4/5 */ #if defined ( __CC_ARM ) /* already defined by compiler */ /* * ARM Compiler 6 (armclang) */ #elif defined (__ARMCC_VERSION) && (__ARMCC_VERSION >= 6010050) #ifndef __weak #define __weak __attribute__((weak)) #endif /* __weak */ #ifndef __packed #define __packed __attribute__((__packed__)) #endif /* __packed */
Shouldn't __attribute__((packed)) be used instead of __attribute__((__packed__))?
or, more properly, reference to the definition in cmsis_armclang.h:
#define __PACKED __attribute__((packed, aligned(1)))
Or am I missing something?
Thanks in advanced