ARM Technical Support Knowledge Articles


Applies to: L166 Linker/Locator


Information in this article applies to:


I am trying to copy an array from ROM to on-chip RAM. When I look at the addresses used for the memcpy in the debugger, the wrong address is used for the on-chip RAM and the code attempts to copy the array back to a location in ROM. Here are my linker directives:

DPPUSE (1=NDATA (0x200000-0x207FFF),

CLASSES (NCODE (0X0000-0X2FFF, 0x4000-0xBFFF),
SDATA (0XE000-0XE7FF, 0XFC00-0XFD7F),
SDATA0 (0XE000-0XE7FF, 0XFC00-0XFD7F),

I am copying from an array called src to an array called dest, both three bytes in size:

const unsigned char src[3] = { 0xaa, 0x55, 0xa5};

unsigned char dest[3];

After linking, src was located at 3000H and dest was located at FD80H. However, in the debugger, the address used for dest was 3D80H which is inside the NCONST class.

Why isn't DPP3 being used to access the FIXRAM class? It is located in the address range accessed by DPP3.


The Data Page Pointers may only be used to access the NCONST and NDATA classes. In your DPPUSE directive, you have specified that DPP0, 1 and 2 may be used to access NCONST and NDATA, however DPP3 is not specified. Therefore, it cannot be used to access NCONST or NDATA.


Instead of using the FIXRAM class, declare your dest array as sdata. sdata is always accessed using DPP3. The correct address will then be used.

unsigned char sdata dest[3];

Note that it is not possible to add the FIXRAM address range to the NDATA range specified in the DPPUSE directive, as the range of addresses used by NDATA must be contiguous.



Article last edited on: 2005-07-15 13:22:24

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