I am working on a project in which i am using at89c2051. When I wrote a program and built it using c51 the following message was displayed:
Build target 'Target 1' linking... *** WARNING L1: UNRESOLVED EXTERNAL SYMBOL SYMBOL: ?C_START MODULE: STARTUP.obj (?C_STARTUP) *** WARNING L2: REFERENCE MADE TO UNRESOLVED EXTERNAL SYMBOL: ?C_START MODULE: STARTUP.obj (?C_STARTUP) ADDRESS: 080AH Program Size: data=9.0 xdata=0 code=15 "L2" - 0 Error(s), 2 Warning(s).
Ignoring this I decided to simulate the program but the register values were not being displayed. Why is this happening? Is there any problem in the startup.a51 file?
The messages refer to 'C' runtime support - so you have tried to do something in 'C'.
You need to either get rid of that "something", or provide the necessary 'C' runtime support.
The usual reason for getting this kind of thing is that you have written your code in 'C', but compiled it all with the SRC option...
http://www.keil.com/support/man/docs/c51/c51_src.htm
If you put "UNRESOLVED EXTERNAL SYMBOL SYMBOL: ?C_START MODULE" into the 'Search' box, you will find the many previous discussions about this; eg,
http://www.keil.com/forum/5768
RE: I wrote this code in assembly language not in c The messages refer to 'C' runtime support - so you have tried to do something in 'C'.
I recall a previous post where the poster thought startup.a51 was required for assembly programs, could that be it?
Erik
"I recall a previous post where the poster thought startup.a51 was required for assembly programs, could that be it?"
That sounds very plausible!
As already noted, the messages are just warnings - not errors. IIRC, that means that the code just mentioned ("referenced") the undefined symbols as EXTERN or similar - it only becomes an error when you actually try to use the symbol...
Thanks a lot to you guys. I removed startup.a51 from my program and it is running now.