ARM Technical Support Knowledge Articles

ABSOLUTELY LOCATING STARTUP CODE

Applies to: BL51 Code-banking Linker/Locator

Answer


Information in this article applies to:


SYMPTOMS

I am trying to absolutely locate the startup code that comes with the compiler (in the file STARTUP.A51) and is always included in projects.

When I try to use the segment name ?CO?STARTUP I get ERROR 110: CANNOT FIND SEGMENT.

CAUSE

Segment names for assembly code do not have to follow the same naming conventions as used for C code segments. The segment name you are trying to use is incorrect.

RESOLUTION

Build your project (without the linker CODE directive referencing ?CO?STARTUP) and look at the m51 file generated.

In the table titled 'Link Map of Module' you will see something like the following:

TYPE    BASE      LENGTH    RELOCATION   SEGMENT NAME
-----------------------------------------------------

* * * * * * *   C O D E   M E M O R Y   * * * * * * *
CODE    057FH     000FH     UNIT         ?C_C51STARTUP

The correct segment name is therefore ?C_C51STARTUP.

As an alternative, review the STARTUP.A51 file and you will find the following segment definition:

?C_C51STARTUP   SEGMENT   CODE

Article last edited on: 2006-10-16 10:39:34

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