Vous êtes sur la page 1sur 9

International Journal of Electrical

Engineering
Technology (IJEET),
ISSN 0976 6545(Print),
INTERNATIONAL
JOURNAL
OFand
ELECTRICAL
ENGINEERING
&
ISSN 0976 6553(Online) Volume 5, Issue 11, November (2014), pp. 01-09 IAEME
TECHNOLOGY (IJEET)
ISSN 0976 6545(Print)
ISSN 0976 6553(Online)
Volume 5, Issue 11, November (2014), pp. 01-09
IAEME: www.iaeme.com/IJEET.asp
Journal Impact Factor (2014): 6.8310 (Calculated by GISI)
www.jifactor.com

IJEET
IAEME

APPLICATION OF CODE COMPOSER STUDIO IN


DIGITAL SIGNAL PROCESSING
1

M. Mohanty,

Dr. M. Basu,

Dr. D.N. Pattanayak

Dept.of ETC, Gandhi Engineering College, Madanpur, Bhubaneswar, Odisha, India


Dept.of Power Engg, Jadavpur University, Saltlake campus, Kolkata, WestBengal, India
Dept. of EEE, Trident Academy of Technology, Infocity Area, Patia, Bhubaneswar, Odisha, India

ABSTRACT
The Code Composer Studio (CCS) generates a program in the TIs software development
environment. The CCS speeds and enhances the development for creating and testing real-time
embedded signal processing applications. It provides tools for configuring, building, debugging,
tracing and analyzing programs which make it to become the worlds most powerful Digital Signal
Processor (DSP)-integrated development tool, where each element is designed to simplify the DSP
programming.
Keywords: CCS, DSP.
INTRODUCTION
There are some enhanced features available in the Code Composer Studio such as Program
Code Editing, Application Building, and Application Debugging Features. The Program Code
Editing Feature of the CCS allows editing C and Assembly language program. The Application
Building Feature of the CCS shows the basic process used to create, build, debug, and test the
programs on the target DSP board. The CCS provides debugging features like loading data, FILE
I/O, watch window, graphing signals, setting up of Break points and usage of probe points, viewing
disassembled and C instructions in the DSP simulator are coming under the Application Debugging
Feature.
The Code Composer Studio is used to write the necessary program in high level languages
like C and C++ which saves valuable time in the design process. The C and C++ code can be compiled
as well as built to generate the desired downloadable file. The corresponding project keeps the track
of all the information like, Filenames of the source code and object libraries, Compiler, Assembler,
and Linker options including file dependencies.

International Journal of Electrical Engineering and Technology (IJEET), ISSN 0976 6545(Print),
ISSN 0976 6553(Online) Volume 5, Issue 11, November (2014), pp. 01-09 IAEME

SOFTWARE DEVELOPMENT TOOL


The TMS320C54x is supported by a set of software development tools, which includes an
optimizing C/C++ compiler, an assembler, a linker, and assorted utilities as shown below.

Figure 1: TMS320C54x Software Development Flow


The shaded portion of the figure highlights the most common path of software development
for C/C++ language programs. The other portions are peripheral functions that enhance the
development process.
The functions of different sections are described below.

The C/C++ compiler accepts the C/C++ source code and produces C54x assembly
language source code. An optimizer and an inter list feature are parts of the compiler.
 The optimizer modifies code to improve the efficiency of C/C++ programs.
 The inter list feature interweaves C/C++ source statements with assembly
language output.

International Journal of Electrical Engineering and Technology (IJEET), ISSN 0976 6545(Print),
ISSN 0976 6553(Online) Volume 5, Issue 11, November (2014), pp. 01-09 IAEME

The assembler translates assembly language source files into machine language object
files. The machine language is based on common object file format (COFF).
The linker combines object files into a single executable object module. As it creates the
executable module, it performs relocation and resolves external references. The linker
accepts re locatable COFF object files and object libraries as input.
The archiver collect a group of files to make a single archive file, called a library. The
archiver also allows modifying a library by deleting, replacing, extracting, or adding
members.
The mnemonic-to-algebraic translator utility converts assembly language source files.
The utility accepts an assembly language source file containing mnemonic instructions
and then it converts the mnemonic instructions into algebraic instructions, producing an
assembly language source file containing algebraic instructions.
The runtime-support libraries contain the ISO standard runtime-support functions,
compiler-utility functions, floating-point arithmetic functions, and C I/O functions,
supported by the C54x compiler.
The C54x debugger accepts executable COFF files as input. The hex conversion utility
converts a COFF object file into TI-Tagged, ASCII-hex, Intel, or Tektronix object format.
The converted file can be downloaded into an EPROM programmer.
The absolute lister accepts linked object files as input and creates .abs files as output.
Without the absolute lister, it would be tedious producing such a listing and require many
manual operations.
The cross-reference lister uses object files to produce a cross-reference listing showing
symbols, their definitions, and their references in the linked source files.

