最近学习嵌入式,在初步建立工程的时候,出现了如下错误:
.\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++路径中添加这个文件路径,文件路径别添加错了
相关文章
- nginx启动报错:nginx: [error] open() "/var/run/nginx/nginx.pid" failed (2: No such file or directory) 的解决
- 发生服务器错误: Error loading MySQLdb module: libmysqlclient.so.18: cannot open shared object file: No such file or directory
- OGG-01091 Unable to open file "./dirdat/cs001481" (error 2, No such file or directory)
- python3.5: error while loading shared libraries: libpython3.5m.so.1.0: cannot open shared object file: No such file or directory
- memcached /usr/local/memcached/bin/memcached: error while loading shared libraries: libevent-2.0.so.5: cannot open shared object file: No such file or directory
- openssl version 查看openssl 版本出现openssl: error while loading shared libraries: libssl.so.1.1: cannot open shared object file: No such file or directory,怎么办
- 使用arm-none-eabi-gdb报错error while loading shared libraries: libncurses.so.5: cannot open shared object file: No such file or directory
- nginx: [error] open() "/var/run/nginx/nginx.pid" failed (2: No such file or directory)
- nginx: [error] open() "/usr/local/var/run/nginx.pid" failed (2: No such file or directory)
- nginx启动或者重启失败,报错nginx: [error] open() "/usr/local/var/run/nginx.pid" failed (2: No such file or directory)