Keil Logo

DATA Linker Directive

Abbreviation

DA

Arguments

DATA (〚base〛 〚segment 〚(address)〛 〚, ...〛〛)

Default

None.

µVision

Options — BL51 Locate — Data Base.
Options — BL51 Locate — Data Segments.

Description

The DATA directive specifies:

  • The base address for relocatable DATA segments.
  • The order of relocatable DATA segments in memory.
  • The absolute memory location of individual DATA segments.

This directive is specified as follows:

DATA (〚base, ...〛 〚segment 〚(address)〛 〚, ...〛〛)

Where

base specifies the base address to use for DATA 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, IDATA, PDATA, PRECEDE, RAMSIZE, STACK, XDATA

Example

The example below specifies that relocatable DATA segments be located at or after address 48 decimal (30 hex) in the on-chip DATA memory:

BL51 MYPROG.OBJ DATA(48)

or

BL51 MYPROG.OBJ DATA(0x30)

To specify the order for segments, you must include the names of the segments separated by commas. The following example will place the ?DT?A, ?DT?B, and ?DT?C segments at the beginning of the DATA memory:

BL51 A.OBJ,B.OBJ,C.OBJ DATA(?DT?A,?DT?B,?DT?C)

You can also specify the memory location. The example below will place the ?DT?A and ?DT?B segments at 28h and 30h in the DATA memory:

BL51 MYPROG.OBJ,A.OBJ,B.OBJ DATA(?DT?A(28h),?DT?B(30h))
  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.