ARM Technical Support Knowledge Articles


Applies to: LX51 Linker/Locator


Information in this article applies to:


I must locate a specific string (whose length will vary from build to build) at the end of a 32KB code ROM. Is there any clever way to do this?


Yes. The LX51 Linker allows you to locate a segment by specifying its ending address. To use this feature for your application you must:

  1. Create a new source file that contains only the string to locate at the end of the ROM. For example:
    //--- Source File:  Version.C ---
    char code device[] = "My Device V1.00 Beta";
  2. Invoke the LX51 linker using the segments directive as follows:
    LX51 Version.obj SEGMENTS (?CO?Version (^C:0x7FFF))

This locates the segment ?CO?Version (that holds the version string) so that it ends at address C:0x7FFF. If you use the uVision2 IDE, you must select the extended LX51 linker/locater and, under Options for Target - LX51 Locate - Segments:, enter ?CO?Version (^C:0x7FFF).


Article last edited on: 2005-07-15 14:30:33

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