EasyManuals Logo

Texas Instruments C2000 Workshop Guide And Lab Manual

Texas Instruments C2000
342 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 #30 background imageLoading...
Page #30 background image
Creating a Linker Command File
2 - 12 C2000 Microcontroller Workshop - Programming Development Environment
Creating a Linker Command File
Sections
Looking at a C program, you'll notice it contains both code and different kinds of data (global,
local, etc.). All code consists of different parts called sections. All default section names begin
with a dot and are typically lower case. The compiler has default section names for initialized
and uninitialized sections. For example, x and y are global variables, and they are placed in the
section .ebss. Whereas 2 and 7 are initialized values, and they are placed in the section called
.cinit. The local variables are in a section .stack, and the code is placed in a section called .txt.
Sections
All code consists of
different parts called
sections
All default section
names begin with “.”
The compiler has
default section names
for initialized and
uninitialized sections
int x = 2;
int y = 7;
void main(void)
{
long z;
z = x + y;
}
Global vars (.ebss)
Init values (.cinit)
Local vars (.stack) Code (.text)
In the TI code-generation tools (as with any toolset based on the COFF – Common Object File
Format), these various parts of a program are called Sections. Breaking the program code and
data into various sections provides flexibility since it allows you to place code sections in ROM
and variables in RAM. The preceding diagram illustrated four sections:
Global Variables
Initial Values for global variables
Local Variables (i.e. the stack)
Code (the actual instructions)

Table of Contents

Other manuals for Texas Instruments C2000

Questions and Answers:

Question and Answer IconNeed help?

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

Texas Instruments C2000 Specifications

General IconGeneral
BrandTexas Instruments
ModelC2000
CategoryMicrocontrollers
LanguageEnglish

Related product manuals