Keil编译报错的问题解决

在使用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
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值