Keil Logo

Segment Types

The C251 compiler generates four different formats for segment names. The format depends on the information contained in the segment:

  • Static segments contain data and const variables which are defined at file level of the C module or inside a C function as static or const. Segments of these type have the format ?prefix?module. Also program code segments use this format, if you apply the C251 directive ROM (HUGE) or ROM (MEDIUM).
  • Overlayable segments are used in non-reentrant code and hold data variables which are declared inside a C function. These segments are typically overlaid during link time and use the format ?prefix?function?module. This is also the default format for program code segments.
  • Absolute segments are used for variable or function declarations with the _at_ keyword and have the format ?prefix?AT_address?module. For xdata and code segments the format is ?prefix?OF_address?module, since these segments represent offsets to the memory class base address. address refers to the absolute address specified in the C source file.
  • Code for interrupt vectors is store in segments with the format ?PR?IV?n whereby n represents the interrupt number of the function.
  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.