This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

请问 C-environment initialization routine 的作用是什么?

请问在C2000 中启动后程序跳转到 C-environment initialization  routine 的作用是什么?有什么详细说明的资料么?

  • 您可以看一下

    www.ti.com/.../spra958l.pdf

    In general, the branch instruction will branch to the start of the C-environment initialization routine located in the C-compiler runtime support library. The entry symbol for this routine is _c_int00.

    The C-environment initialization function in the C compiler runtime support library, _c_int00, performs the initialization of global and static variables. This involves a data copy from the .cinit section (located in on-chip flash memory) to the .ebss section (located in RAM) for each initialized global variable.

    C程序开始运行时,需要通过 _c_int00初始化C运行环境。_c_int00 是c语言程序的入口。首先上电后,系统执行reset矢量代码,这段程序为c语言运行作准备,之后就转到c语言的main()。

    _c_int00函数在运行支持库(rts,runtime-support library)中。链接器会将这个函数的入口地址放置在复位中断向量处,使其可以在初始化时被调用。