|
|||||||||||
Technical Support Support Resources
Product Information |
C51: Default Startup and Initialization CodeInformation in this article applies to:
QUESTIONI've compiled and linked my 8051 program. I noticed that there is some startup code and variable initialization code that's included in my program. Where did it come from? ANSWERThe startup code is stored in the STARTUP.A51 file (found in the \C51\LIB directory). The initialization code is stored in the INIT.A51 file (also found in the \C51\LIB directory). These 2 files are executed before your main C function. Immediately after RESET, STARTUP is executed. STARTUP calls INIT which initializes your programs global variables. INIT then calls the main C function. These 2 files are assembled and included in the Keil C library. If you do not copy and modify the STARTUP and INIT files and include them in your project, the linker automatically includes the default ones from the library. SEE ALSOLast Reviewed: Thursday, February 25, 2021 | ||||||||||
|
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.