標題: stm32中的錯誤以及排除方法 [打印本頁]

作者: heicad    時間: 2014-7-5 01:33
標題: stm32中的錯誤以及排除方法
                        1、error: #256:invalid redeclaration of type name "s32" (declared at line 470 of"C:\Keil_STM32\ARM\INC\ST\STM32F10x\stm32f10x.h")

解決方法:打開stm32f10x_conf.h文件,將第21行的“#include"stm32f10x_type.h"”注釋掉,再保存stm32f10x_conf.h文件,重新編譯即可。


2、 warning: #47-D: incompatible redefinition of macro"HSE_Value" (declared at line 511 of"C:\Keil\ARM\INC\ST\STM32F10x\stm32f10x.h")這個警告是重復定義了晶振頻率,可以去stm32f10x.h修改


解決方法去stm32f10x.h的511行屏蔽掉  #define HSE_Value          HSE_VALUE


3、發(fā)現(xiàn)一個問題在頭文件中寫了include"stm32f10x.h"但是還是要寫很多的外設的ppp.h這樣的包含文件才能用。
解決辦法是:這個include"stm32f10x.h"其中是有include“stm32f10x_conf.h”這個文件的,但是我寫的工程里面路徑設置,沒有讓keil找到這個stm32f10x_conf.h,我是亂放了這個頭文件導致keil無法找到,于是keil自作聰明的調(diào)用了舊版本的stm32f10x_conf.h,其中有很多是與新版本不同的,并且舊版本中沒有包含所有外設的頭問價。
                                                                       






歡迎光臨 (http://www.torrancerestoration.com/bbs/) Powered by Discuz! X3.1