Keil Logo

Memory Classes

A class is an arbitrarily ordered collection of segments that share a common attribute. The purpose of a class is to allow manipulation of a number of segments using only the class name. For instance, the code objects from all modules in a program are combined into the CODE class while the xdata objects are combined into the XDATA class.

You may use the CLASSES linker directive to specify the address range for a class rather than specifying the addresses for each segment individually.

The following default classes are generated automatically by the linker. However, any number of user classes may be created and linked.

Memory
Class
Address
Range
Description
BIT I:20h.0-I:2Fh.7 Bit memory limited to 16 Bytes.
CODE C:0000h-C:0FFFFh Code memory limited to 64 KBytes.
CONST C:0000h-C:0FFFFh Constant data limited to 64 KBytes.
DATA D:00h-D:7Fh Variable data limited to 128 Bytes and accessed using the MOV instructions.
HCONST C:000000h-C:0FFFFFFh Constant data limited to 16 MBytes.
HDATA X:000000h-X:0FFFFFFh Variable data limited to 16 MBytes.
IDATA I:00h-I:0FFh Variable data limited to 256 Bytes and accessed using the MOV @Rx instructions.
XDATA X:0000h-X:0FFFFh Variable data limited to 64 KBytes and accessed using the MOVX instruction.
  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.