如何解决KEIL报错 error in include chain (cmsis_armcc.h): expected identfieror

经过一番寻找终于找到了这个令人心烦的解决方法,首先说明这个错误是编译器的错误,也就是它抽风不正常工作了。

原因

In the most common case, the syntax checker was not able to open an include file, which is referenced by the currently edited source module. In that case, further syntax checking is stopped, because the ‘not found’ include file most likely contains required definitions, which would result in numerous, irrelevant errors.
上面是官网的解释,也就是说语法检查没办法打开你的include的.h文件,他就没办法检查了,所以就出错了。也就是打不开包含链(include chain)。

解决方法

忽略提示的错误,打开UVCC.ini(这个文件在MDK5\UV4目录下),添加如下命令:

cmsis_armcc.h   = *

意思就是忽略cmsis_armcc.h文件带来的所有错误。

官网链接
http://www.keil.com/support/docs/3787.htm

  • 16
    点赞
  • 29
    收藏
    觉得还不错? 一键收藏
  • 5
    评论
评论 5
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值