CREATING A NEW PROJECT


Step 1:

First of all, a folder is created called hellobios in the C:\CCStudio\myprojects folder.

Step 2:

Then the contents of C:\CCStudio_v3.1\MyProjects\fri\hellobios are copied to the


new folder.

Step 3:

From the Project menu, New is chosen.

Figure 2: Window to create new project file in Code Composer Studio

International Journal of Electrical Engineering and Technology (IJEET), ISSN 0976 6545(Print),
ISSN 0976 6553(Online) Volume 5, Issue 11, November (2014), pp. 01-09 IAEME

Step 4:

The project name hello is written in the Project Name field.

Step 5:

In the Location field, the working folder which is created in step1 found out by
browsing.

Step 6:

In the Project Type field, Executable (.out) is selected which is an


out file.

Step 7:

In the Target field, the target configuration is selected i.e. TMS320C54XX and at
last Finish is clicked.

In this way, a project file called hello.pjt is created by the Code Composer Studio
Program. This file stores all the project settings and references of other files used by the project.

TM

ADDING FILES TO A PROJECT


Different source code files and libraries which can be added to a project are mentioned below.
.lib This library provides the runtime support for the target DSP chip.
.c This file contains source code that provides the main functionality of this project.
.h This file declares the buffer C-structure as well as defines any required constants.
.pjt This file contains all the project build and configuration options.
.asm This file contains assembly instructions.
.cmd This file maps sections to memory.
The procedures of adding different source code files and libraries to the target project are
described step by step.

At first, from the Project menuAdd Files to Project is selected. Then the corresponding csource file hello.c is selected from the working folder by clicking Open. The files can also be
added to the project by right-clicking on the Project View icon and choosing Add Files to
Project or by dragging and dropping files into folders in the Project View window.
Similarly, the asm source file is added by choosing ProjectAdd Files to Project, where
Asm Source Files (*.a*, *.s*) is selected in the Files of type box and the corresponding file
vectors.asm is selected by clicking Open. Asm files contain assembly instructions needed to
set the RESET interrupt to branch to the programs C entry point, c_int00.
The linker command file which maps sections to memory is also added to the respective
project in the similar fashion as mentioned in the above steps, but here in the Files of type
box, the Linker Command File (*.cmd) is selected like hello.cmd .
The corresponding object and library files can also be added to the project by going to
ProjectAdd Files to Project, where from the compiler library folder the required Object
and Library Files (*.o*, *.l) for the target project are selected in the Files of type box like
rts.lib. This library provides run-time support for the target DSP.
Some header files are also included with the project for example hello.h. This header file can
be viewed by right-clicking on hello.pjt in the Project View window and selecting Scan All
File Dependencies. The hello.h file is under the include folder.
The Project list is expanded by clicking the + signs next to Projects, hello.pjt, Libraries, and
Source. This list is called the Project View.
4

International Journal of Electrical Engineering and Technology (IJEET), ISSN 0976 6545(Print),
ISSN 0976 6553(Online) Volume 5, Issue 11, November (2014), pp. 01-09 IAEME

Figure 3: Different files added to the Project hello.pjt

BUILDING THE PROGRAM


After creating a functional program, it is necessary to build it, for checking the errors. First of
all, the program should be compiled, then build, and at last rebuild. An output window appears to
show the build in process. When the build is completed, the output window will display Build
complete, 0 errors, and 0 warnings.
To build the program, following steps are involved.

During the building of a program, first of all it must be compiled by going to the
Projectcompile file or directly by clicking the compile file toolbar button. It gives the
information about the errors present in the program which is shown in the output window.

International Journal of Electrical Engineering and Technology (IJEET), ISSN 0976 6545(Print),
ISSN 0976 6553(Online) Volume 5, Issue 11, November (2014), pp. 01-09 IAEME

Figure 4: C5416 Device Simulator Window after compilation

After compiling, now its the time to build the program. For that, the ProjectBuild option
can be taken or directly the
(Incremental Build) toolbar button can be selected. Then
either the ProjectRebuild All or the
(Rebuild All) toolbar button is opted for
recompiling, reassembling, and relinking all the files in the project. The information about
this process is displayed in a frame at the bottom of the window.

Figure 5: Display of the Build of the Project

International Journal of Electrical Engineering and Technology (IJEET), ISSN 0976 6545(Print),
ISSN 0976 6553(Online) Volume 5, Issue 11, November (2014), pp. 01-09 IAEME

LOADING THE PROGRAM

After the program has been built successfully, now the program is loaded by choosing the
file load program option. By default, the code composer studio will create a subdirectory
named Debug within the current project directory where the .out file is stored. Now the hello.
Out file is selected and the program is loaded by clicking Open. It should be in the
C:\CCStudio_v3.10\myprojects\fri\ hellobios\Debug\ folder.

Figure 6: Display window for creation of .out File

