keil5出现‘Target not created‘
新建工程中写了main函数进行编译时出现错误的问题:
*** Using Compiler 'V5.06 update 5 (build 528)', folder: 'D:\Keil_v5\ARM\ARMCC\Bin'
Build target 'Target 1'
compiling main.c...
D:\Keil_v5\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
#include "core_cm3.h"
User\main.c: 0 warnings, 1 error
".\Objects\Project.axf" - 1 Error(s), 0 Warning(s).
Target not created.
Build Time Elapsed: 00:00:00
查找报错的关键提示:cannot open source input file "core_cm3.h": No such file or directory
#include "core_cm3.h"
这是因为你装的MDK版本太新了,比如MDK5.12/5.13,它们不会从MDK安装目录去查找头文件。 所以导致这个错误。
解决方法如下:
把core_cm3.h文件复制到keil软件安装的include目录下:
D:\自己的安装目录下\ARM\PACK\Keil\STM32F1xx_DFP\2.2.0\Device\Include文章来源:https://www.toymoban.com/news/detail-731051.html
添加完再次运行,就不报错了。文章来源地址https://www.toymoban.com/news/detail-731051.html
*** Using Compiler 'V5.06 update 5 (build 528)', folder: 'D:\Keil_v5\ARM\ARMCC\Bin'
Build target 'Target 1'
compiling main.c...
linking...
Program Size: Code=648 RO-data=252 RW-data=0 ZI-data=1632
".\Objects\Project.axf" - 0 Error(s), 0 Warning(s).
Build Time Elapsed: 00:00:00
到了这里,关于keil5出现‘Target not created‘的文章就介绍完了。如果您还想了解更多内容,请在右上角搜索TOY模板网以前的文章或继续浏览下面的相关文章,希望大家以后多多支持TOY模板网!