Keil™, An ARM® Company

C166 User's Guide

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 NamesLocation
NCODEROM or EPROM space for near code; must fit into one 64KByte segment.
NCONSTROM 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.
FCONSTROM or EPROM space for const far variables.
HCONSTROM or EPROM space for const huge variables.
XCONSTROM or EPROM space for const xhuge variables.
FCODEROM or EPROM space for far code.
NDATA, NDATA0RAM 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, SDATA0RAM space for sdata variables; address range 0C000h-0FFFFh (Page 3).
IDATA, IDATA0On-chip RAM for idata variables:
  • 80C166 address range: 0xFA00-0xFDFF.
  • C16x/XC16x address range: 0xF800-0xFDFF.
BIT, BIT0Bit-addressable RAM for bit variables; address range 0FD00h-0FDFFh.
BDATA, BDATA0Bit-addressable RAM for bdata variables; address range 0FD00h-0FDFFh.
FDATA, FDATA0RAM space for far variables.
HDATA, HDATA0RAM space for huge variables.
XDATA, XDATA0RAM space for xhuge variables.
ICODEROM or EPROM space; located in on-chip code memory.