IAR升级之后,打开stm32官方例程,编译时提示如下错误:

Error[Pe147]: declaration is incompatible with "__nounwind __interwork __softfp unsigned short __LDREXH(unsigned short const E:\My doc\STM32F10x标准库v3.5.0\STM32F10x_StdPeriph_Lib_V3.5.0\Libraries\CMSIS\CM3\CoreSupport\core_cm3.h 1154

Error[Pe147]: declaration is incompatible with "__nounwind __interwork __softfp unsigned short __LDREXH(unsigned short const  E:\My doc\03 - 专题\STM32F10x标准库v3.5.0\STM32F10x_StdPeriph_Lib_V3.5.0\Libraries\CMSIS\CM3\CoreSupport\core_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

 

相关文章:

  • 2022-01-12
  • 2022-12-23
  • 2021-12-16
  • 2021-04-11
  • 2022-12-23
  • 2021-04-12
  • 2022-12-23
  • 2021-08-14
猜你喜欢
  • 2021-09-04
  • 2021-08-05
  • 2021-10-11
  • 2021-05-01
  • 2022-12-23
  • 2021-05-05
  • 2021-07-27
相关资源
相似解决方案