I am trying to compile hello.c (The same code that comes with Keil Examples) using C51 from DOS and following these steps:
On DOS prompt I am typing
1. C51 hello.c src
2. A51 hello.src
3. BL51 hello.obj this creates 4 warnings and 0 error messages.
4. OH51 hello
Now my problem is that the hex file generated through these steps are not same as the file I get after compiling through uV2 from windows. Also the OBJ and LST are not same.I need the solution for this.
I am using Atmel 89S52 chip.
Doing it that way probably doesn't include the startup and init code that uV2 would have included.
It does not, you need to include it in the linker call.
Erik
"Doing it that way probably doesn't include the startup and init code that uV2 would have included."
I don't think uVision has anything to do with it.
He's getting the compiler to output assembler source, then getting the assembler to translate that to object. (why? who knows!)
Doing this will never include the startup & runtime stuff - even if you do it from uVision!
This is because the Assembler can't tell that the SRC was generated from a 'C' file, so that information is not in the OBJ file. Therefore the Linker doesn't know to include all the necessary 'C' support stuff.
If the OP had bothered to state what the 4 warnings were, I bet they would have been the giveaway to this!
What Do I have to include in Linker Call???