Quick Links
Error in linking!
#1
Posted 11 December 2010 - 06:55 PM
I have compiled a sample program in ARM assembly language for LPC2148 using the Keil MDK . After compilation the following error was reported.
Build target 'Target 1'
linking...
abc.axf: Warning: L6665W: Neither Lib$$Request$$armlib Lib$$Request$$cpplib defined, not searching ARM libraries.
abc.axf: Error: L6411E: No compatible library exists with a definition of startup symbol __main.
Target not created
<br clear="all"> How can I recover from this error???
Sample Progarm:
GLOBAL Reset_Handler
AREA Reset, CODE, READONLY
Reset_Handler
MOV r0, #0x11
MOV r1, r0, LSL #1
MOV r2, r1, LSL #1
stop B stop
END
#2
Posted 12 December 2010 - 03:09 PM
jishnu, on 11 December 2010 - 06:55 PM, said:
The MDK startup code, which you are presumably linking along with your own code, contains a hard coded B __main (or similar). Since you are apparently trying to write your own startup code, it may be a good idea to delete MDK's from your project -- you don't need it. Define your own Reset_Handler as entry point in your program, perhaps using the ENTRY directive in the assembler source code.
Regards
Marcus
#3
Posted 12 December 2010 - 05:17 PM
Thanks a lot for the valuable information. The code got successfully linked and I am able to invoke the debugger now.














