如果在STM32工程編譯時沒有添加USE_STDPERIPH_DRIVER,STM32F10X_HD時會出現如下錯誤:..\library\cortex_m3\stm32f10x.h(96): error: #35: #error directive: "Please select first thetarget STM32F10x device used in your application (in stm32f10x.hfile)"
這時候我們需要在“Target Options”中的“C/C++”選項卡中添加USE_STDPERIPH_DRIVER、STM32F10X_HD。這樣才能使編順利通過。