![Texas Instruments TMS320C2x User Manual Download Page 126](http://html1.mh-extra.com/html/texas-instruments/tms320c2x/tms320c2x_user-manual_1097073126.webp)
Memory Model
6-3
Run-Time Environment
6.1.1 Sections
The compiler produces relocatable blocks of code and data called
sections
.
The sections can be allocated into memory in a variety of ways to conform to
a variety of system configurations. For more information about COFF sections,
see the introductory COFF information in the
TMS320C1x/C2x/C2xx/C5x
Assembly Language Tools User’s Guide
.
The TMS320C2x/C2xx/C5x compiler creates the following types of sections:
-
Initialized sections
contain data tables or executable code. The C
compiler creates the following initialized sections:
J
The
.
text section
contains all the executable code as well as floating-
point constants.
J
The
.cinit section
contains tables for initializing variables and
constants.
J
The
.const section
contains string constants, and the declaration
and initialization of global and static variables (qualified by
const
) that
are explicitly initialized.
J
The
.switch section
contains tables for switch statements.
-
Uninitialized sections
reserve space in memory (usually RAM). A
program can use this space at run time for creating and storing variables.
The compiler creates the following uninitialized sections:
J
The
.bss section
reserves space for global and static variables.
When you specify the
−
c linker option, at program startup time, the C
boot routine copies data out of the .cinit section (which can be in ROM)
and stores it in the .bss section.
J
The
.stack section
allocates memory for the C system stack. This
memory passes arguments to functions and to allocates space for
local variables.
J
The
.sysmem section
reserves space for dynamic memory alloca-
tion. The reserved space is utilized by calloc, malloc, and realloc func-
tions. If a C program does not use these functions, the compiler does
not create the .sysmem section.
The assembler creates the default sections .text, .bss, and .data. The C
compiler, however, does not use the .data section. You can instruct the com-
piler to create additional sections by using the CODE_SECTION and
DATA_SECTION pragmas (see sections 5.4.1,
The CODE_SECTION
Pragma
The DATA_SECTION Pragma
Summary of Contents for TMS320C2x
Page 8: ...viii...
Page 69: ...2 47 C Compiler Description...
Page 159: ...6 36...
Page 226: ...8 6...