如果在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。这样才能使编顺利通过。