This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Compiling with C51 from DOS

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.

Parents
  • You should link your own Object file with standard library which contains external symbols like printf,etc you have refered in your own code.
    Just include the library in the linker line even startupo etc can be 'library called' an example:

    c:\tools\keil\c51\bin\bl51 SDstart.obj, SDisr.obj, SD485.obj, SDxdata.obj, ams.lib, c51s.lib TO ams.omf RS(256) IX
    

    erik

Reply
  • You should link your own Object file with standard library which contains external symbols like printf,etc you have refered in your own code.
    Just include the library in the linker line even startupo etc can be 'library called' an example:

    c:\tools\keil\c51\bin\bl51 SDstart.obj, SDisr.obj, SD485.obj, SDxdata.obj, ams.lib, c51s.lib TO ams.omf RS(256) IX
    

    erik

Children
No data