LX51 User's Guide

Standard Application Example

A typical non-code-banking application with the following memory map:

Memory
Area
Address
Range
Usage
On-chip
RAM
D:0x00–D:0x7FRegisters, bits, variables, stack, ...
External
RAM
X:0x0000–X:0x7FFF
X:0xF800–X:0xFFFF
Variables too large for on-chip RAM.
ROMC:0x0000–C:0x7FFFProgram code and constants.

requires the following linker command line:

LX51 PROG.OBJ &
     SEGMENTS ( &
              DATA(D:0x00-D:0x7F), IDATA(I:0x00-I:0x7F), &
              CODE(C:0x0000-C:0x7FFF), &
              XDATA(X:0x0000-X:0x7FFF, X:0xF800-X:0xFFFF) &
              )

Note

  • The address ranges for the BIT and DATA memory classes in the above linker command line are not required (even though the DATA memory class is specified) since the default settings cover the correct physical address ranges.