Keil Logo

BL51: SPECIFYING CODE AND XDATA RANGES


Information in this article applies to:

  • C51 Version 6.01 and Later

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 µVision2 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

  • Refer to CODE in the BL51 User's Guide.
  • Refer to XDATA in the BL51 User's Guide.

SEE ALSO

FORUM THREADS

The following Discussion Forum threads may provide information related to this topic.

Last Reviewed: Tuesday, March 27, 2007


Did this article provide the answer you needed?
 
Yes
No
Not Sure
 
  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

Privacy Policy Update

Arm’s Privacy Policy has been updated. By continuing to use our site, you consent to Arm’s Privacy Policy. Please review our Privacy Policy to learn more about our collection, use and transfers
of your data.