IAR升级之后,打开stm32官方例程,编译时提示如下错误:
Error[Pe147]: declaration is incompatible with "__nounwind __interwork __softfp unsigned short __LDREXH(unsigned short const E:My docSTM32F10x标准库v3.5.0STM32F10x_StdPeriph_Lib_V3.5.0LibrariesCMSISCM3CoreSupportcore_cm3.h 1154
Error[Pe147]: declaration is incompatible with "__nounwind __interwork __softfp unsigned short __LDREXH(unsigned short const E:My doc 3 - 专题STM32F10x标准库v3.5.0STM32F10x_StdPeriph_Lib_V3.5.0LibrariesCMSISCM3CoreSupportcore_cm3.h 1154
解决办法:
1,在Project -> Options -> C/C++ Compiler-> Preprocessor -> Additional include directories 头文件路径里面,把包含core_cm3.h的路径删除。
2,在Project -> Options -> General Options -> Library Configuration -> Use CMSIS,右下角的选项中选择 use CMSIS