This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Help in keil uvision4

Note: This was originally posted on 15th August 2010 at http://forums.arm.com

hii.
can some tell me in keil uvision4 why startup code is required..help plz
Parents
  • Note: This was originally posted on 17th August 2010 at http://forums.arm.com

    Your question should be : "why processors need startup code?"
    This is not limited to Keil MDK, it is common requirement for most processors.

    In order to run a compiled C program, the stack pointers and data used by the C libraries need to be setup.
    This cannot be done easily in standard C (ISO C) language. (Not impossible, but require compiler specific features).
    In addition, some processors need to have a vector table for define interrupt/exception handlers.

    There are different ways to create these information. In ARM processors startup code is used.
    Keil MDK provides default startup code (in assembler) for most ARM microcontrollers, and it can be added to you project during project creation wizard. In other toolchains for ARM microcontrollers the startup code could be in C, or can be hidden from users (e.g. CS3 in CodeSourcery g++).
Reply
  • Note: This was originally posted on 17th August 2010 at http://forums.arm.com

    Your question should be : "why processors need startup code?"
    This is not limited to Keil MDK, it is common requirement for most processors.

    In order to run a compiled C program, the stack pointers and data used by the C libraries need to be setup.
    This cannot be done easily in standard C (ISO C) language. (Not impossible, but require compiler specific features).
    In addition, some processors need to have a vector table for define interrupt/exception handlers.

    There are different ways to create these information. In ARM processors startup code is used.
    Keil MDK provides default startup code (in assembler) for most ARM microcontrollers, and it can be added to you project during project creation wizard. In other toolchains for ARM microcontrollers the startup code could be in C, or can be hidden from users (e.g. CS3 in CodeSourcery g++).
Children
No data