Keil™, An ARM® Company

LX51 User's Guide

Code Banking

Code banking (or bank switching) is a technique that enables programs access to more memory space than the MCU can actually address. Most aspects of banking switching are managed by the Keil linker and require few changes to your software development style.

There are several steps required for creating a code banking program.

  1. Determine and specify (to the linker) the size and starting address of the bank area.
  2. Copy the code banking configuration file to your project folder and edit its parameters to match your target hardware.
  3. Determine which program modules are to be located into which bank and specify this information on the linker command line.
  4. Determine which (if any) segments must be located into a specific code bank and specify this on the linker command line.