Top Banner
Getting Started with Code Composer Studio v4 for TMS320F2812
43
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Getting started with code composer studio v4 for tms320 f2812

Getting Started with Code Composer Studio v4 for TMS320F2812

Page 2: Getting started with code composer studio v4 for tms320 f2812

OBJECTIVE

To understand the basic features and functions to create and debug a project in CCS v4

To get familar with CCS v4More in-depth explanations of Code

Composer Studio’s various features .Finally, you will able to work with CCS v4

Page 3: Getting started with code composer studio v4 for tms320 f2812

Introduction

Code Composer Studio is the Integrated Design Environment for the Texas Instruments DSP/DSC/MC. DSP – TMS320C6745DSC – TMS320F2812MC – MSP430F5529

Code Composer Studio is the environment for project development for all tools needed to build an application for the Specific Target.

Page 4: Getting started with code composer studio v4 for tms320 f2812

Contents at a Glance

Setting a workspace location Create a projectAdd files to the ProjectCreate a Target Configuration fileBuild a ProjectRun a projectConsole window

Page 5: Getting started with code composer studio v4 for tms320 f2812

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.

Page 6: Getting started with code composer studio v4 for tms320 f2812

Setting The Workspace Location

Double-click the p CCStudio v4 icon on desktop.

Page 7: Getting started with code composer studio v4 for tms320 f2812

Note: Be sure that workspace location is empty for a fresh project

Page 8: Getting started with code composer studio v4 for tms320 f2812

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.

Page 9: Getting started with code composer studio v4 for tms320 f2812

The empty workspace editor will open.

Page 10: Getting started with code composer studio v4 for tms320 f2812

Create a New ProjectLaunch Code Composer Studio.

From the CCStudio File menu, choose New – CCS Project.

Page 11: Getting started with code composer studio v4 for tms320 f2812

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.

Page 12: Getting started with code composer studio v4 for tms320 f2812

In the Project type field: Select C2000.

Tick Debug and Release in configuration box.

Click Next.

Again, Click Next.

Page 13: Getting started with code composer studio v4 for tms320 f2812

Output Type:Executable.

Device Variant: TMS320C28XX & TMS320F2812.

Click Finish.

CCS creates a project.

Page 14: Getting started with code composer studio v4 for tms320 f2812

From the CCStudio C/C++ Projects, Right click the led [ Active – Debug ] New – Source File.

Page 15: Getting started with code composer studio v4 for tms320 f2812

In the source file field, Type the source file name with extension. (led.c)

Click Finish.

Page 16: Getting started with code composer studio v4 for tms320 f2812
Page 17: Getting started with code composer studio v4 for tms320 f2812

Type the program in led.c editorwindow then , File – Save.

Page 18: Getting started with code composer studio v4 for tms320 f2812

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”

Page 19: Getting started with code composer studio v4 for tms320 f2812

From the CCStudio C/C++ Projects, Right click the led [ Active – Debug ] Select the Add files to project.

Page 20: Getting started with code composer studio v4 for tms320 f2812

Then browse and select all the needed files.

Page 21: Getting started with code composer studio v4 for tms320 f2812

Click Open. The selected all the files are added to your project.

Page 22: Getting started with code composer studio v4 for tms320 f2812

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

Page 23: Getting started with code composer studio v4 for tms320 f2812

New Target Configuration dialog appears. Then Click Finish

Page 24: Getting started with code composer studio v4 for tms320 f2812

NewTargetConfiguration.ccxml

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.

Page 25: Getting started with code composer studio v4 for tms320 f2812
Page 26: Getting started with code composer studio v4 for tms320 f2812

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.

Page 27: Getting started with code composer studio v4 for tms320 f2812

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_headers/include"

Page 28: Getting started with code composer studio v4 for tms320 f2812
Page 29: Getting started with code composer studio v4 for tms320 f2812

Linker Option

IN C/C++ Build, go to c2000 linkerBasic 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\

compiler\c2000\lib"

Page 30: Getting started with code composer studio v4 for tms320 f2812
Page 31: Getting started with code composer studio v4 for tms320 f2812

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.

Page 32: Getting started with code composer studio v4 for tms320 f2812

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.

Page 33: Getting started with code composer studio v4 for tms320 f2812
Page 34: Getting started with code composer studio v4 for tms320 f2812
Page 35: Getting started with code composer studio v4 for tms320 f2812
Page 36: Getting started with code composer studio v4 for tms320 f2812

This is Debug workspace., at this we can debug a code using breakpoints, single stepping, watch window, memory etc..,

Page 37: Getting started with code composer studio v4 for tms320 f2812

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

Target – Halt.

Page 38: Getting started with code composer studio v4 for tms320 f2812
Page 39: Getting started with code composer studio v4 for tms320 f2812

Target – Terminate all.

Page 40: Getting started with code composer studio v4 for tms320 f2812

Again, the ccs will return to edit workspace from debug workspce.

Page 41: Getting started with code composer studio v4 for tms320 f2812

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.

Page 42: Getting started with code composer studio v4 for tms320 f2812

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.

Page 43: Getting started with code composer studio v4 for tms320 f2812

Presented byS.THIYAGARAJAN,Senior R & D Engg,Pantech Solutions,Chennai - 96

THANK YOU