Table 1.2 (continued )
while (1)
{
/* <- set profile point on this line */
for (i BUF_SIZE À 1; i > 0; iÀÀ)
{
j BUF_SIZE À 1 À i;
out_buffer[j] 0;
in_buffer[j] 0;
}
for (i BUF_SIZE À 1; i > 0; iÀÀ)
{
j BUF_SIZE À 1 À i;
in_buffer[i] sineTable[i]; /* <- set breakpoint */
in_buffer[i] 0 À in_buffer[i];
out_buffer[j] Gain*in_buffer[i];
}
}
/* <- set probe and profile points on this line */
}
pre-calculated sinewave values from a table, negates, and stores the values in a
reversed order to an output buffer. Note that the program exp1.c is included in
the experimental software package.
However, it is recommended that we create this program with the editor to get
familiar with the CCS editing functions.
4. Create a linker command file for the simulator:
± Choose File3New to create another new file and type in the linker
command file listed in Table 1.3 (or copy the file exp1.cmd from the experi-
mental software package). Save this file as exp1.cmd to A:\Experiment1.
Linker uses a command file to map different program segments into a pre-
partitioned system memory space. A detailed description on how to define and
use the linker command file will be presented in Chapter 2.
5. Setting up the project:
± After exp1.c and exp1.cmd are created, add them to the project by
choosing Project3Add Files, and select files exp1.c and exp1.cmd from
A:\Experiment1.
± Before building a project, the search paths should be set up for the C
compiler, assembler, and linker. To set up options for the C compiler,
assembler, and linker, choose Project3Options. The paths for the C55x
tools should be set up during the CCS installation process. We will need to add
search paths in order to include files and libraries that are not included in the
C55x tools directories, such as the libraries and included files we have created in
EXPERIMENTS USING CODE COMPOSER STUDIO
23