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
So just one assembler source file, with no vector table, and no specific ARM part? Not looking like a viable project so far...
Besides being a project with a bit of lack of basic framework - what did you plan to have your processor doing when it does not take that "BNE next" jump? You think the processor will be able to understand that you don't have any more code and then magically lock up while waiting for something else to do?
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