
Invoking the Tools Individually
2-39
C Compiler Description
2.9 Invoking the Tools Individually
The TMS320C2x/C2xx/C5x C compiler offers you the versatility of invoking all
of the tools at once using dspcl, or invoking each tool individually. To satisfy
a variety of applications, you can invoke the compiler (parser, optimizer, and
code generator), the assembler, and the linker as individual programs. This
section also describes how to invoke the interlist utility outside dspcl.
-
The
compiler
is composed of
three distinct programs: the parser, the opti-
mizer, and the code generator.
Figure 2
−
2. Compiler Overview
C Source
File (.c)
.if File
.opt File
.asm File
Parser
Optimizer
Code
Generator
The input for the
parser
is a C source file. The parser reads the source file,
checks for syntax and semantic errors, and writes out an internal
representation of the program called an intermediate file. Section 2.9.1,
Invoking the Parser
, on page 2-40 describes how to run the parser. The
parser, in addition, can be run in two passes: the first pass preprocesses
the code, and the second pass parses the code.
The
optimizer
is an optional pass that runs between the parser and the
code generator. The input is the intermediate file (.if) produced by the
parser. When you run the optimizer, you choose the level of optimization.
The optimizer performs the optimizations on the intermediate file and pro-
duces a highly efficient version of the file in the same intermediate file
format. Chapter 3,
Optimizing Your Code
, describes the optimizer.
The input for the
code generator
is the intermediate file produced by the
parser (.if) or the optimizer (.opt). The code generator produces an
assembly language source file. Section 2.9.4,
Invoking the Code Genera-
tor,
on page 2-44, describes how to run the code generator.
-
The input for the
assembler
is the assembly language file produced by
the code generator. The assembler produces a COFF object file. The
assembler is described fully in the
TMS320C1x/C2x/C2xx/C5x Assembly
Language Tools User’s Guide.
Содержание TMS320C2x
Страница 8: ...viii...
Страница 69: ...2 47 C Compiler Description...
Страница 159: ...6 36...
Страница 226: ...8 6...
Страница 250: ...Index Index 14 Z z shell option 2 2 2 4 2 14 overriding with c option 4 5 overriding with n option 2 13...