欧美极品高清xxxxhd,国产日产欧美最新,无码AV国产东京热AV无码,国产精品人与动性XXX,国产传媒亚洲综合一区二区,四库影院永久国产精品,毛片免费免费高清视频,福利所导航夜趣136

標題: error: #35: #error directive: "Please select first the target STM32F10x [打印本頁]

作者: lianyiqun    時間: 2015-7-8 22:33
標題: error: #35: #error directive: "Please select first the target STM32F10x
用stm32f10x.h文件時的問題
    在用uvison4.x(MDK4.x)建立一個開發STM32F103的工程:test.uvproj
在工程中加入源程序main.c文件,源代碼內容如下:
#include "stm32f10x.h"
int main(void)
{
  return 0;

}
編譯會出現錯誤,使得入門者難以繼續深入學習STM32。
錯誤提示的全部信息如下:
C:\Keil_STM32\ARM\INC\ST\STM32F10x\stm32f10x.h(80):error:  #35: #error directive: "Please selectfirst the target STM32F10x device used in your application (instm32f10x.h file)"
解決辦法如下:
   右鍵點擊工程名,選擇第一個options for target ,下面選擇C/C++,在define文本框中輸入:
STM32F10X_MD,USE_STDPERIPH_DRIVER即可。MD根據你選擇的機種更換為LD或HD


   再編譯,會出現更多錯誤,例如: error:  #256: invalid redeclaration of type name "s32" (declared at line 470 of "C:\Keil_STM32\ARM\INC\ST\STM32F10x\stm32f10x.h") #256: invalid redeclaration of type name "sc32" (declared at line 474 of "C:\Keil_STM32\ARM\INC\ST\STM32F10x\stm32f10x.h")...... error:  #101: "RESET" has already been declared in the current scopeerror:  #101: "SET" has already been declared in the current scope......error:  #256: invalid redeclaration of type name "ErrorStatus" (declared at line 507 of "C:\Keil_STM32\ARM\INC\ST\STM32F10x\stm32f10x.h")warning:  #47-D: incompatible redefinition of macro "HSE_Value" (declared at line 511 of "C:\Keil_STM32\ARM\INC\ST\STM32F10x\stm32f10x.h")   解決辦法:打開stm32f10x_conf.h文件,將第21行的“#include "stm32f10x_type.h"”注釋掉,再保存stm32f10x_conf.h文件,重新編譯即可。



作者: dxa572862121    時間: 2017-9-16 11:42
謝謝分享




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