|ARM Technical Support Knowledge Articles|
Applies to: C51 C Compiler
Information in this article applies to:
I have a question about the way to define xmem address and data. I've used IAR and Archimedes for a long time and that is the reason I'm confused. Here is the situation:
In IAR and Archimedes I can use the following method to access xmem:
// assign xmem address 8000 to xmem1_add #define xmem1_add 0x018000 // assign xmem content at xmem1_data #define xmem1_data (*(char *)0x018000)
or I can define
#define xmem1_data (*(char *)xmem1_add)
How do I do this with the Keil compiler?
Try the following. They should work just fine.
#define xmem1_data (*(char xdata *)0x8000)
#define xmem1_add 0x8000 #define xmem1_data (*(char xdata *)xmem1_add)
Article last edited on: 2006-09-29 04:25:29
Did you find this article helpful? Yes No
How can we improve this article?