Keil Logo

XDATA Linker Directive

Abbreviation

XD

Arguments

XDATA (〚range〛 〚segment 〚(address)〛 〚, ...〛〛)

Default

None.

µVision

Options — BL51 Locate — Xdata Range.
Options — BL51 Locate — Xdata Segments.

Description

The XDATA directive specifies:

  • The address range for relocatable XDATA segments.
  • The order of relocatable XDATA segments in memory.
  • The absolute memory location of individual XDATA segments.

This directive is specified as follows:

XDATA (〚range, ...〛 〚segment 〚(address)〛 〚, ...〛〛)

Where

range specifies the address range(s) to use for XDATA segments.
segment is the name of a segment.
address is a physical address at which the segment is to be located.

Note

  • The BL51 Linker allows you to use wildcards when locating program segments. For example, ?PR?*?MYFILE may be used to represent all program segments from the MYFILE source file.
See Also

BIT, CODE, DATA, IDATA, PDATA, PRECEDE, RAMSIZE, STACK

Example

The example below specifies that relocatable XDATA segments be located in the address space 0–0x3FF and 0xF800–0xFFFF:

BL51 MYPROG.OBJ XDATA(0 - 0x3FF, 0xF800 - 0xFFFF)

To specify the order for segments, you must include the names of the segments separated by commas. The following example will place the ?XD?MOD1 and ?XD?MOD2 segments at the beginning of the XDATA memory:

BL51 MOD1.OBJ,MOD2.OBJ XDATA(?XD?MOD1, ?XD?MOD2)

You can also specify the memory location for a segment. The example below will place the ?XD?MOD1 segment at 800h:

BL51 MOD1.OBJ,MOD2.OBJ XDATA(?XD?MOD1 (0x800))
  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.