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