Creating a Linker Command File
Following is a list of the sections that are created by the compiler. Along with their description,
we provide the Section Name defined by the compiler.
Compiler Section Names
Compiler Section Names
Name
Name
Description
Description
Link Location
Link Location
.text
.text
code
code
program
program
.
.
cinit
cinit
initialized global and static variables program
initialized global and static variables program
.
.
econst
econst
constant data (e.g. const
constant data (e.g. const
int
int
k = 3;) data
k = 3;) data
.switch
.switch
tables for switch statements
tables for switch statements
prog
prog
/low 64K data
/low 64K data
.
.
pinit
pinit
tables for global constructors (C++)
tables for global constructors (C++)
program
program
Name
Name
Description
Description
Link Location
Link Location
.
.
ebss
ebss
global & static variables
global & static variables
data
data
.stack stack space
.stack stack space
low 64K data
low 64K data
.
.
esysmem
esysmem
memory for far
memory for far
malloc
malloc
functions
functions
data
data
Initialized Sections
Initialized Sections
Uninitialized
Uninitialized
Sections
Sections
Sections of a C program must be located in different memories in your
target system
. This is the
big advantage of creating the separate sections for code, constants, and variables. In this way,
they can all be linked (located) into their proper memory locations in your target embedded
system. Generally, they’re located as follows:
Program Code (.text)
Program code consists of the sequence of instructions used to manipulate data, initialize system
settings, etc. Program code must be defined upon system reset (power turn-on). Due to this basic
system constraint it is usually necessary to place program code into non-volatile memory, such as
FLASH or EPROM.
Constants (.cinit – initialized data)
Initialized data are those data memory locations defined at reset.It contains constants or initial
values for variables. Similar to program code, constant data is expected to be valid upon reset of
the system. It is often found in FLASH or EPROM (non-volatile memory).
Variables (.ebss – uninitialized data)
Uninitialized data memory locations can be changed and manipulated by the program code during
runtime execution. Unlike program code or constants, uninitialized data or variables must reside
in volatile memory, such as RAM. These memories can be modified and updated, supporting the
way variables are used in math formulas, high-level languages, etc. Each variable must be
declared with a directive to reserve memory to contain its value. By their nature, no value is
assigned, instead they are loaded at runtime by the program
2 - 10
C28x - Programming Development Environment
Summary of Contents for C28 Series
Page 64: ...Summary 3 16 C28x Peripheral Registers Header Files ...
Page 78: ...Interrupt Sources 4 14 C28x Reset and Interrupts ...
Page 218: ...Lab 9 DSP BIOS 9 22 C28x Using DSP BIOS ...
Page 244: ...Lab 10 Programming the Flash 10 26 C28x System Design ...
Page 273: ...Appendix A eZdsp F2812 C28x Appendix A eZdsp F2812 A 1 ...
Page 276: ...Appendix P2 Expansion Interface A 4 C28x Appendix A eZdsp F2812 ...
Page 277: ...Appendix P4 P8 P7 I O Interface C28x Appendix A eZdsp F2812 A 5 ...
Page 278: ...Appendix A 6 C28x Appendix A eZdsp F2812 ...
Page 279: ...Appendix P5 P9 Analog Interface C28x Appendix A eZdsp F2812 A 7 ...
Page 282: ...Appendix A 10 C28x Appendix A eZdsp F2812 TP1 TP2 Test Points ...