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

Logo

有“AI”的1024 = 2048,欢迎大家加入2048 AI社区

更多推荐