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

differences of absolute locations

I want an instance of a structure to be put at a specific address in xdata. What is the difference between these declarations:

#define tSetupPacket (* (tDEVICE_REQUEST xdata *)0xFF00)

tDEVICE_REQUEST xdata tSetupPacket _at_ 0xFF00;
It seems that the second behaves incorrectly.
There is also an opportunity to declare a structure at absolute locaiton by #pragma memory segments (supported by non-Keil C or Keil linker).
What is the best choice?

Parents Reply Children
No data