I am using c51 compiler and uv2. I wrote a small program for 89c51ed2. I included startup.a51 in the project but unable to build the project. It gives me a warning saying "unresolved external symbol C_START". I don't understand why this is happenning? Also when I change STARTUP.A51 to show xdata memory from 0000h to 06FFh, the map file generated shown "xdata end" at 0xFFFF. Is it OK?
do you have a main() WITHOUT parametres? Erik
yes i have the main module without any parameters.
Are you using inline assembler, and/or have you enabled 'Generate Assembler SRC File'?
Yes I have inline assembly and it never gave an error for the inline assembly I have. But "C_Start" is a call to the C start Off routine and should be found in any case. Am I right?
I have generate assembler src enabled in the options.
But "C_Start" is a call to the C start Off routine and should be found in any case. Am I right? Not if you compile all your sources via assembly. But since you should never have to do that, that's easy to fix. Just remove the global "compile to SRC" and "assemble SRC file" options, or invert them for at least one .c file --- it can even be an otherwise completely empty one. The Keil linkers don't automatically assume that all programs are C programs. They're being given a hint in the .obj files, by the C compiler, that the C runtime environment, including the C_Start function, is needed. But this hint cannot be expressed in Keil's Ax51 assembly language. That's why translating all C files to assembly, and compiling the generated assembly, will mean the linker doesn't get this hint.
The following knowledgebase article may also help. http://www.keil.com/support/docs/1980.htm Jon
Great!!...Thankyou all for the help