keil编译错误 "Please select first the target STM32F10x...

keil编译STM32工程时 #error directive: “Please select first the target STM32F10x device used in your application (in stm32f10x.h file)”

解决方法:右键点击工程名,选择第一个options for target ,下面选择C/C++,在define文本框中输入:USE_STDPERIPH_DRIVER,STM32F10X_MD。MD根据你选择的机种更换为LD或HD

你可能感兴趣的:(stm32)