Keil Logo Arm Logo

LX51 User's Guide

Code Banking Example

A code banking application with the following memory map:

Memory
Area
Address
Range
Usage
On-Chip
RAM
I:0x00–I:0xFF Registers, bits, variables, stack, ...
External
RAM
X:0x0000–X:0xEFFF Variables too large for on-chip RAM.
ROM C:0x0000–C:0x7FFF
(common area)
Common area program and constant objects.
ROM B0:0x8000–B3:0xFFFF
(code banks)
Bank area program objects..

requires the following linker command line:

LX51 BANK0 {A.OBJ}, &
     BANK1 {B.OBJ}, &
     BANK2 {C.OBJ}, &
     BANK3 {D.OBJ} &
     BANKAREA (0x8000–0xFFFF) &
     SEGMENTS ( &
              IDATA(I:0x00-I:0xFF), &
              CODE(C:0x0000-C:0xEFFF), &
              XDATA(X:0x0000-X:0xEFFF) &
              )

Note

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

arm-logo-small

Keil logo
Important information

This site uses cookies to store information on your computer. By continuing to use our site, you consent to our cookies.