EasyManuals Logo
Home>Texas Instruments>Computer Hardware>TMS34010

Texas Instruments TMS34010 Reference Guide

Texas Instruments TMS34010
181 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Page #51 background imageLoading...
Page #51 background image
Runtime
Environment
-
Memory
Model
5.1
Memory
Model
TMS34010
C treats memory
as
a single linear block that is partitioned into
subblocks
of
code and data.
Each
block
of
memory generated
by
a C program
will
be
placed into a contiguous block in the appropriate memory space.
Note that the
linker,
not
the compiler, defines the memory map and allocates
code and data into target memory. The compiler assumes
nothing
about the
types
of
memory that
are
available, about any locations that
are
not
available
(holes),
or
about any locations that
are
reserved for
I/O
or
control purposes.
The
compiler produces relocatable code,
which
allows the linker
to
allocate
code and data into the appropriate memory spaces.
Each
block
of
code and
data
could be allocated individually into memory,
but
this
is
not
a general
practice (an exception
to
this
is
memory-mapped
I/O,
although physical me-
mory
locations can
be
accessed
with
C pointer types).
5.1.1
Sections
5-2
The compiler produces three relocatable blocks
of
code and data; these blocks,
called
sections,
can be allocated into memory in a variety
of
ways,
to
conform
to
a variety
of
system configurations. For more information about sections,
please read Section 3 (Introduction to Common Object File Format)
of
the
TMS34010 Assembly Language Tools User's Guide.
There
are
two
basic types
of
sections:
Initialized
sections
contain data or executable code.
Uninitialized
sections
reserve space in memory (usually
RAM).
A
program can use this space at run time for creating and storing
variables.
The C compiler creates
two
initialized sections, .text and .cinit;
it
creates one
uninitialized section, .bss.
The
.text
section
is
an
initialized section that contains all the executa-
ble code
as
well
as
string literals and
floating-point
constants.
The
.cinit
section
is
an
initialized section that contains tables for
ini-
tializing variab,les and constants.
The
.bss
section
is
an
uninitialized section; in a C program,
it
serves
three purposes:
It
reserves space for global and static variables.
At
boot
time, the
C
boot
routines copies data
out
of
the .cinit section
(which
may
be in
ROM) and uses
it
for
initializing variables in .bss.
It reserves space for the system stack and the program stack.
It
reserves space for use
by
the dynamic memory functions (malloc,
calloc,
and realloc).
Note that the assembler creates
an
additional section called .data; the C envi-
ronment does
not
use this section. The linker takes the individual sections
from different
modules and combines sections
with
the same name
to
create
four
output
sections. The complete program
is
made
up
of
the compiler's
three
output
sections plus the assembler's .data section. You can place these
output
sections anywhere in the address space,
as
needed,
to
meet system

Table of Contents

Other manuals for Texas Instruments TMS34010

Questions and Answers:

Question and Answer IconNeed help?

Do you have a question about the Texas Instruments TMS34010 and is the answer not in the manual?

Texas Instruments TMS34010 Specifications

General IconGeneral
BrandTexas Instruments
ModelTMS34010
CategoryComputer Hardware
LanguageEnglish

Related product manuals