Keil Logo

BIT Linker Directive

Abbreviation

BI

Arguments

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

Default

None.

µVision

Options — BL51 Locate — Bit Base.
Options — BL51 Locate — Bit Segments.

Description

The BIT directive specifies:

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

This directive is specified as follows:

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

Where

base specifies the base address to use for BIT segments.
segment is the name of a segment.
address is a physical address at which the segment is to be located.

Note

  • Addresses that you specify with the BIT directive are bit addresses. Bit addresses 00h-7Fh reference bits in DATA memory bytes from byte address 20h-2Fh (16 bytes of 8 bits each, 16 × 8 = 128 = 80h). Bit addresses that are evenly divisible by 8 are aligned on a byte boundary. A DATA segment that is bit-addressable may be located with the BIT directive. However, the bit address specified must be byte-aligned (evenly divisible by 8).
  • 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

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

Example

The following example specifies that relocatable BIT segments be located at or after bit address 48 decimal (30 hex) in data memory:

BL51 MYPROG.OBJ BIT(48)

or

BL51 MYPROG.OBJ BIT(0x30)

To specify the order for segments, you must include the segment names, separated by commas. The following example places the ?DT?A, ?DT?B, and ?DT?C segments at the beginning of the bit-addressable DATA memory.

BL51 MYPROG.OBJ,A.OBJ,B.OBJ,C.OBJ BIT(?DT?A,?DT?B,?DT?C)

You may also specify the bit address for the segments. The following example places the ?DT?A and ?DT?B segments at 28h and 30h:

BL51 MYPROG.OBJ,A.OBJ,B.OBJ BIT(?DT?A(28h),?DT?B(30h))

Related Knowledgebase Articles

  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.