The program is loaded by the code composer studio onto the target DSP and a Disassembly
window is opened which shows the disassembled instructions that make up the program. A
Stdout tab is opened at the bottom of the window to show any output the program sends to
Stdout.

Figure 7: The output window of CCS


7

International Journal of Electrical Engineering and Technology (IJEET), ISSN 0976 6545(Print),
ISSN 0976 6553(Online) Volume 5, Issue 11, November (2014), pp. 01-09 IAEME

The Debug Run is choosen for running the program or it can also be done directly by
clicking the Run toolbar button.
To quit from running the program, DebugHalt is choosen.

CONCLUSION
The various steps required to develop a program by using the Code Composer Studio (CCS)
has been discussed. The CCS is used to write the necessary C-language and Assembly level program.
It delivers all the host tools and runtime software support for TMS320VC5416 DSP based real-time
embedded applications. As it is very much similar to the high level language C&C++, the complicacy
arises during the writing of the assembly level program by using such a vast instruction sets, can be
avoided. Therefore, the main advantage of selecting this platform for writing the program is its user
friendly features.
REFERENCES

[1]
[2]
[3]
[4]
[5]
[6]
[7]
[8]
[9]
[10]
[11]
[12]
[13]
[14]
[15]

B. Venkataramani, M.Bhaskar, Digital Signal Processors Architecture, Programming and


Applications, Tata McGraw-Hill, New Delhi, India, 2010.
Alan V. Oppenhum, Ronald W. Schafer, Digital Signal Processing, Prentice-Hall of India
Private Limited, New Delhi, India, 1997.
Avtar Singh, Digital Signal Processing Implementation: Using DSP Microprocessors- with
examples from TMS320C54XX, Belmont, CA: Thomson Brooks/Cole, 2004.
TMS320C54x Code Composer Studio Tutorial, Texas Instruments, Texas, 1999.
TMS320C54xx Optimizing C/C++ Compiler Users Guide, Texas Instruments Literature
Number SPRU103G, October, 2002.
Code Composer Studio Getting Started Guide, Texas Instruments Literature Number
SPRU509.
Brian W. Kernighan, Dennis M. Ritchie, The C Programming Language, 2nd ed., PrenticeHall of India Pvt. Ltd., New Delhi, November, 1990.
Leon A. Wortman and Thomas O. Sidebottom, The C Programming Tutor, Prentice-Hall of
India Pvt. Ltd., New Delhi, 1984.
Adam Denning, C At a Glance, Chapman and Hall Ltd/Methuen Inc, New York, 1985.
ISBN No. 0412 27140 0.
TMS320VC5416 Fixed-Point Digital Signal Processor: Data Manual, Literature Number:
SPRS095J, Texas Instruments, March, 1999-Revised April, 2003.
TMS320VC5416 Fixed-Point Digital Signal Processor: Data Manual, Literature Number:
SPRS095J, Texas Instruments, March, 1999-Revised April, 2003.
R.Gaonkar, Microprocessor Architecture, Programming and Application: with 8085/8085A,
5th ed., Prentice-Hall of India Private Limited, New Delhi, India, 2002.
Anokh Singh and A.K.Chhabra, Fundamentals of Digital Electronics and Microprocessors,
S.Chand & Company Limited, New Delhi, India, 2005.
Barry B. Brey, The Intel Microprocessors, 8086/8088, 80186/80188, 80286, 80386, 80486,
Pentium, Pentium Pro Processor, Pentium-II, Pentium-III, Pentium-4, Architecture,
Programming and Interfacing, 8th ed., Prentice-Hall of India Pvt. Ltd., New Delhi, 2008.
Edward R. Dougherty, Llya Shmulevich, Jie Chen, and Z. Jane Wang, Genomic Signal
Processing and Statistics, Volume-2, Hindawi Publishing Corporation, New York, U.S.A,
ISBN 977-5945-07-0, 2005.

International Journal of Electrical Engineering and Technology (IJEET), ISSN 0976 6545(Print),
ISSN 0976 6553(Online) Volume 5, Issue 11, November (2014), pp. 01-09 IAEME

[16] Avtar Singh and S.Srinivasan, Digital Signal Processing Implementations: Using DSP
Microprocessors with examples from TMS320C54x, Thomson Learning, Inc., 2011.

[17] M. Morris Mano, Computer System Architecture, 3rd ed., Prentice Hall of India Private
Limited, 2007.
[18] Adam Denning, C At a Glance, Chapman and Hall Ltd/Methuen Inc, New York, 1985.
ISBN No. 0412 27140 0.
[19] M. Mohanty, Dr. M. Basu and Dr. D.N. Pattanayak, Generation of Indicator Sequence
using Tms320vc5416 Fixed-Point Digital Signal Processor, International Journal of
Electronics and Communication Engineering & Technology (IJECET), Volume 5, Issue 2,
2014, pp. 30 - 35, ISSN Print: 0976- 6464, ISSN Online: 0976 6472.

Vous aimerez peut-être aussi