Keil Logo


Information in this article applies to:

  • C51 Version 5.50a
  • C51 Version 6.00 Beta
  • C51 Version 6.00


I'm creating a project that is made up of C and assembly files. Do I need to use the STARTUP.A51 file that you provide, or can I use my own version?


We strongly urge you to use the STARTUP.A51 file that we provide as the basis for your startup routines. The Keil startup code performs the following operations:

  • Clears DATA and optionally PDATA and XDATA memory,
  • Sets up the reentrant stacks (if necessary)),
  • Initializes C Global Variables (see INIT.A51),
  • Sets the Stack Pointer (SP),
  • Jumps to your MAIN C function.

Your startup code must do all of these. If it doesn't, you may encounter run-time problems that are difficult to debug and diagnose.

Note that if you do include some form of a startup file, Keil will automatically include a start up file that is in the Keil library.



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

Last Reviewed: Tuesday, July 19, 2005

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