Keil Logo

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:0x7FFF Variables too large for on-chip RAM.
ROM C:0x0000–C:0x7FFF
(common area)
Program code and constants.
CODE ROM C:0x000000–C:0x03FFFF
(code banks)
Program code and constants.

requires the following linker command line: 

LX51 BANK0 {A.OBJ},
     BANK1 {B.OBJ},
     BANK2 {C.OBJ},
     BANK3 {D.OBJ}
     BANKAREA (0x8000-0xFFFF)
     CLASSES (
             XDATA  (X:0x0000-X:0x7FFF),
             HCONST (C:0x000000-C:0x03FFFF)
             CODE   (C:0x0000-C:0xFFFF)
             )

There are several Application Notes available that show how to create programs for extended 8051 devices.

  Arm logo
Important information

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

Change Settings

Privacy Policy Update

Arm’s Privacy Policy has been updated. By continuing to use our site, you consent to Arm’s Privacy Policy. Please review our Privacy Policy to learn more about our collection, use and transfers
of your data.