 | Technical Support |  |
|
|
Technical Support Support Resources Product Information | C166: LOCATE VARIABLES TO XC16X ON-CHIP ERAM
Information in this article applies to:
QUESTIONThe Infineon XC161, XC164, and XC167 provides an on-chip Program SRAM or ERAM that is typically used for program execution. Is it possible to use this memory also for variables? If yes, how can I locate variables to this memory area? ANSWERYes, it is possible to use the ERAM for variables. There are several ways possible to make this memory available for C programs. - When you are using only on-chip RAM of the device, you may simply re-direct the NDATA memory class to the ERAM address space. Open the dialog Project - Options for Target - L166 Locate and disable Use Memory Layout from Target Dialog. In this dialog copy the Target Classes string to the User Classes field and change the memory area for NDATA and NDATA0 as shown below:
ICODE (0xC00000-0xC1FFFF), NCODE (0xC00000-0xC0FFFF),
FCONST (0xC00000-0xC1FFFF), HCONST (0xC00000-0xC1FFFF),
XCONST (0xC00000-0xC1FFFF), NCONST (0xC04000-0xC07FFF),
NDATA (0xE00000-0xE007FF), NDATA0 (0xE00000-0xE007FF),
SDATA (0xC000-0xCFFF, 0xF600-0xFDFF), SDATA0 (0xC000-0xCFFF, 0xF600-0xFDFF),
IDATA (0xF600-0xFDFF), IDATA0 (0xF600-0xFDFF),
FDATA (0xC000-0xCFFF, 0xF600-0xFDFF), FDATA0 (0xC000-0xCFFF, 0xF600-0xFDFF),
HDATA (0xC000-0xCFFF, 0xF600-0xFDFF), HDATA0 (0xC000-0xCFFF, 0xF600-0xFDFF),
XDATA (0xC000-0xCFFF, 0xF600-0xFDFF), XDATA0 (0xC000-0xCFFF, 0xF600-0xFDFF)
Now all variables that are defined with the near memory type are located into the memory area 0xE00000 - 0xE007FF which represents the ERAM space. - Refer to RENAMECLASS in the C166 User's Guide.
MORE INFORMATIONSEE ALSOFORUM THREADSThe following Discussion Forum threads may provide information related to this topic. Last Reviewed: Thursday, September 22, 2005
|
|