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

_at_ keyword

Hi all,

How to use _at_ keyword? The varaibles are declared in onchip EEPROM space. (T89C51RD2)

Regards.

Parents
  • You're not making too much sense. Either the location of fvalue is unknown, or it can be located. You can't meaningfully have it both ways. If it's actually unknown, you can't use it, period.

    The _at_ directive is exactly the way to tell the compiler the actual location, in those cases where that location is not known from some other file being linked into your final executable.

    It had better not be in the source file that just uses this variable, though. It should be in a header file exported by the piece of code defining this variable.

Reply
  • You're not making too much sense. Either the location of fvalue is unknown, or it can be located. You can't meaningfully have it both ways. If it's actually unknown, you can't use it, period.

    The _at_ directive is exactly the way to tell the compiler the actual location, in those cases where that location is not known from some other file being linked into your final executable.

    It had better not be in the source file that just uses this variable, though. It should be in a header file exported by the piece of code defining this variable.

Children
No data