LPC2132学习中遇到的错误1
const int8 NoCheckBusy = 0;
const int8 CheckBusy = 1;
const int32 LCD_RS = 1<4;
const int32 LCD_RW = 1<5;
const int32 LCD_EN = 1<6;
const int32 LCD_DATA = 0xff<7;
在c文件lcd.c和main.c中都要用到,但是在编译的时候出现如下的问题:
Error: L6200E: Symbol NoCheckBusy multiply defined (by main.o and lcd.o).
Error: L6200E: Symbol LCD_RS multiply defined (by main.o and lcd.o).
上网站arm.com/help/index.jsp?topic=/com.arm.doc.dui0435a/index.html" target="_blank">http://infocenter.arm.com/help/index.jsp?topic=/com.arm.doc.dui0435a/index.html上去查找,有如下结果:
const int8 NoCheckBusy = 0; const int8 CheckBusy = 1; const int32 LCD_RS = 1<4; const int32 LCD_RW = 1<5; const int32 LCD_EN = 1<6; const int32 LCD_DATA = 0xff<7;
L6200E:
There are two common examples where this occurs:
This error is reported when functions that use semihosting SWIs are linked in from the C library, in the presence of the
To resolve this, you must provide your own implementations of these C library functions.
The ADS 1.2 Examplesembedded directory contains examples of how to re-implement some of the more common SWI-using functions - see the file
To identify which SWI-using functions are being linked-in from the C libraries:
1. Link with armlink -verbose -errors err.txt
2. Search err.txt for occurrences of __I_use_semihosting_swi
For example:
:
Loading member sys_exit.o from c_a__un.l.
:
This shows that the SWI-using function _sys_exit is being linked-in from the C library.
This means that there are two conflicting definitions of
stdio.o
To identify why stdio.o is being linked-in, you must link with the linkers "verbose" switch, e.g.:
Then study
To move forward, the user may have to either:
- Eliminate the calls like
- Re-implement the
具体是什么意思看的也不是很懂,后来看了别人的解决方法是:在头文件中仅声明变量,而把变量的定义都放到c文件中去,问题就解决了。
即把
都放到lcd.c中就可避免该问题,时间不多,具体原因还有待研究。
LPC213 相关文章:
- 使用EasyARM2131时遇到的一些问题(12-02)
- ARM7-LPC2132驱动LCM的接口说明(11-28)
- LPC2132学习中遇到的问题2(11-23)
- LPC2134学习日志 -- LCD12864学习(11-21)
- LPC2134学习日志(二)-- LCD12864时钟(11-21)
- ARM的第一个程序(基于LPC2134)(11-20)