Appendix C
Introduction of
C Programming for
DSP Applications
C has become the language of choice for many DSP software developments not only
because of its powerful commands and data structures but also because of its portability
to migrate between DSP platforms and devices. In this appendix, we will cover some of
the important features of C for DSP applications.
The processes of compilation, linking/loading, and execution of C programs differ
slightly among operating environments. To illustrate the process we use a general UNIX
system C compiler shown in Figure C.1 as an example. C compiler translates high-level
C programs into machine language that can be executed by computers or DSP proces-
sors such as the TMS320C55x. The fact that C compilers are available for a wide range
of computer platforms and DSP processors makes C programming the most portable
software for DSP applications. Many C programming environments include debugger
programs, which are useful for identifying errors in source programs. Debugger pro-
grams allow us to see values stored in variables at different points in a program and to
step through the program line by line.
The purpose of DSP programming is to manipulate digital signals for a specific signal
processing application. To achieve this goal, DSP programs must be able to organize
the variables (different data types), describe the actions (operators), control the oper-
ations (program flow), and move data back and forth between the outside world and the
program (input/output). This appendix provides a brief overview of the elements
required for efficient programming of DSP algorithms in C language and introduces
fundamental C programming concepts using C examples, but does not attempt to
cover all the elements in detail. C programming language used throughout this book
is conformed to the ANSI C standard (American National Standard Institute C
Standard).
Real-Time Digital Signal Processing. Sen M Kuo, Bob H Lee
Copyright # 2001 John Wiley & Sons Ltd
ISBNs: 0-470-84137-0 (Hardback); 0-470-84534-1 (Electronic)