Digital Signal Processing Reference
In-Depth Information
two projects that utilize the EMIF 80-pin connector on the DSK, which starts at
address 0xA0000000 , to interface to external LEDs and LCDs.
Linker options include -heap size to specify the heap size in bytes for dynamic
memory allocation (default is 1 kB) and the option -stack size to specify the C
system stack size in bytes. Other linker options can be found in Ref. 26.
The linker allocates the program in memory using a default location algorithm.
It places the various sections into appropriate memory locations, where code and
data reside. By using a linker command file with extension .cmd , one can customize
the allocation process, specifying MEMORY and SECTIONS directives within the
linker command file. The linker directive MEMORY (uppercase) defines a memory
model and designates the origin and length of various available memory spaces. The
directive SECTIONS (uppercase) allocate the output sections into defined memory
and designate the various code sections to available memory spaces.
Most of the examples in the topic invoke internal memory. The generic sample
linker command file, shown in Figure 1.16, can be used for almost all of the exam-
ples in the topic, even if neither external nor flash memory is utilized.
1.8 COMPILER/ASSEMBLER/LINKER SHELL
In previous examples the code generation tools for compiling, assembling, and
linking were invoked within CCS while building a project. The tools may also be
invoked directly outside CCS using a DOS shell.
1.8.1 Compiler
The compiler shell can be invoked using
cl6x [options] [files]
to compile and assemble files that can be C files with extension .c , assembly files
with extension .asm , and linear assembly (introduced in Chapter 3) with extension
.sa . A linear assembly program file is a cross between C and assembly that can
provide a compromise between the more versatile C program and the most efficient
assembly program. For example, the command
Cl6x -gks -o3 file1.c, file2, file3.asm, file4.sa
invokes the C compiler to compile file1 and file2 (defaults to extension .c ) and
generates the assembly files file1.asm and file2.asm . This also invokes the
assembler optimizer to optimize file4.sa and create file4.asm . Then the assem-
bler (invoked with the shell command cl6x ) assembles the four assembly source
files and creates the four object files file1.obj ,..., file4.obj . The option
-gs adds debugger-specific information for debugging purposes and interlists C
Search WWH ::




Custom Search