I get the below error during linking. I am using keil uvision4 IDE. How do i solve this error?
Warning: L6665W: Neither Lib$$Request$$armlib Lib$$Request$$cpplib defined, not searching ARM libraries. Error: L6411E: No compatible library exists with a definition of startup symbol __main.
below is a part of my code
AREA sevensegment, CODE, READONLY LDR r1,=space LDR r0,=0x3fffc000 MOV r4, #0 LDRB r3, [r1] next LDR r2, [r0],#1 CMP r2, #' ' BEQ inc STRB r3, [r0],#1 inc ADD r4, r4, #1 CMP r4,#42 BNE next AREA charascii, DATA, READWRITE space DCB ' ' END
You should leave the some space (one tab atleast) before writing assembler directive AREA. because by default first space is reserved for LABEL. for Example: AREA sevensegment, CODE, READONLY
LDR r1,=space LDR r0,=0x3fffc000 MOV r4, #0 LDRB r3, [r1] next LDR r2, [r0],#1 CMP r2, #' ' BEQ inc STRB r3, [r0],#1 inc ADD r4, r4, #1 CMP r4,#42 BNE next
AREA charascii, DATA, READWRITE space DCB ' ' END