Skip to content

Commit 4eea8fa

Browse files
committed
STM32 Fixed warning related to __packed redefinition
Before this patch, many warnings like below were generated during compilation with ArmCC [Warning] lwip_ethernet.h@57,0: #3135-D: attribute does not apply to any entity This happens here as ``--gnu`` option of ArmCC is being used, which enables the GNU compiler extensions that the ARM compiler supports. This is solve by adding a extra check on __CCARM .
1 parent 0b5b6cb commit 4eea8fa

File tree

9 files changed

+9
-9
lines changed

9 files changed

+9
-9
lines changed

targets/TARGET_STM/TARGET_STM32F0/device/stm32f0xx_hal_def.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ typedef enum
124124
}while (0)
125125
#endif /* USE_RTOS */
126126

127-
#if defined ( __GNUC__ )
127+
#if defined ( __GNUC__ ) && !defined ( __CC_ARM )
128128
#ifndef __weak
129129
#define __weak __attribute__((weak))
130130
#endif /* __weak */

targets/TARGET_STM/TARGET_STM32F1/device/stm32f1xx_hal_def.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ typedef enum
124124
}while (0)
125125
#endif /* USE_RTOS */
126126

127-
#if defined ( __GNUC__ )
127+
#if defined ( __GNUC__ ) && !defined ( __CC_ARM )
128128
#ifndef __weak
129129
#define __weak __attribute__((weak))
130130
#endif /* __weak */

targets/TARGET_STM/TARGET_STM32F2/device/stm32f2xx_hal_def.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,7 @@ static inline void atomic_clr_u32(volatile uint32_t *ptr, uint32_t mask)
145145
} while (__STREXW(newValue,(volatile unsigned long*) ptr));
146146
}
147147

148-
#if defined ( __GNUC__ )
148+
#if defined ( __GNUC__ ) && !defined ( __CC_ARM )
149149
#ifndef __weak
150150
#define __weak __attribute__((weak))
151151
#endif /* __weak */

targets/TARGET_STM/TARGET_STM32F3/device/stm32f3xx_hal_def.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,7 @@ static inline void atomic_clr_u32(volatile uint32_t *ptr, uint32_t mask)
144144
} while (__STREXW(newValue,(volatile unsigned long*) ptr));
145145
}
146146

147-
#if defined ( __GNUC__ )
147+
#if defined ( __GNUC__ ) && !defined ( __CC_ARM )
148148
#ifndef __weak
149149
#define __weak __attribute__((weak))
150150
#endif /* __weak */

targets/TARGET_STM/TARGET_STM32F4/device/stm32f4xx_hal_def.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,7 @@ static inline void atomic_clr_u32(volatile uint32_t *ptr, uint32_t mask)
146146

147147
#endif /* USE_RTOS */
148148

149-
#if defined ( __GNUC__ )
149+
#if defined ( __GNUC__ ) && !defined ( __CC_ARM )
150150
#ifndef __weak
151151
#define __weak __attribute__((weak))
152152
#endif /* __weak */

targets/TARGET_STM/TARGET_STM32F7/device/stm32f7xx_hal_def.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,7 @@ static inline void atomic_clr_u32(volatile uint32_t *ptr, uint32_t mask)
145145
} while (__STREXW(newValue,(volatile unsigned long*) ptr));
146146
}
147147

148-
#if defined ( __GNUC__ )
148+
#if defined ( __GNUC__ ) && !defined ( __CC_ARM )
149149
#ifndef __weak
150150
#define __weak __attribute__((weak))
151151
#endif /* __weak */

targets/TARGET_STM/TARGET_STM32L0/device/stm32l0xx_hal_def.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ typedef enum
127127
}while (0)
128128
#endif /* USE_RTOS */
129129

130-
#if defined ( __GNUC__ )
130+
#if defined ( __GNUC__ ) && !defined ( __CC_ARM )
131131
#ifndef __weak
132132
#define __weak __attribute__((weak))
133133
#endif /* __weak */

targets/TARGET_STM/TARGET_STM32L1/device/stm32l1xx_hal_def.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ typedef enum
124124
}while (0)
125125
#endif /* USE_RTOS */
126126

127-
#if defined ( __GNUC__ )
127+
#if defined ( __GNUC__ ) && !defined ( __CC_ARM )
128128
#ifndef __weak
129129
#define __weak __attribute__((weak))
130130
#endif /* __weak */

targets/TARGET_STM/TARGET_STM32L4/device/stm32l4xx_hal_def.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,7 @@ static inline void atomic_clr_u32(volatile uint32_t *ptr, uint32_t mask)
147147
} while (__STREXW(newValue,(volatile unsigned long*) ptr));
148148
}
149149

150-
#if defined ( __GNUC__ )
150+
#if defined ( __GNUC__ ) && !defined ( __CC_ARM )
151151
#ifndef __weak
152152
#define __weak __attribute__((weak))
153153
#endif /* __weak */

0 commit comments

Comments
 (0)