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
I:0x00–I:0xFFRegisters, bits, variables, stack, ...
External
RAM
X:0x0000–X:0xFFFFExternal variables.
External
RAM
X:0x000000–X:0x01FFFFFar variables.
ROMC:0x0000–C:0xFFFFProgram code and constants.
ROMC:0x000000–C:0x0FFFFFConstants.

requires the following linker command line:

LX51 MYPROG.OBJ &
     CLASSES ( &
             HDATA  (X:0x000000 – X:0x01FFFF), &
             HCONST (C:0x000000 – C:0x0FFFFF) &
             )

Note

  • The address ranges for BIT, CODE, CONST, DATA, IDATA, and XDATA memory classes in the above linker command line are not required since the default settings cover the correct physical address ranges.