ARM Technical Support Knowledge Articles

PLACING CODE AT A FIXED ADDRESS

Applies to: RealView C Compiler

Answer


Information in this article applies to:


SYMPTOM

How can I place a piece of code, or constant data, at a fixed location in my program's binary, using the RealView toolchain?

CAUSE

The RealView toolchain differs from the CARM toolchain, in the mechanism used to explicitly place code.

RESOLUTION

To place code or constants at a specific location:

  1. Declare a new ROM space in the Options for Target — Target setup page. This new declaration should start at the address where you want your code or constant to begin. For example:
           Start:      Size:
    ROM1   0x00020000  0x00001000
    
  2. Put the code or constant data you want to place, in a separate source file.
  3. Right-click the source file name to open the Options dialog for that source file. In the Memory Assignment group, set the Code/Const box to the ROM space you just declared. In this case, ROM1.

STATUS

Supported in current version.

Article last edited on: 2006-08-01 10:32:49

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