Could not open file ..\output\core_cm3.o: No such file or directory
来源:互联网 发布:淘宝 真货 编辑:程序博客网 时间:2024/06/06 18:21
一、STM32, MDK升级5.0后,编译出现问题,本人用的是win8.1,开始因为一直需要联机而不得不停止工作,后来用管理员身份运行MDK,问题的到解决,但后续编译又出现如下问题error: L6002U: Could not open file ..\output\core_cm3.o: No such file or directory", 没有产生core_cm3.o 。一时间在网上也没有找到好的解决方案,后来就索性把core_cm3.c从工程中移除,编译通过了,但是不知道会不会出现其他未知问题。最后发现是CMSIS1.x和CMSIS2.x不兼容的问题,解决方案是从ARM 官网下载最新的CMSIS文件,取而代之。
STM32从3.0库开始引入了CMSIS,CMSIS是Cortex微控制器软件接口标准(Cortex MicroController Software Interface Standard)的缩写,这个是ARM定制的一个用于Cortex-M系列的一个标准,主要是为了提供通用api接口来访问内核和一些片上外设,提高代码的可移植性。
CMSIS有三个层:核内外设访问层Core Peripheral Access Layer(CPAL),中间件访问层Middleware Access Layer(MWAL),设备访问层(Device Peripheral Access Layer)。
CPAL用于访问内核的寄存器和组件,如NVIC,调试系统等。该层是由ARM实现的。
MWAL用于对中间件的访问,现在该层还未实现。(也不知道所谓的中间件是什么东西)。
DPAL用于定义一些硬件寄存器的地址和一些外设访问函数,由芯片制造商实现。
CPAL层的实现就是Core_cm3.c文件,DPAL层的实现就是system_stm32f10x.c文件(似乎还应该加上外设的函数库)。
接下来就来了解一下Core_cm3.c里面有什么东东:
首先是汇编关键字__ASM和__INLINE的宏定义,支持不同的编译器。由于使用的是Keil,所以就只看第一种,__CC_ARM。
这里面的函数调用都只符合ARM过程调用标准的,如R0到R3用作参数和返回值传递,这也是这里面唯一用到的。
此外,在Keil中使用了__asm关键字后,编译器不会为函数增加返回指令,所以需要自己编写返回命令,也就是每个函数后面的
1.
2.
3.
4.
5.
6.
7.
8.
9.
10.
11.
12.
13.
14.
15.
BASEPRI,PRIMASK,FAULTMASK,CONTROL都只能在特权模式下被修改。
二、无法打开core_cm3.o”(如..\OBJ\Template.axf: error: L6002U: Could not open file ..\obj\core_cm3.o: No such file or directory),网上也有很多人问了相同的问题,但好像都没有解决(路径什么的我感觉都没有错误,include paths所有的例子中的头文件都包含进去了),但肯定在什么地方有错误!我该怎么办?需要重装keil吗?
还有我发现只要在编译时出现“The ARM C/C++ Compiler已停止工作”提示的.c文件,都没有.o文件生成(不止test.o找不到),因此也找不到。
我要不要屈服,就只看懂程序就可以了?或者我自己新建工程,然后把光盘例程拷贝过去(因为我有很多以前自学的一些新建工程并且编译成功了),原子哥,给下建议吧?
- Could not open file ..\output\core_cm3.o: No such file or directory
- Ubuntu14 Could not open file /var/lib/dpkg/status - open (2: No such file or directory)
- httpd: Could not open configuration file /xxx/conf/httpd.conf: No such file or directory
- Apache启动错误:No such file or directory httpd: could not open error log file......
- ubuntu下VMware Workstation报错"Could not open /dev/vmmon: No such file or directory"
- Linux中VMware启动报错:could not open /dev/ vmmon:no such file or directory
- 解决FATAL: Could not open 'kernel/arch/mips/oprofile/oprofile.ko': No such file or directory
- linux vmware Could not open /dev/vmmon: No such file or directory.
- mysql could not read contents of failed to open no such file or directory
- Could not launch app - No such file or directory Error
- Could not stat /dev/sda4 --- No such file or directory
- crtbegin_dynamic.o: No such file: No such file or directory
- libiphlpapi.o: No such file or directory
- ubuntu vmware xp Could not open /dev/vmmon: No such file or directory. Please make sure that the ke
- linux下安装vmware Could not open /dev/vmmon: No such file or directory. Please make sure that the kerne
- chroot Warning: cannot open /proc/net/dev (No such file or directory). Limited output.
- error: could not lock config file E:/git/Git/%USERPROFILE%/.gitconfig: No such file or directory
- cannot open shared object file: No such file or directory
- MongoDB 数据类型
- ICPCCamp2016day3F.The Jump Address
- Mac 创建.txt文件
- 把Android手机变成远程监控摄像头
- 重装系统
- Could not open file ..\output\core_cm3.o: No such file or directory
- 把Android手机变成远程监控摄像头
- 汇聚点滴精彩
- Distant Galaxy(高效)
- mongodb中最为简单的一种安装方法
- poj 1191 棋盘分割
- 介绍在Swift2面向协议编程(译文)
- 基于物品的协同过滤中,余弦相似度、皮尔森系数、修正余弦相似度三者的区别
- JavaScript contains