现在的位置: 首页 > 常见问题 > 正文

IAR升级之后编译以前的工程报错的解决办法

2014年04月16日 常见问题 ⁄ 共 943字 ⁄ 字号 IAR升级之后编译以前的工程报错的解决办法已关闭评论 ⁄ 阅读 6,945 次

今天打开一个以前编译正常的项目(用IAR5.5建立的),编译时提示如下错误(现在用的IAR6.3):

Error[Pe147]: declaration is incompatible with "__interwork 
__softfp unsigned long __get_PSP(void)" (declared at line 52 of "C:\Program Files\IAR  
C:\Libraries\CMSIS\CM3\CoreSupport\core_cm3.h 

如下图所示:

IAR_6.3error

IAR_6.3error

解决方法如下:

1.Check the "Use CMSIS" option from 

Project options > General Options > Library Configuration:

如下图所示

Use CMSIS option

Use CMSIS option

2.Remove all CMSIS header files from your project by removing:

$PROJ_DIR$\..\..\..\Libraries\CMSIS\CM3\CoreSupport” from [Project>Options>C/C++ Compiler>Preprocessor]

修改之前如下图:

IAR_6.3ERROR

IAR_6.3ERROR

修改之后为:

IAR_6.3Set

IAR_6.3Set

重新编译,OK了

IAR Compile OK

IAR Compile OK

×