ARM Technical Support Knowledge Articles


Applies to: C166 C Compiler


Information in this article applies to:


The 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?


Yes, it is possible to use the ERAM for variables. There are several ways possible to make this memory available for C programs.

  1. 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.

  2. Refer to RENAMECLASS in the C166 User's Guide.



Article last edited on: 2005-09-22 12:25:04

Rate this article

Disagree? Move your mouse over the bar and click

Did you find this article helpful? Yes No

How can we improve this article?

Link to this article
Copyright © 2011 ARM Limited. All rights reserved. External (Open), Non-Confidential