Digital Signal Processing Reference
In-Depth Information
-l
] must be used when linking. The object file
prog1.obj
is linked with the library
file(s) and creates the executable file
prog1.out
. Without the
-o
option, the exe-
cutable file
a.out
(by default) is created.
The linker can also be invoked with the compiler shell command with the
-z
option
Cl6x -gks -o3 prog1.c prog2.asm -z -o prog.out -m prog.map
-l rts6700.lib
to create the executable file
prog.out
. The
-m
option creates a map file that pro-
vides a list of all the addresses of sections, symbols, and labels that can be useful for
debugging.
The linker also links automatically a
boot
program when using C programs to
initialize the run-time environment, setting the entry point to
c_int00
. The symbol
_c_int00
is defined automatically when the linker option
-c
(or
-cr
) is invoked.
The function
_c_int00
, included in the run-time support library, is the entry point
in the
boot
program that sets up the stack and calls
main
. The run-time library
support program
boot.c
is used to auto-initialize variables. The linker option
-c
invokes the initialization process with
boot.c
. Note that it is defined in the vector
files
vectors_intr.asm
and
vectors_poll.asm
.
The topic CD contains all the main source files used in this topic, located in sep-
arate folders, and some support files necessary for many examples and projects are
located in the folder
support
. Other needed support files are included with CCS
within
c:\C6713
.
1.9 ASSIGNMENTS
1.
Write a program to generate a cosine with a frequency of 666.66 Hz. Verify
your output result using LINE OUT, as well as plotting the generated cosine
in both time and frequency domains.
2.
Write a polling-based program so that once dip switch #3 is pressed, LED #3
turns on and a 666.66 Hz cosine is generated for approximately 5 seconds.
[
Hint
: also use (incorporate) the delay associated with turning a LED on.]
3.
Write a program to multiply two arrays, each containing the five numbers 1,
2, 3, 4, and 5 (i.e., 1
2
5
2
). Verify your result using a watch window
and printing it within CCS in the Build window.
4.
Write an interrupt-driven program to capture an input sinusoidal signal of
amplitude 3 V p-p and a frequency of 1 kHz, and output that sampled signal
every 0.0625 ms. Use the function
input_sample
in a similar fashion as the
function
output_sample
used in Examples 1.1 and 1.2—for example,
+
2
2
+
3
2
+
4
2
+
input
=
input_sample();
Search WWH ::
Custom Search