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

Device definitions

Do Keil C51/A51 define the target device somehow? I can't seem to find anything in the docco. I was thinking there should exist something like __DEVICE__ as a predfined macro.

Parents
  • "Do Keil C51/A51 define the target device somehow?"

    No, they don't.

    ALL the SFRs, etc, are defined by include files.

    There is nothing special or magic about these headers - you can write your own, if you wish.

    There are some device-specific options (eg, for extended addressing modes) - see the Manuals for these

Reply
  • "Do Keil C51/A51 define the target device somehow?"

    No, they don't.

    ALL the SFRs, etc, are defined by include files.

    There is nothing special or magic about these headers - you can write your own, if you wish.

    There are some device-specific options (eg, for extended addressing modes) - see the Manuals for these

Children
  • Thanks. I have set up my own device header files, so I'm aware of this.

    I have a situation where I'm targetting two different devices, with the same source file built for two different uv2 targets in the same project. I can do this by passing in a define, but I'm surprised that the compiler doesn't have something.