|
|||||||||||
|
Technical Support Support Resources
Product Information |
C51: Reset Vector Does Not Jump to C CodeInformation in this article applies to:
QUESTIONI have noticed that the Reset vector jumps to some assembler code, yet my project is entirely written in C. What is this assembler code? Is it junk? ANSWERThe reset vector jumps to the startup code (which initializes the stack pointer among other things) which is written in assembler. The startup code calls the main function. If you step through this code in µVision Debugger, you should see that eventually your main function is called. The startup code may be found in the file \LIB\STARTUP.A51 in your C51 installation. Also, if you have some global or other static variables that are initialized when declared, then the code in the file \LIB\INIT.A51 will be called before the main function to initialize these variables. These files are included automatically when using C. If you look at the address that the reset vector jumps to, you should see that it matches the start address of the ?C_C51STARTUP segment in the .m51 file. For example, below the start address is 0737H:
MORE INFORMATION
Last 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.