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

How to compile a code which was originally compiled by Archimedes C-51 compiler V4.23?

My code was compiled using the Archimedes C-51 compiler V4.23. I want to use Keil uVersion2 to compile it. But Keil only support those codes using at least Archimedes C-51 compiler Version 5.

Does anybody have any idea for compiling my codes?

Thanks

Parents
  • Maggie,

    Knowing why that line is a problem will require a bit of learning that doesn't have much to do with the 8051 or Keil tools in particular. That's basically a 'C' programming question. The "sizeof" macro that you use is something implemented by the compiler, whereas the directives that start with a '#' are pre-processor directives. Since the preprocessor runs BEFORE the compiler (hence, the "pre"), the compiler cannot evaluate that sizeof expression and the preprocessor doesn't know what you're talking about.

    Assuming that you brush up a bit on your C skills, I would recommend reading both the 8051 programmers guide and the Keil C51 manual. You can probably skip the linker / assembler manual as a first pass if you're using uVision, but then again, if you're porting code, you might run into problems that require you to know the intricacies of the linker as well.

Reply
  • Maggie,

    Knowing why that line is a problem will require a bit of learning that doesn't have much to do with the 8051 or Keil tools in particular. That's basically a 'C' programming question. The "sizeof" macro that you use is something implemented by the compiler, whereas the directives that start with a '#' are pre-processor directives. Since the preprocessor runs BEFORE the compiler (hence, the "pre"), the compiler cannot evaluate that sizeof expression and the preprocessor doesn't know what you're talking about.

    Assuming that you brush up a bit on your C skills, I would recommend reading both the 8051 programmers guide and the Keil C51 manual. You can probably skip the linker / assembler manual as a first pass if you're using uVision, but then again, if you're porting code, you might run into problems that require you to know the intricacies of the linker as well.

Children