Keil Logo

C51: CONTENTS OF THE ?C_INITSEG SEGMENT


Information in this article applies to:

  • C51 any Version
  • CX51 any Version

QUESTION

What is the content of segment ?C_INITSEG? In the linker MAP file I have found a segment named ?C_INITSEG. Why is this segment generated and what is the use of this segment?

ANSWER

The ?C_INITSEG segment contains variable initialization information for variables in the memory areas data, idata, pdata, xdata, and far. Entries in this segment are generated when you write C statements like:

  int i = 0x1000;

  void main (void)  {
  }

The contents of the ?C_INITSEG table is used in the INIT.A51 code that runs after the STARTUP.A51 code.

Variable initializations for the memory areas code and far const are directly inserted into the ROM image and do not require an entry in the ?C_INITSEG segment. The same is true for the memory type xdata when you are using the XCROM directive. XCROM directs the compiler to store const xdata variables directly in ROM and suppresses the initialization table entry.

MORE INFORMATION

SEE ALSO

Last Reviewed: Friday, July 15, 2005


Did this article provide the answer you needed?
 
Yes
No
Not Sure
 
  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.