Memory Model
6-2
6.1 Memory Model
The TMS320C2x/C2xx/C5x C compiler treats memory as two linear blocks of
program memory and data memory:
-
Program memory
contains executable code.
-
Data memory
contains external variables, static variables, and the
system stack.
Each block of code or data generated by a C program is placed into a contig-
uous block in the appropriate memory space.
Note: The Linker Defines the Memory Map
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 available, about any locations not available for code or data (holes),
or about any locations reserved for I/O or control purposes. The compiler
produces relocatable code that allows the linker to allocate code and data
into the appropriate memory spaces.
For example, you can use the linker to allocate global variables into fast
internal RAM or to allocate executable code into internal ROM. You can allo-
cate each block of code or data individually into memory, but this is not a
general practice (an exception to this is memory-mapped I/O, although you
can access physical memory locations with C pointer types).
Summary of Contents for TMS320C2x
Page 8: ...viii...
Page 69: ...2 47 C Compiler Description...
Page 159: ...6 36...
Page 226: ...8 6...