Keil™, An ARM® Company

BL51 User's Guide

DATA Linker Directive

Abbreviation DA
Arguments DATAbase » « 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

basespecifies the base address to use for DATA segments.
segmentis the name of a segment.
addressis 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))