歡迎來到Linux教程網
Linux教程網
Linux教程網
Linux教程網
Linux教程網 >> Linux基礎 >> 關於Linux >> IAR升級之後編譯以前的工程報錯的解決辦法

IAR升級之後編譯以前的工程報錯的解決辦法

日期:2017/3/2 9:51:24   编辑:關於Linux

今天打開一個以前編譯正常的項目(用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

Copyright © Linux教程網 All Rights Reserved