Digital Signal Processing Reference
In-Depth Information
Step 4: Adding Files to a Project
•
Select
Project > Add Files to Project
.
•
Open the
initializemem.asm
file from your project folder. This file
should now be under the
Source
folder in the
Project View
window.
•
Repeat the above instruction for the
main.c
and
Lab1.cmd
files.
We must also add the run-time support library for the board, since we have
a C program. Add the file located at
c:\ti\c6000\cgtools\lib\rts6701.lib
.
This file should now appear under the
Libraries
folder in the
Project View
window.
Step 5: Creating the executable file, lab1.out
Before we compile, assemble, and link, there are a number of options we
can choose to determine the amount of optimization to be done. There are
four levels (Opt Levels) of optimization: 0, 1, 2, and 3. The lowest level is 0.
However, sometimes, debugging cannot be done when we use optimization.
•
Select
Project > Build Options
.
•
Select
Compiler
and in the
Category
column, click on
Basic
. Check
that
Target Version
is 671x and
Opt Level
is None.
•
Similarly, select
Linker
and then
Basic
. You can change the name of
the executable file that will be produced. Change the output file
name to
Lab1.out
.
•
Project > Rebuild All
compiles, assembles, and links all of the files
in the project and produces the executable file
lab1.out
. A window
at the bottom shows if there are errors.
•
Project > Build
can be used when you have made a change to only
a few files and now wish to compile, assemble, and link with the
changed files. There are shortcut buttons on the window to do
Project Build
and
Rebuild
.
Upon building, there should have been a lot of errors. Scroll up until you
reach the first red line with
error!
in it. Double click on the line. The file
initializemem.asm
opens at the line where the error occurred. Assembly
code requires that all of the lines in the assembly file
not
start in the first
column. So enter a space at the beginning of each line in the file and then
save the file. Since we didn't change every file in the project, we can do a
Project
>
Build
.
Step 6: Running the Program
In order to run the program, we need to load the program into the DSP
memory.