如何解决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

你可能感兴趣的:(电子设计)