BL51 User's Guide

Code Banking Example

A code banking application with the following memory map:

Memory
Area
Address
Range
Usage
On-Chip RAMI:0x00–I:0xFFRegisters, bits, variables, stack, and so on.
XDATA RAMX:0x0000–X:0xEFFFVariables too large for on-chip RAM.
CODE ROM
(common area)
C:0x0000–C:0x7FFFProgram code and constants.
CODE ROM
(code banks)
B0:0x8000–B3:0xFFFFProgram code and constants.

requires the following linker command line:

BL51 BANK0 {A.OBJ}, &
     BANK1 {B.OBJ}, &
     BANK2 {C.OBJ}, &
     BANK3 {D.OBJ} &
     BANKAREA (0x8000–0xFFFF) &
     RAMSIZE(256) &
     XDATA (0x0000-0xEFFF)