Sie sind auf Seite 1von 43

Getting Started with Code

Composer Studio v4 for


TMS320F2812

OBJECTIVE
To understand the basic features and
functions to create and debug a
project in CCS v4
To get familar with CCS v4
More in-depth explanations of Code
Composer Studios various features .
Finally, you will able to work with CCS
v4

Introduction
Code Composer Studio is the
Integrated Design Environment for the
Texas Instruments DSP/DSC/MC.
DSP TMS320C6745
DSC TMS320F2812
MC MSP430F5529

Code Composer Studio is the


environment for project development
for all tools needed to build an
application for the Specific Target.

Contents at a Glance
Setting a workspace location
Create a project
Add files to the Project
Create a Target Configuration file
Build a Project
Run a project
Console window

Launching The CCS v4

Click this icon shown on


your desktop.
To launch Code Composer
Studio IDE for the first time,
configure
Code
Composer
Studio for a fixed workspace
location.

Setting The Workspace


Location
Double-click
the p CCStudio
v4
icon
on
desktop.

Note: Be sure that workspace location is


empty for a fresh project

Tick the use this as the default and


do not ask again(Optional).
Note: Again to get the workspace
launcher at startup. open ccs go to
window preference general
startup and shutdown tick prompt
for workspace on startup.
Click ok.

The empty workspace editor will open.

Create a New Project


Launch
Code
Composer
Studio.
From the
CCStudio
File menu,
choose New
CCS
Project.

In the Project
Name field : Type
the project name.
Tick the use
default Location
Check box or
browse to the
folder you created
as workspace
loaction.
Click Next.

In the Project type


field: Select C2000.
Tick Debug and
Release in
configuration box.
Click Next.
Again, Click Next.

Output
Type:Executabl
e.
Device
Variant:
TMS320C28XX
&
TMS320F2812.
Click Finish.
CCS creates a

From the CCStudio C/C++ Projects, Right


click the led [ Active Debug ] New
Source File.

In the source file field, Type the source file


name with extension. (led.c)
Click
Finish.

Type the program in led.c editorwindow


then , File Save.

Add a Files to Project


After Creating the project and source file we
must add some addition files to our project.
These addition files may vary depend upon
the projects which we used.
Create/add new source files to your project
by right-clicking on the project in the C/C+
+ Projects

From the CCStudio C/C++ Projects, Right


click the led [ Active Debug ] Select the
Add files to project.

Then browse and select all the needed


files.

Click Open. The selected all the files are


added to your project.

Create a Target
File
From theConfiguration
CCStudio C/C++ Projects,
Right click the
led [ Active Debug ] New Source File.

New Target Configuration dialog appears.


Then Click Finish

NewTargetConfiguration.ccx
ml
This file will help to communicate between
hardware and softeware. While connecting
the hardware to the software the target
configuration file will run. If any initialize
needed we can add gel file additionally in
the target configuration.
In General setup,
Connection : XDS 100 USB emulator version 1
Device : TMS320F2812( Target Device ).

Tick the TMS320F2812 & Click Save.

Build a Project
Before Building the project we must
modify project properties , add the include
files and path according to our usage.
From the CCStudio C/C++ Projects, Right
click the led [ Active Debug ]
Properties.

Compiler Option
In C/C++ Build, go to C2000 compiler
Include Options (Add dir to #include
search path(--include_path,-I)) select
this
add icon and add the following
two path by indivdually.
"${XDAIS_CG_ROOT}/packages/ti/xdais
"C:/tidcs/c28/DSP281x/v120/DSP281x_h
eaders/include"

Linker Option
IN C/C++ Build, go to c2000 linker
Basic option - stack size : 0x400.
Include lib or cmd file as input (--library,-I):
"rts2800_ml.lib"

File search path (Add <dir> to library search


path(-include_path,-i)) select this add
icon
and add the following two path by
indivdually.
"${PROJECT_ROOT}"
"C:\ProgramFiles\TexasInstruments\ccsv4\tools\co
mpiler\c2000\lib"

Build a Project
From the CCStudio C/C++ Projects, Right
click the led [ Active Debug ] Build
Project or Rebuild Project.
Note: Once the project is successfully build
you will get 0 Errors. If Errors arise check
the code and project properties then
rebuild the project.

Run a project
Target Debug Active Project.
Note: at this step, Target will connect, gel
file will run, led.out will load to target then
finally Keep the cursor at main() of
program to start execute.

This is Debug workspace., at this we can


debug a code using breakpoints, single
stepping, watch window, memory etc..,

Target Run.
For led code, check the output at on
board. The Leds is will on and off with few
delay.
Target Halt.

Target Terminate all.

Again, the ccs will return to edit workspace


from debug workspce.

Console Window
The Output window is located at the
bottom of the screen by default. By
default, the printf function displays in
console window, showing
information such as the contents of
Stdout and the build log.

H elp
CCS provides many help tools through the H
elp menu. Select H elp Contents to search by
contents. Select H elp Tutorial to access
tutorials to guide you through the CCStudio
development process.
Select H elp Web Resources to obtain the most
current help topics and other guidance. U ser
manuals are PDF files that provide information
on specific features or processes.
Y ou can access updates and a number of
optional plug-ins through H elp U
pdate
Advisor.

THANK YOU

Presented by
S.THIYAGARAJAN
,
Senior R & D
Engg,
Pantech
Solutions,

Das könnte Ihnen auch gefallen