L166 User's Guide

Example 4

The following L166 Command Line:

L166 inputlist
     DPPUSE (3=NCONST(0x00C000-0x00DFFF), 0=NDATA(0x040000-0x04BFFF)
     CINITTAB (0x010000 - 0x03FFFF)
     RESERVE  (0x00E7FF-0x00EFFF)                      /* For the CAN module */
     CLASSES (ICODE  (0x000000 - 0x00DFFF),
              FCODE  (0x000000 - 0x00DFFF, 0x010000 - 0x03FFFF),
              HCONST (0x010000 - 0x03FFFF),
              XCONST (0x010000 - 0x03FFFF),
              HDATA  (0x04C000 - 0x07FFFF),
              HDATA0 (0x04C000 - 0x07FFFF),
              XDATA  (0x04C000 - 0x02FFFF),
              XDATA0 (0x04C000 - 0x07FFFF),
              SDATA  (0x00E000 - 0x00E7FF),
              IDATA  (0x00F800 - 0x00FDFF))

Defines the memory areas for the following target system to the linker.

256K RAM area from 0x040000-0x07FFFF

Place objects with huge
or xhuge depending on
the object size.
huge objects are limited
to 64K. xhuge objects
may be any size.

48K near data memory is available at the
beginning of the RAM space.
 0x07FFFF
0x04C000
48K near data space 0x048000 (DPP2)
 0x044000 (DPP1)
 0x040000 (DPP0)
This example uses
256K ROM space for
far
code and constants
starting at 0x000000.
 0x010000
Unused 0x00FE00
Internal RAM 0x00F600
Unused 0x00F000
CAN Module 0x00E800
On-chip Data XRAM 0x00E000
NCONST Space 0x00C000 (DPP3)
256K ROM area from
0x000000-0x03FFFF
 0x000000

Note

  • The HLarge Memory Model is used for this example. The application uses both huge and xhuge variables but no far objects. The C167CR on-chip XBUS RAM is used for sdata variables. The DPPUSE directive defines a 48K NDATA area and an 8K NCONST area in page 3 of the memory. The on-chip RAM is accessed with idata variables and the C167CR CAN module is accessed with the CAN167.H definition file.