Accessing Xdata on 8051 with IAR C Compiler
Accessing Xdata on 8051 with IAR C Compiler
I am having trouble correctly declaring a pointer in the IAR Embedded Workbench to access external RAM connected on the EMI port of an CC8051F121.
Any example code or pointer to example would be appreciated
Thank You
Regards
1 Answer
1
See IAR's support article on 8051 programming.
So a pointer to an int in xdata would be like:
int __xdata *myptr;
The attribute ensures only MOVX instructions are emitted in assembly, as required by the C8051F121 datasheet.
See also this app note.
By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.