Specifying The Type Of Initialization - Texas Instruments TMS320C2x User Manual

Optimizing c compiler digital signal processor
Hide thumbs Also See for TMS320C2x:
Table of Contents

Advertisement

4.5.2

Specifying the Type of Initialization

Note: The _c_int0 Symbol
One important function contained in the run-time-support library is _c_int0.
The symbol _c_int0 is the starting point in boot.obj; if you use the −c or −cr
linker option, _c_int0 is automatically defined as the entry point for the
program. If your program begins running from reset, you should set up the
reset vector to branch to _c_int0 so that the processor executes boot.obj first.
The boot.obj module contains code and data for initializing the run-time envi-
ronment. The module performs the following tasks:
1) Sets up the stack
2) Processes the run-time initialization table and autoinitializes global
variables (when using the −c option)
3) Calls main
4) Calls exit when main returns
Chapter 7 describes additional run-time-support functions that are included in
the library. These functions include ANSI C standard run-time support.
The C compiler produces data tables for initializing global variables. Section
6.8.3, Initialization Tables, on page 6-33 discusses the format of these tables.
These tables are in a named section called .cinit. The initialization tables are
used in one of the following ways:
Global variables are initialized at run time. Use the −c linker option (see
-
section 6.8.4, Autoinitialization of Variables at Run Time, on page 6-34).
Global variables are initialized at load time. Use the −cr linker option (see
-
section 6.8.5, Initialization of Variables at Load Time, on page 6-35).
Controlling the Linking Process
Linking C Code
4-9

Advertisement

Table of Contents
loading

This manual is also suitable for:

Tms320c2xxTms320c5x

Table of Contents