STM32F10X _FAULT

来源:互联网 发布:大周皇族 知乎 编辑:程序博客网 时间:2024/04/27 13:36

一. ERROR # 35:"Please select first the target STM32F10x device used in your application (in stm32f10x.h file)"  :  修改 配置框-->C/C++ -->Preprocessor                     Symbols-->Define-->USE_STDPERIPH_DRIVER,STM32F10X_HD      HD与芯片启动类型有关   注意芯片类型与启动文件的匹配.

二 . Error:  #101: "ERROR" has already been declared in the current scope
    Error:  #101: "SUCCESS" has already been declared in the current scope
    Error:  #256:e invalid redeclaration of type name "ErrorStatus" (declared at line 524 of "..\CMSIS\stm32f10x.h") 在stm32f10x_conf_h文件,将“#include               "stm32f10x_type.h"”注释掉,再保存编译。 

      如果依然还有错误,修改 配置框-->C/C++ -->include paths  添加.c /.h/.s文件位置。

三. Error: #20:  identifier "****" is undefined   ,未定义。

四. Error: #268:  declaration may not appear after executablestatement ,声明变量应该放在引用函数之前。

五. Warning #47-D:incompatible redefinition of macro "**"  定义重复,并且被定义为另一个值。

. error: L6235E: More than one section matches selector - cannot all be FIRST/LAST错误,网络上教程也很多,我这里把图截上来,也简明。


1.查看工程里的几个编程文件


你会发现startup_stm32f10x_cl.s前面的图标和不太一样。原因,网络上说得很多。

2.右击startup_stm32f10x_cls.s这个文件,选择option.....


右边的两个选项include in Target Build和Always Build灰勾去掉。


然后确定,其它几个文件也如这样操作。但是注意保留startup_stm32f10x_xl.s这个文件。

3.更改后的工程文件如下所示:


4.重新clean一下工程,然后rebuild 一下。


通过。。。

1 0
原创粉丝点击