Keil Logo

Locating Sections

There are two linker directives you may use to locate sections and classes to physical addresses.

  • The CLASSES directive provides a way to assign all sections in a class to a specified address range.
  • The SECTIONS directive provides a way to assign one or more sections to a specified address range.

Sections should be located to memory according to the following rules:

Class Names Location
NCODE ROM or EPROM space for near code; must fit into one 64KByte segment.
NCONST ROM or EPROM space for const near variables; must fit into one 16 KByte page. You may use the DPPUSE linker directive to enlarge address range for this class.
FCONST ROM or EPROM space for const far variables.
HCONST ROM or EPROM space for const huge variables.
XCONST ROM or EPROM space for const xhuge variables.
FCODE ROM or EPROM space for far code.
NDATA, NDATA0 RAM space for near variables; both classes combined must fit into one 16 KByte page. You may use the DPPUSE linker directive to enlarge address range for these class.
SDATA, SDATA0 RAM space for sdata variables; address range 0C000h-0FFFFh (Page 3).
IDATA, IDATA0 On-chip RAM for idata variables:
  • 80C166 address range: 0xFA00-0xFDFF.
  • C16x/XC16x address range: 0xF800-0xFDFF.
BIT, BIT0 Bit-addressable RAM for bit variables; address range 0FD00h-0FDFFh.
BDATA, BDATA0 Bit-addressable RAM for bdata variables; address range 0FD00h-0FDFFh.
FDATA, FDATA0 RAM space for far variables.
HDATA, HDATA0 RAM space for huge variables.
XDATA, XDATA0 RAM space for xhuge variables.
ICODE ROM or EPROM space; located in on-chip code memory.
  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.