Error in linking!
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'
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???
AREA Reset, CODE, READONLY
MOV r0, #0x11
MOV r1, r0, LSL #1
MOV r2, r1, LSL #1
stop B stop
Posted 12 December 2010 - 03:09 PM
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.