ARM Technical Support Knowledge Articles

SPECIFYING CODE AND XDATA RANGES

Applies to: BL51 Code-banking Linker/Locator

Answer


Information in this article applies to:


QUESTION

Can I specify a range of XDATA or CODE space? If so, will the linker warn me if my program runs out of RAM or EPROM?

ANSWER

Yes. You may specify a range for the XDATA and CODE linker directives. For example:

BL51 myfile.obj &
     CODE (0-0x2000, 0x4000-0x8000) &
     XDATA (0-0x3FF)

Specifies that the linker may locate your program CODE anywhere in the ranges from 0000h to 2000h and from 4000h to 8000h. The linker may locate your program's XDATA variables anywhere from 0000h to 03FFh.

The XDATA and CODE ranges are generated from the uVision2 Options dialog - Target page when you enter external memory devices.

The linker will warn you if your program CODE or XDATA exceeds the specified memory area size. For example:

*** ERROR L107: ADDRESS SPACE OVERFLOW
    SPACE:   CODE
    SEGMENT: ?CO?MAIN
    LENGTH:  8000H

MORE INFORMATION

SEE ALSO

Article last edited on: 2007-03-27 15:57:57

Rate this article

[Bad]
|
|
[Good]
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