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

Keil is not generating the right hex file

Hi all
I've just started using Keil C51. The first thing I did was to try an compile an example which I already had its hex file(this was compiled by Keil as well). the problem is that when I comiled the source code using Keil it compiled and linked fined and generated a hex file, however, this hex file is not working as expected ...
I made sure that I am using the right device and the right configuration.
can anybody help?
Thanks

  • hi,
    this hex file is not working as expected ...

    Could you explain, please?
    By the way, what device do you use?

    Regards,
    Oleg

  • 1) if two different releases of C51, the .hex will be different.
    2) if full vs eval, the files will be different.

    Either should be the cause.

    Erik

  • hi Oleg
    I am using AT89S8252.
    Yesterday,I viewed the hex file using a the programmer I am using. With the working hex file, the program starts at the address 00000 and finishes at 000E0, however for the compiled one (using C51) I get the same program but it starts from 00800 and finishes at 008D8 ... there is some diffrences at the start and the end of the code but the code is the same. !!
    This code should count up from 0 to 9 and display these digits on 7 seg display.
    I think that there is problem with the compiler maping ...

    Any ideas C gurus...

    thanks

  • hi
    this is really Disappointing for a beginner like me. If I can't compile this samll program whith few lines of code, so what can I do with the evaluation version ... in a word nothin.
    Can you please recommand any other free compiler plzzzz as I am new to this field of programming...

    Thanks for your great help.

  • "this is really Disappointing for a beginner like me."

    Note that the free Evaluation version is provided for precisely that purpose - for software developers who wish to Evaluate the suitability of the tools to their project.
    It is not just a freebie for all comers!
    It is not a free 8051 programming course!

    "If I can't compile this samll program whith few lines of code..."

    You can compile a small program!
    However, you may not be able to run it in some devices - particularly single-chip variants - as clearly described in the limitations page.

    You can still run in the Simulator, though.

    As I keep saying, the first thing you should do - especially as a novice - is to read the uVision Getting Started Guide and work through the example projects in it.

    It's included on the free CD and in the free download.

    This will give you a proper introduction to the tools - rather than just blindly jumping into the deep end!