stm32编译时出现 error: #35: #error directive: "Please select first the target STM32F10x device used

用keil4添加头文件时,为了图方便把创建的头文件放在桌面

编译的时候就出现了#error directive: "Please select first the target STM32F10x device used

这时候应该在你的c/c++(这里找c/c++)里面的Define输入:  USE_STDPERIPH_DRIVER,STM32F10X_MD

其中MD根据你选择的机种更换为LD或HD

猜你喜欢

转载自blog.csdn.net/hello_dzm/article/details/83006318