We know that after the DSP starts, the system will enter the reset interrupt, at this time the Reset interrupt service function is c_init00, this function is used to establish the C environment, to enter the main () function for system initialization, the main work is to build the stack, initialize the global variables and so on.
Initialization of global variables: If the program is linked with the-C option, the compiled linked executable will place the initialization of the global variable in the c_init00 () function, which will call the _auto_init (cinit) function. Copy the contents of the. Cinit segment into the. BSS in the corresponding variable, this procedure is performed before the system is power-up into the main () function.
If the program uses the-CR option at link time, the global variables in the compiled executable program need to be initialized with loader, which is typically used when JTAG debugging is loader.