最近学习嵌入式,在初步建立工程的时候,出现了如下错误:
.\Obj\Template.axf: error: L6002U: Could not open file .\obj\core_cm3.o: No such file or directory
在百度了半天后,找了各种各样的解决方法,有改电脑系统变量路径的,这个路径改了好多应用都打不开,虽然KEIL可以编译不报错了,但极其不推荐,不然电脑其他软件好多都打不开。第二种说是没有添加头文件core_cm3.h,明明添加了而且在C/C++路径里也添加了但还是没用。
最后我仔细分析了错误,说是打不开文件core_cm3.o,说是没找到这个文件或路径,然后我就去看看了给的例程,发现在一个文件下面生成了很多这样的文件:CRF文件,D文件,O文件,错误报的就是没有core_cm3.o文件
然后我去我建立的工程项目里,找到相应的路径,发现恰好缺少了core_cm3.o文件,问题就明确了,我把
core_cm3.o复制到我建立的项目中,然后编译就通过啦!!!
注意:文件路径一定要对,是在如图这个文件中
还要在C/C++路径中添加这个文件路径,文件路径别添加错了
相关文章
- 解决 Linux error while loading shared libraries: cannot open shared object file: No such file or directory
- [Python]mysql-python 安装错误 fatal error C1083: Cannot open include file: 'config-win.h': No such file or directory
- D:\Software\Keil5\ARM\PACK\Keil\STM32F1xx_DFP\2.1.0\Device\Include\stm32f10x.h(483): error: #5: cannot open source input file "core_cm3.h": No such file or directory
- android-sdks/build-tools/17.0.0/aapt: error while loading shared libraries: libz.so.1: cannot open shared object file: No such file or directory
- could not open extension control file "/usr/share/postgresql/9.1/extension/plpythonu.control": No such file or directory
- vcftools报错:Writing PLINK PED and MAP files ... Error: Could not open temporary file.解决方案
- 解决keil编译时报错:error: L6002U: Could not open file .\***\core_cm3.o
- [emerg] open() "/usr/local/Cellar/nginx/1.17.10/logs/error.log" failed (2: No such file or directory
- keil编译出现..\OBJ\USART.axf: error: L6002U: Could not open file ..\obj\sys.o: No such file or directory
- error: #5: cannot open source input file "stm32f10x_conf.h": No such file or directory