在使用keil编码STM32的时候,由于选错了编译器的版本,导致编译报了一大堆错误。错误的内容很多,摘取一部分贴出来,如下:
static __INLINE void __enable_irq() { __ASM volatile ("cpsie i"); }
^
../System/core_cm3.h(751): note: expanded from macro '__INLINE'
#define __INLINE inline /*!< inline keyword for GNU Compiler */
^
../System/core_cm3.h(1204): error: expected identifier or '('
static __INLINE void __enable_irq() { __ASM volatile ("cpsie i"); }
^
../System/core_cm3.h(1205): error: unknown type name 'inline'
static __INLINE void __disable_irq() { __ASM volatile ("cpsid i"); }
^
../System/core_cm3.h(751): note: expanded from macro '__INLINE'
#define __INLINE inline /*!< inline keyword for GNU Compiler */
^
../System/core_cm3.h(1205): error: expected identifier or '('
static __INLINE void __disable_irq() { __ASM volatile ("cpsid i"); }
^
../System/core_cm3.h(1207): error: unknown type name 'inline'
static __INLINE void __enable_fault_irq() { __ASM volatile ("cpsie f"); }
^
../System/core_cm3.h(751): note: expanded from macro '__INLINE'
#define __INLINE inline /*!< inline keyword for GNU Compiler */
^
../System/core_cm3.h(1207): error: expected identifier or '('
static __INLINE void __enable_fault_irq() { __ASM volatile ("cpsie f"); }
^
../System/core_cm3.h(1208): error: unknown type name 'inline'
static __INLINE void __disable_fault_irq() { __ASM volatile ("cpsid f"); }
^
../System/core_cm3.h(751): note: expanded from macro '__INLINE'
#define __INLINE inline /*!< inline keyword for GNU Compiler */
^
../System/core_cm3.h(1208): error: expected identifier or '('
static __INLINE void __disable_fault_irq() { __ASM volatile ("cpsid f"); }
^
../System/core_cm3.h(1210): error: unknown type name 'inline'
static __INLINE void __NOP() { __ASM volatile ("nop"); }
^
../System/core_cm3.h(751): note: expanded from macro '__INLINE'
#define __INLINE inline /*!< inline keyword for GNU Compiler */
^
../System/core_cm3.h(1210): error: expected identifier or '('
static __INLINE void __NOP() { __ASM volatile ("nop"); }
^
../System/core_cm3.h(1211): error: unknown type name 'inline'
static __INLINE void __WFI() { __ASM volatile ("wfi"); }
^
../System/core_cm3.h(751): note: expanded from macro '__INLINE'
#define __INLINE inline /*!< inline keyword for GNU Compiler */
^
../System/core_cm3.h(1211): error: expected identifier or '('
static __INLINE void __WFI() { __ASM volatile ("wfi"); }
^
../System/core_cm3.h(1212): error: unknown type name 'inline'
static __INLINE void __WFE() { __ASM volati


7755

被折叠的 条评论
为什么被折叠?



