Active1 year, 2 months ago
![Iar workbench free Iar workbench free](/uploads/1/2/5/7/125792485/102376979.png)
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 appreciatedThank YouRegards
796-EW8051 EW8051 8051 Standard - Includes Editor, Project Manager, IAR C/C++ Compiler for 8051, MISRA Checker, IAR Assembler for 8051, Linker and librarian, Run-time libraries include source code, C-SPY Debugger, RTOS plug-ins, Printed user guides, SUA 2995.00 For quantities greater than listed, call for quote. MoUSER SToCk no.
![Iar 8051 Compiler Iar 8051 Compiler](http://www.k2-denshi.com/gijyutujyoho/IAR Embedded Workbench/image8.jpg)
Peter SimpsonPeter Simpson
1 Answer
See IAR's support article on 8051 programming.
So a pointer to an int in xdata would be like:
The attribute ensures only MOVX instructions are emitted in assembly, as required by the C8051F121 datasheet.
Gunther SchulzGunther Schulz
Got a question that you can’t ask on public Stack Overflow? Learn more about sharing private information with Stack Overflow for Teams.