Keil Logo

C51: PURPOSE OF THE INIT.A51 FILE


Information in this article applies to:

  • C51 all Versions

QUESTION

I have noticed that the INIT.A51 file is included in my projects. What is it used for and can I remove or edit it?

ANSWER

The INIT.A51 file includes code that initializes global variables before the main() C function is called. The initial values are copied from constants in code memory.

All C segments make calls to this code. We strongly recommend you do not edit this file.

If you do include the STARTUP.A51 and INIT.A51 files in your project, they must be the last two files linked. The INIT.A51 file should be the last file of your project.

If you use the command line linker, STARTUP.OBJ and INIT.OBJ must be the last two files in the object file list.

If you use the µVision or µVision IDE, these files must be the last two files in the project list.

SEE ALSO

FORUM THREADS

The following Discussion Forum threads may provide information related to this topic.

Last Reviewed: Tuesday, June 8, 2004


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.