Keil Logo Arm Logo

BL51: ABSOLUTELY LOCATING STARTUP CODE


Information in this article applies to:

  • C51 Version 5.50

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

Last Reviewed: Monday, October 16, 2006


Did this article provide the answer you needed?
 
Yes
No
Not Sure
 

Keil logo

Arm logo
Important information

This site uses cookies to store information on your computer. By continuing to use our site, you consent to our cookies.

Change Settings