用Keil vision5编译时出现以下错误:
D:\MDK\install\ARM\PACK\Keil\STM32F1xx_DFP\2.2.0\Device\Include\stm32f10x.h(483): error: #5: cannot open source input file "core_cm3.h": No such file or directory。
这是因为你装的MDK版本太新了,比如MDK5.12/5.13,它们不会从MDK安装目录去查找头文件。 所以导致这个错误。
解决方法如下:
把图片中的文件复制到keil软件安装的include目录下:
D:\MDK\install\ARM\PACK\Keil\STM32F1xx_DFP\2.2.0\Device\Include
在编译结果成功: