Developing applications under CODE COMPOSER STUDIO



Similar documents
Code Composer Studio Getting Started Guide

Using Example Projects, Code and Scripts to Jump-Start Customers With Code Composer Studio 2.0

Laboratory 3 Learning C and Sinewave Generation

Code Composer Studio Development Tools v3.3. Getting Started Guide

Lab 3: Introduction to Data Acquisition Cards

Freescale Semiconductor, I

DRV8312-C2-KIT How to Run Guide

TMS320C6000 Code Composer Studio Tutorial

LabVIEW DSP Test Integration Toolkit for TI DSP

Building a Simulink model for real-time analysis V Copyright g.tec medical engineering GmbH

DsPIC HOW-TO GUIDE Creating & Debugging a Project in MPLAB

Project Manager Editor & Debugger

Lab 1: Introduction to PSpice

LabVIEW Day 1 Basics. Vern Lindberg. 1 The Look of LabVIEW

Experiment 2 Introduction to TI C2000 Microcontroller, Code Composer Studio (CCS) and Matlab Graphic User Interface (GUI)

Getting Started with the LabVIEW Mobile Module Version 2009

Introduction to Simulink

USBSPYDER08 Discovery Kit for Freescale MC9RS08KA, MC9S08QD and MC9S08QG Microcontrollers User s Manual

Back Propagation Neural Networks User Manual

Software version 1.1 Document version 1.0

TIPS & TRICKS JOHN STEVENSON

EasyC. Programming Tips

WinCC. Configuration Manual. Manual Volume 2

Spectrum Analyzer. Software Instruction Manual

Compute Cluster Server Lab 3: Debugging the parallel MPI programs in Microsoft Visual Studio 2005

Getting Started with the LabVIEW Mobile Module

Department of Electrical and Computer Engineering Ben-Gurion University of the Negev. LAB 1 - Introduction to USRP

SKP16C62P Tutorial 1 Software Development Process using HEW. Renesas Technology America Inc.

EE8205: Embedded Computer System Electrical and Computer Engineering, Ryerson University. Multitasking ARM-Applications with uvision and RTX

SIMATIC. WinCC V7.0. Getting started. Getting started. Welcome 2. Icons 3. Creating a project 4. Configure communication 5

Twido Simulator - Online Help Scope What's in this Part? Twido Simulator Overview What's in this Chapter? How to Use Twido Simulator

Accurate Measurement of the Mains Electricity Frequency

DEPLOYING A VISUAL BASIC.NET APPLICATION

How to test and debug an ASP.NET application

SCADA/HMI MOVICON TRAINING COURSE PROGRAM

DSP Laboratory: Analog to Digital and Digital to Analog Conversion

How To Run A Factory I/O On A Microsoft Gpu 2.5 (Sdk) On A Computer Or Microsoft Powerbook 2.3 (Powerpoint) On An Android Computer Or Macbook 2 (Powerstation) On

10 STEPS TO YOUR FIRST QNX PROGRAM. QUICKSTART GUIDE Second Edition

Visual Basic. murach's TRAINING & REFERENCE

Shortcut Keys. Edit document under cursor

TestPoint QuickStart

The BSN Hardware and Software Platform: Enabling Easy Development of Body Sensor Network Applications

DSPDemo. By Moe Wheatley MoeTronix.

S7 for Windows S7-300/400

Q N X S O F T W A R E D E V E L O P M E N T P L A T F O R M v Steps to Developing a QNX Program Quickstart Guide

Capacitive Touch Lab. Renesas Capacitive Touch Lab R8C/36T-A Family

Training Document for Comprehensive Automation Solutions Totally Integrated Automation (T I A) MODULE A5 Programming the CPU 314C-2DP

QUICK START GUIDE. SG2 Client - Programming Software SG2 Series Programmable Logic Relay

Analysis Toolkit v1.3 for Code Composer Studio User s Guide

For Introduction to Java Programming, 5E By Y. Daniel Liang

UT69R000 MicroController Software Tools Product Brief

EE 242 EXPERIMENT 5: COMPUTER SIMULATION OF THREE-PHASE CIRCUITS USING PSPICE SCHEMATICS 1

Using Microsoft Visual Studio API Reference

13 Managing Devices. Your computer is an assembly of many components from different manufacturers. LESSON OBJECTIVES

WinCC. Configuration Manual. Manual Volume 3

3. Programming the STM32F4-Discovery

A DESIGN OF DSPIC BASED SIGNAL MONITORING AND PROCESSING SYSTEM

Quick Start Tutorial. Using the TASKING* Software Development Tools with the Intel 8x930 Family Evaluation Board

TMS320C3x/C4x Assembly Language Tools User s Guide

DUKANE Intelligent Assembly Solutions

VIRTUAL LABORATORY: MULTI-STYLE CODE EDITOR

Code Composer Studio s Command Window

Tutorial 5: Developing Java applications

WaveVision 5 Software

Introduction. - Please be sure to read and understand Precautions and Introductions in CX-Simulator Operation Manual and

Maple Quick Start. Introduction. Talking to Maple. Using [ENTER] 3 (2.1)

Hypercosm. Studio.

CONCEPT-II. Overview of demo examples

EMBEDDED C USING CODEWARRIOR Getting Started Manual

How To Use Safety System Software (S3)

Training Simulator and Demo Software

AVERSIVE STIMULATION WITH VIDEO MONITORING

EE289 Lab Fall LAB 4. Ambient Noise Reduction. 1 Introduction. 2 Simulation in Matlab Simulink

WinCC. Communication Manual. Manual 2. This manual is part of the documentation package with the order number: 6AV6392-1CA05-0AB0 C79000-G8276-C156-01

Managing Code Development Using CCS Project Manager

POCKET SCOPE 2. The idea 2. Design criteria 3

Visual Logic Instructions and Assignments

UML - Getting Started EA v4.0

Visual Basic Programming. An Introduction

FREQUENCY RESPONSE OF AN AUDIO AMPLIFIER

GEDAE TM - A Graphical Programming and Autocode Generation Tool for Signal Processor Applications

Filename: V+ User Manual - V+ Visual Programming System User Manual, V1.15 Copyright 2010, SimPhonics Incorporated

Software development and debugging for NXP ARM7 MCUs

Thomas Jefferson High School for Science and Technology Program of Studies Foundations of Computer Science. Unit of Study / Textbook Correlation

Linux. Reverse Debugging. Target Communication Framework. Nexus. Intel Trace Hub GDB. PIL Simulation CONTENTS

Mentor Tools tutorial Bold Browser Design Manager Design Architect Library Components Quicksim Creating and Compiling the VHDL Model.

Embedded Systems. Review of ANSI C Topics. A Review of ANSI C and Considerations for Embedded C Programming. Basic features of C

K2 CW Filter Alignment Procedures Using Spectrogram 1 ver. 5 01/17/2002

Using the TASKING Software Platform for AURIX

Menus and Toolbars: Using and customizing those common to all OpenOffice.org components

1 Introduction. 2 Project Browser. 3 FlowStone Editor

Quartus II Software Design Series : Foundation. Digitale Signalverarbeitung mit FPGA. Digitale Signalverarbeitung mit FPGA (DSF) Quartus II 1

Installation and Operation Manual Unite Log Analyser

Microcontroller Systems. ELET 3232 Topic 8: Slot Machine Example

TwinCAT Manual Quick Start V.1

Multi Channel software

IBM Operational Decision Manager Version 8 Release 5. Getting Started with Business Rules

UM1676 User manual. Getting started with.net Micro Framework on the STM32F429 Discovery kit. Introduction

Transcription:

Developing applications under CODE COMPOSER STUDIO 1. General Overview Code Composer Studio (CCS ) is a very efficient instrument for the fast development of applications that are written for the DSP families TMS320C54x, C55x, C6x. CCS allows: construction, configuration, testing, running and analyzing applications in real time. It facilitates running applications on different development systems or on a simulator. Selection of the syetem for which the applications are developed is done through Setup CCStudio component. Development phases of a CCS application are shown in fig 1; Design Code implementation Testing Analysis Establishing Project Creation Syntax check Debugging the theoretical Writing source code Data extraction Statistic concepts through probe point, etc Fig.1 Development phases of a CCS application Code Composer Studio includes the following components: TMS 320C54X Code Generation Tools- contains the main software elements needed in application development under CCS. CCS Integrated Development Environment (IDE) environment that integrates and manages all the CCS components that allow the design, edit and debug of applications. DSP/BIOS are libraries of functions that allow communication with the application during running on hardware systems. DSP/BIOS component is structured in two sections: - DSP/ BIOS Plug-Ins offer the possibility of application analysis for performance estimation with minimum impact over the real time performance. - DSP/BIOS API (Application Interface) provides the software components called through source application.

API components offer the possibility of interfacing the applications that run on DSP system with remote application that run on PC. All this components work together as shown in figure2. Fig2. Components used when developing an application under CCS. 2. Describing software utilities The majority of software utilities that are used in the development process of an application under CCS are managed by the IDE environment. Other components are called during application development. The development flow of an application is shown in figure3. o C Complier accepts C in ANSI standard and generates source files.asm o Assembler turns source files.asm into object files.coff o Link Editor combines object files into a single executable object module. o Archiver collects groups of files in a single library file (archive). The archiver can modify the library in the way of: erasing, reregistrating, extracting or adding a new member. o Assembly translation assistant turns the.asm form mnemonic into algebraic form. o Library Manager manages the run-time libraries. o Run-Time libraries contain: Functions for the real-time operation

Functions for arithmetic calculus in floating point. I/O functions supported by C- ANSI standard. o Hex conversion utility converts a COFF object file into Ti-Tagged, ASCII-hex, Intel, Motorola S or Tektronix object file. o Cross reference lister module uses object files to produce a LST file that will show the symbols, definitions and references in link edited source files. o Absolute lister module gets as input linkedited object files and create.abs files as output. The.ABS files is assembled in order to produce an.lst file that will contain absolute addresses instead of relative addresses. The development flow of an application is shown in figure3 3. Elements needed in developing an application under CCS Probe-Point usage The Probe-Points are useful instruments for algorithm development. It can be used for: - transferring input data from a local file into a DSP buffer to be used by the algorithm. - transferring output data from a DSP buffer into local file for the analysis.

- updating window (e.g. data graphic). Probe-Points are similar with breakpoints because both interrupt the program executed on DSP for running its own actions. Differences between them are: Probe-Point interrupt DSP program for a moment, perform a single action and continue program execution. The breakpoints interrupt the DSP until the execution is manually run and update all the windows. The Probe-Points permit automatically input and output in/from files. Breakpoints don t allow this. A breakpoint is also used for updating all the opened windows until it traces into that Probe Point. These windows also include the input and output data graphs. 3.2. Gel elements usage To modify a variable Code Composer Studio offers the possibility to use the GEL (General Extension Language). «GEL» is a language extension that allows creation of small windows used for: modifying variable values declared in the program, writing of functions that allow IDE environment configuration and access to processor. GEL elements are described in files with the.gel extension. These are added in the Project View Window in GEL file section. (Right-click ->Load GEL) or with File->Load GEL. Gel Cursor control (slider) allows control of variable through a cursor. slider param_definition( minval, maxval, increment, pageincrement, paramname) //control body param_definion the cursor s name minval an integer value that specifies the minimum variable values controlled by the cursor. maxval an integer value that specifies the maximum variable values controlled by the slider. incremet an integer values that specifies the increment value controlled by the slider. pageincrement an integer value that specifies the increment value controlled by the slider when the keys Page Up and Page Down are pressed. paramname - the parameter s name used inside the function. Dialogue Gel Control This type of control allows the modifications of variable through dialogue boxes. dialog funcname( paramname1 "param1 definition", paramname2 "param2 definition",...) //control body paramname[1-6] parameter s name used in body function "param1 definition" the name of parameter typed in the control window. We can define maximum 6 parameters.

In the example given below two GEL controls are defined: a slider and a dialogue. GEL file example. menuitem "Application Control" Application control is the name of the submenu s name from GEL menu which is activated after the GEL file loading. dialog Load(loadParm1 "Freq",loadParm2 "gain") Freq = loadparm1; gain = loadparm2; GEL Control of type dialogue is defined with the name Load with two variables loadparam1 and LoadParam2 which are attached to Freq and Gain. After pressing the Execute button variables are updated. slider Gain(0, 10,1, 1, gainparm) gain = gainparm; Slider GEL control is defined with the name Gain that can modify the gain variable between 0 and 10 with 1 increment and 1 post increment. 3.2 Graphical visualization of memory area Graph Window By using the Graph Windows we can see areas of memory graphically in amplitude-time or double-time. FFT- amplitude, FFT complex, FFT phase, FFT phase and amplitude. Amplitude-time window Graph configuration settings are shown below. Display Type- Graph title StartAddress Page memory page that displays Program Data or I/O

AcquisitionBufferSize buffer size read by Graph IndexIncrement display resolution DisplayData Size number of displayed samples DSP DataType data display format Q-value data displayed in fractional format Left-shiftedData Display SamplingRate(Hz)-F es in Hz for displaying the data on the graph. Plot data From plot data from left to right or reversed Autoscale amplitude autoscale. DC Value-offset AxesDisplay Time displayunit: s, ms, µs, samples StatusBar Display- status bar display on which the cursor coordinates are typed Magnitude Display Scale scale type for linear amplitude or logarithmic Data Plot Style- data plot style line or bar. Grid Style displays Full Grid, just ZeroLine or No Grid Cursor Mode - No Cursor, Data Cursor, Zoom Cursor When we have a frequency domain graph we have the following new parameters SignalType- real or complex FFT-Frame size FFT Order FFT Windowing Function DisplayPeak and Hold Frequency Display Unit : Hz, KHz, MHz

3.4. CSS work example The following application realizes an input signal amplification control. In order to run the application it is necessary that CCS work with a C5416 Simulator. This configuration is made through the Setup CCS component. Below are described the steps that need to be followed in order to develop an application in CCS and to be runned on the simulator. 1) Choose the menu Project -> Open and open the project sinewave.pjt from Turorial/sim54x/Sinewave. The project contains the files sine.h, sinewave.cmd, rts500.lib also the main source of the application sine.c.

Source of the application: /**************************************************************** /*sine.c ; This program uses Probe Points, a sinusoidal input signal and then the a gain factor is applied to this signal. /***************************************************************** ** #include <stdio.h> #include "sine.h" // gain control variable int gain = INITIALGAIN; // Buffer I/O declaration and initialization BufferContents currentbuffer; output // function definitions static void processing(); static void dataio(); // processes the input and generate the // the function used for ProbePoint void main() puts("sinewave example started.\n"); while(true) // loop /* read the input data using a probe-point connected to a host file Write the output into a graph connected also through a probe-point */ dataio(); /* in order to obtain the output data a gain is applied to the input data */ processing (); /* The next function applies a signal transform over the input signal in order to generate the output signal. The parameters are: BufferContents structure that contains the I/O streams of BUFFSIZE length; doesn t return any value */ static void processing() int size = BUFFSIZE; while(size--) // applies the gain over the input currentbuffer.output[size] = currentbuffer.input[size] * gain;

/* The next function reads the input signal and writes the processed output signal using ProbePoints; the function doesn t have any parameters and doesn t return any value. */ static void dataio() return; 2) Compile the source files with Project->Rebuild All or press the Rebuild All from the toolbar. 3) Load the object file in the DSP memory from File->Load Program. Select the program you just rebuilt, sine.out and press Open. 4) Double click on the file sine.c from Project View. 5) In order to attach the file containing the signal that needs to be processed it is necessary to insert a ProbePoint that reads data from a.dat file. Place the cursor on the line DataIO(), from the main function. DataIO function reserves a place where adding s could be made later. For now we will connect a «ProbePoint» that introduces data from a PC file. 6) The Toggle ProbePoint from the toolbar. The line is highlighted on display. 7) Choose File -> File I/O. File I/O dialogue appears in order to select the input and output files.

8) In File Input menu press Add File. 9) Choose sine.dat file. Notice that you can select the data format in the Files of type. The sine.dat file contains hex values for a sine. Select Open in order to add this file in File I/O dialogue list. Control window for the sine.dat file will appear. Later on when you run he program you can use this window for commands as: start, stop, rewind or fast forward in the data file. 10) In the File I/O window the next step is to add a ProbePoint using the button with the same name. In the dialogue window BreakProbe Points validate probe point clicking on it, will show us the location and we select Connect to choosing sine.dat file. At the end press Apply. 11) In the File I/O dialogue set the address currentbuffer.input and the length at 100. Also mark Wrap Around. Address field specifies where in the file is to be placed the data. currentbuffer.input is declared in volume.c as array of integer of BUFSIZE length. Length field indicates the number of samples from the data file that read each time it gets to Probe Point. 100 is the fixed value for the constant BUFSIZE in volume.h (0x64). Wrap Around option make CCS begin to read the file from the beginning after it arrived to its end. This allows data file to be taken as a continue data flow although it has just 1000 values and at each Probe Point 100 values are read.

12) Select View->Graph->Time/Frequency. 13) In Graph Property Dialog modify: Graph Title, Start Address, Acquisition Buffer Size, Display Data Size, DSP Data Type, Autoscale, si Maximum Y-value with values from figure. 14) Press OK. A graphical window for the input buffer appears. 15) Right click on the Input window and choose Clear Display from the menu. 16) Choose View->Graph->Time/Frequency. 17) This time modify Graph Title in Output Buffer and Start Address in currentbuffer.output, Autoscale OFF.Maximum-Value at 1000. 18) Press OK in order to display Output graphical window- it contains the generated signal.

19) Right click on the graphical window and choose Clear Display from the menu. 20) Choose File->Load Gel ->volume.gel. This file contains a slider and dialogue control gel. Open it to see its content. 21) Select Gel-> Application Control -> Gain. 22) In the Gain window adjust the gain. In the output buffer window amplitude is modified. In addition the gain variable value from Watch it is modified every time we make an adjustment. 23) Click (Halt) or press Shift F5 for stop the program. 4. Homework a) Add a slider GEL control in order to modify the gain. b) Write a program that generates a sine. Visualize the output buffer by using a Graph Window. c) Replace the cursor control GEL with Dialogue control. d) Modify the program so that the signal taken from the input file sine.dat to be amplitude modulated with a sine generated by the program. e) Modify Graph in order to display the output signal in frequency domain.