Keil Logo

Segment Naming Conventions

Objects generated by the C251 Compiler (program code, program data, and constant data) are stored in segments which are units of code or data memory. A segment may be relocatable or may be absolute. Each relocatable segment has a type and a name. This section describes the conventions used by the C251 Compiler for naming these segments.

Segment names include a module_name which is the name of the source file in which the object is declared. In order to accommodate a wide variety of existing software and hardware tools, all segment names are converted and stored in uppercase.

Each segment name has a prefix that corresponds to the memory type used for the segment. The prefix is enclosed in question marks (?). The following is a list of the standard segment name prefixes:

?PR? CODE or ECODE program Executable program code
?CO? CODE code Constant data in program memory
?BI? BIT bit Bit data in internal data memory
?BA? BDATA bdata Bit-addressable data in internal data memory
?DT? DATA data Internal data memory with 8-bit addressing
?ED? EDATA near Variables with 16-bit addressing
?EA? EBDATA ebdata Extended 251 bit-addressable variables
?EB? EBIT bit ebdata Extended 251 bits
?FD? HDATA far Far memory (RAM space)
?FC? HCONST const far Far memory (constant ROM space)
?HD? HDATA huge Huge variables (no size limitation)
?HC? HCONST const huge Huge constants (no size limitation)
?ID? IDATA idata Indirectly addressable internal data memory
?NC? NCONST const near Constants with 16-bit addressing
?PD? PDATA pdata Paged data in external data memory
?XD? XDATA xdata Xdata memory (RAM space)
?XC? XDATA const xdata Xdata memory (constant ROM space)
  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.