Using Code Composer Studio Chapter 2 C6000 Integration Workshop Copyright © 2005 Texas Instruments. All rights reserved. Technical Training Organization.

Slides:



Advertisements
Similar presentations
CS 11 C track: lecture 7 Last week: structs, typedef, linked lists This week: hash tables more on the C preprocessor extern const.
Advertisements

Introducing JavaScript
Introduction to HT-IDE3000 Micro-C development System Department.
Assembly and Linear Assembly Evgeny Kirshin, 05/10/2011
Program Development Tools The GNU (GNU’s Not Unix) Toolchain The GNU toolchain has played a vital role in the development of the Linux kernel, BSD, and.
Utilizing the GDB debugger to analyze programs Background and application.
Debugging What can debuggers do? Run programs Make the program stops on specified places or on specified conditions Give information about current variables’
FIR TYPE-I Lowpass Filtering using TMS320C6711 Floating Point Processor DEMO Presentation Prepared by: Bashir SADEGHI Supervised by: Dr. Erhan A. INCE.
Code Composer Studio TM Integrated Development Environment v2 First Intelligent IDE To Offer DSP Application Development For Multi-Processor, Multi-User,
Copyright © 2008 Pearson Addison-Wesley. All rights reserved. Chapter 12 Separate Compilation Namespaces Simple Make Files (Ignore all class references.
Working with JavaScript. 2 Objectives Introducing JavaScript Inserting JavaScript into a Web Page File Writing Output to the Web Page Working with Variables.
How to Start Up CCStudio 3 DSP LAB T.A.:
Introduction to C Programming Overview of C Hello World program Unix environment C programming basics.
Chapter 2: The Visual Studio.NET Development Environment Visual Basic.NET Programming: From Problem Analysis to Program Design.
Guide To UNIX Using Linux Third Edition
Guide To UNIX Using Linux Third Edition
Introduction to Unix (CA263) Introduction to Shell Script Programming By Tariq Ibn Aziz.
Bit-DSP-MicrocontrollerTMS320F2812 Module 2 : Program Development Tools.
Getting Started with Code Composer Studio™ IDE v2.0 Presentation begins live from Dallas July 11, 7:00 a.m. and 11:00 a.m. Central Daylight Time (CDT)
Anne Mascarin DSP Marketing The MathWorks
C6713 DSK Diagnostic Utility included with DSK....
Getting Started With DSP A. What is DSP? B. Which TI DSP do I use? Highest performance C6000 Most power efficient C5000 Control optimized C2000 TMS320C6000™
Introduction to CCSv5. Outline  Intro to CCSv5 Intro to CCSv5  Functional Overview Functional Overview  Perspectives Perspectives  Projects Projects.
Introduction Purpose Objectives Content Learning Time
Introduction to The Linaro Toolchain Embedded Processors Training Multicore Software Applications Literature Number: SPRPXXX 1.
1 Introduction to Tool chains. 2 Tool chain for the Sitara Family (but it is true for other ARM based devices as well) A tool chain is a collection of.
Chapter 2 Software Tools and Assembly Language Syntax.
The 6713 DSP Starter Kit (DSK) is a low-cost platform which lets customers evaluate and develop applications for the Texas Instruments C67X DSP family.
DSP/BIOS System Integration Workshop Copyright © 2004 Texas Instruments. All rights reserved. D SP TEXAS INSTRUMENTS TECHNOLOGY 1.
© Janice Regan, CMPT 128, Jan CMPT 128 Introduction to Computing Science for Engineering Students Creating a program.
Introduction to Shell Script Programming
P.1ECE 331, Prof. A. Mason Professor Andrew Mason Michigan State University Spring 2013 ECE 331: PC Lab 1: Using HC12 ASM Simulators.
Computing IV Visual C Introduction with OpenCV Example Xinwen Fu.
CCS APPS CODE COVERAGE. CCS APPS Code Coverage Definition: –The amount of code within a program that is exercised Uses: –Important for discovering code.
© 2008, Renesas Technology America, Inc., All Rights Reserved 1 Purpose  This training module provides an overview of optimization techniques used in.
Program A computer program (also software, or just a program) is a sequence of instructions written in a sequence to perform a specified task with a computer.
Engineering Computing I Chapter 1 – Part A A Tutorial Introduction.
Renesas Technology America Inc. 1 SKP8CMINI Tutorial 2 Creating A New Project Using HEW.
Introduction Purpose This training course covers debugging an application on an SH target in the Renesas HEW (High-performance Embedded Workshop) development.
Chapter 19: Visual Lisp. After completing this Chapter, you will be able to do the following: What is AutoLISP Launching Visual LISP Terminology and Fundamental.
Visual Basic.NET Comprehensive Concepts and Techniques Chapter 8 Debugging, Creating Executable Files, and Distributing a Windows Application.
DSP/BIOS System Integration Workshop Copyright © 2004 Texas Instruments. All rights reserved. T TO Technical Training Organization 1.Introduction 2.Real-Time.
1 4-Development Environment Development processor  The processor on which we write and debug our programs Usually a PC Target processor  The processor.
Bit-DSP-MicrocontrollerTMS320F2812 Texas Instruments Incorporated European Customer Training Center University of Applied Sciences Zwickau (FH)
Core Java Introduction Byju Veedu Ness Technologies httpdownload.oracle.com/javase/tutorial/getStarted/intro/definition.html.
Introduction to the C6713 Laurier Boulianne
© Copyright 1992–2005 by Deitel & Associates, Inc. and Pearson Education Inc. All Rights Reserved. Tutorial 3 – Inventory Application: Introducing Variables,
Renesas Technology America Inc. 1 SKP8CMINI Tutorial 2 Creating A New Project Using HEW.
© 2008, Renesas Technology America, Inc., All Rights Reserved 1 Introduction Purpose  This training course explains how to use section setting and memory.
Basic Memory Management Chapter 3 C6000 Integration Workshop Copyright © 2005 Texas Instruments. All rights reserved. Technical Training Organization T.
Lecture Set 2 Part A: Creating an Application with Visual Studio – Solutions, Projects, Files 8/10/ :35 PM.
Open project in Microsoft Visual Studio → build program in “Release” mode.
1. TMS320C6X DSP Programming with Simulink – TI C6000 DSP Target i) TI C6000 DSP target enables simulink blocks to model or program signal processing algorithm.
© 2008, Renesas Technology America, Inc., All Rights Reserved 1 Introduction Purpose  This training course demonstrates the Project Generator function.
LECTURE 3 Translation. PROCESS MEMORY There are four general areas of memory in a process. The text area contains the instructions for the application.
Chapter 2: The Visual Studio.NET Development Environment Visual Basic.NET Programming: From Problem Analysis to Program Design.
© 2008, Renesas Technology America, Inc., All Rights Reserved 1 Introduction Purpose  This training course demonstrates the use of the High-performance.
Code Composer Studio Compile EditAsm LinkDebug File In File OutProfileGraphStatistics IDE – Integrated Development Environment SIM DSK EVM Emulator RTDX.
C Copyright © 2009, Oracle. All rights reserved. Using SQL Developer.
1 CS 192 Lecture 4 Winter 2003 December 8-9, 2003 Dr. Shafay Shamail.
Development Environment
Chapter 2: The Visual Studio .NET Development Environment
CS4101 Introduction to Embedded Systems Lab 1: MSP430 LaunchPad IDE
PRU-ICSS Programming with CCS
Static Systems (GCONF, TCONF)
DEMO Presentation Prepared by: Bashir SADEGHI Supervised by: Dr
C++ Compilation Model C++ is a compiled language
A QUICK START TO OPL IBM ILOG OPL V6.3 > Starting Kit >
Code Composer Essentials 3.0
SPL – PS1 Introduction to C++.
Presentation transcript:

Using Code Composer Studio Chapter 2 C6000 Integration Workshop Copyright © 2005 Texas Instruments. All rights reserved. Technical Training Organization T TO

Outline  Code Composer Studio (CCS)  Projects  Build Options  Build Configurations  Configuration Tool  C – Data Types and Header Files  Lab 2 Technical Training Organization T TO

Code Generation.out Editor.sa Asm Optimizer.c /.cpp Compiler Asm.asm Linker.obj Link.cmd.map Technical Training Organization T TO

Code Composer Studio SIM  Simulator DSK’s Code Composer Studio Includes:  Integrated Edit / Debug GUI Edit DSK EVM Third Party  BIOS:Real-time kernel Real-time analysis DSP/BIOS Libraries DSP/BIOS Config Tool Debug  Code Generation Tools Compiler Asm Opto Asm Standard Runtime Libraries.out Link XDS DSP Board CCS is Project centric... Technical Training Organization T TO

Outline Code Composer Studio (CCS)  Projects  Build Options  Build Configurations  Configuration Tool  C – Data Types and Header Files  Lab 2 Technical Training Organization T TO

What is a Project? Project (.PJT ) file contain: References to files:  Source  Libraries  Linker, etc … Project settings:  Compiler Options  DSP/BIOS  Linking, etc … Let’s look more closely at Build Options and Configurations … Technical Training Organization T TO

 Set as Active Project Keep multiple projects open  Add files… to project Add drag-n-drop files onto.PJT  Open for Editing Opens PJT with text editor  Configurations… Keep multiple setsof build options  Options… Set build options Right-Click Menu Technical Training Organization T TO

Compiler Build Options  Debug and Optimize options conflict with each other, therefore they should be not be used together These can be set/modified by …  Nearly one-hundred compiler options available to tune your code's performance, size, etc.  Following table lists most commonly used options: OptionsDescription -mv6700Generate ‘C67x code (‘C62x is default) -mv67pGenerate ‘C672x code -mv6400 Generate 'C64x code -mv6400+Generate 'C64x+ code -fr Directory for object/output files -fs Directory for assembly files Debug -gEnables src-level symbolic debugging -ssInterlist C statements into assembly listing Optimize (release) -o3Invoke optimizer (-o0, -o1, -o2/-o, -o3) -kKeep asm files, but don't interlist Technical Training Organization T TO

-g -fr“$(Proj_dir)\Debug" -d"_DEBUG" -mv6700 Build Options GUI  GUI has 8 pages of options for code generation tools  Default build options for a new project are shown  Basic page defaults are -g -mv6700 To make options easier, TI recommends using … Technical Training Organization T TO

Build Configurations  For new projects, CCS automatically creates two build configurations:  Debug ( unoptimized )  Release (optimized) -g -fr“$(Proj_dir)\Debug" -d"_DEBUG" -mv6700-o3 -fr“$(Proj_dir)\Release" -mv6700

Build Configurations  For new projects, CCS automatically creates two build configurations:  Debug ( unoptimized )  Release (optimized) -g -fr“$(Proj_dir)\Debug" -d"_DEBUG" -mv6700-o3 -fr“$(Proj_dir)\Release" -mv6700 $(Proj_dir) Indicates the current project directory. This aids in project portability. See SPRA913 (Portable CCS Projects) for more information.

Two Default Build Configurations  For new projects, CCS automatically creates two build configurations:  Debug ( unoptimized )  Release (optimized)  Use the drop-down to quickly select build config. -g -fr“$(Proj_dir)\Debug" -d"_DEBUG" -mv6700-o3 -fr“$(Proj_dir)\Release" -mv6700

Two Default Build Configurations  For new projects, CCS automatically creates two build configurations:  Debug ( unoptimized )  Release (optimized)  Use the drop-down to quickly select build config.  Add/Remove build config's with Project Configurations dialog (on project menus)  Edit a configuration: 1. Set it active 2. Modify build options (shown previously) 3. Save project -g -fr“$(Proj_dir)\Debug" -d"_DEBUG" -mv6700-o3 -fr“$(Proj_dir)\Release" -mv6700 Technical Training Organization T TO

OptionsDescription -o Output file name -m Map file name -c Auto-initialize global/static C variables -x Exhaustively read libs (resolve back ref's) Linker Options  By default, linker options include the –o option  We recommend you add the –m option  “$(Proj_dir)\Debug\" indicates one subfolder level below project (.pjt) location  Run-time Autoinit (-c) tells compiler to initialize global/static variables before calling main()  Autoinit discussed in Ch 3 -c -m "$(Proj_dir)\Debug\lab.map" -o"$(Proj_dir)\De $(Proj_dir)\Debug\lab.out Run-time Autoinitialization $(Proj_dir)\Debug\lab.map Technical Training Organization T TO

Using Separate Output Folders  When changing configurations, the -fr and -fs options prevents files from being overwritten  While not required, it allows you to preserve all variations of your project’s output files c60001day iw6000 labs lab2 Debug lab.out lab.obj Release lab.out lab.obj Debug files Release files Technical Training Organization T TO

Outline Code Composer Studio (CCS) Projects Build Options Build Configurations  Configuration Tool  C – Data Types and Header Files  Lab 2 Technical Training Organization T TO

Technical Training Organization T TO

DSP/BIOS Configuration Tool Simplifies system design by:  Automatically includes the appropriate runtime support libraries  Automatically handles interrupt vectors and system reset  Handles system memory configuration (builds CMD file)  Generates 5 files when CDB file is saved:  C file, Asm file, 2 header files and a linker command (.cmd) file  More to be discussed later … Simplifies system design by:  Automatically includes the appropriate runtime support libraries  Automatically handles interrupt vectors and system reset  Handles system memory configuration (builds CMD file)  Generates 5 files when CDB file is saved:  C file, Asm file, 2 header files and a linker command (.cmd) file  More to be discussed later … Technical Training Organization T TO

Outline Code Composer Studio (CCS) Projects Build Options Build Configurations Configuration Tool  C – Data Types and Header Files  Lab 2 Technical Training Organization T TO

‘C6000 C Data Types TypeBitsRepresentation char8 ASCII short16 Binary, 2's complement int32 Binary, 2's complement long40 Binary, 2's complement long 64 Binary, 2's complement float32 IEEE 32-bit double64 IEEE 64-bit long double64 IEEE 64-bit pointers32 Binary Technical Training Organization T TO

Including Header Files in C /* * ======== Include files ======== */ #include #include "sine.h" #include "edma.h" 1.What is #include used for? 2.What do header (.h) files contain? It adds the contents of the header file to your C file at the point of the #include statement. Let's look at a header file...

Example Header Files /* *======== sine.h ======== *This file contains prototypes for all *functions and global datatypes *contained in sine.c */ #ifndef SINE_Obj typedef struct { float freqTone; float freqSampRate; float a; float b; float y0; float y1; float y2; … } SINE_Obj; #endif void copyData(short *inbuf, …); void SINE_init(SINE_Obj *sineObj, …); … /* * ======== edma.h ======== * This file contains references for all * functions contained in edma.c */ void initEdma(void); void edmaHwi(int tcc); extern EDMA_Handle hEdma;  Header files can contain any C code to be used over and over again  Usually a header file is paired with a C file or library object file. Essentially, the header file provides a description of the global items in the “paired” file.  Most commonly, header files contain:  Function prototypes  Global data references, such as new type definitions Therefore...

Including Header Files in C /* * ======== Include files ======== */ #include #include "sine.h" #include "edma.h" 1.What is #include used for? 2.What do header (.h) files contain? 3.What is the difference between and “.h”? It adds the contents of the header file to your C file at the point of the #include statement. They can contain any C statements. Usually, they contain code that would otherwise need to be entered into every C file. They’re a shortcut.  Angle brackets tell the compiler to look in the specified include path.  Quotes “.h” indicate the file is located in the same location as the file which includes it.

Including Header Files in C /* * ======== Include files ======== */ #include #include "sine.h" #include "edma.h" 1.What is #include used for? 2.What do header (.h) files contain? 3.What is the difference between and “.h”? Technical Training Organization T TO

Outline Code Composer Studio (CCS) Projects Build Options Build Configurations Configuration Tool C – Data Types and Header Files  Lab 2 Technical Training Organization T TO

Lab Exercises – C67x vs. C64x  Which DSK are you using?  We provide instructions and solutions for both C67x and C64x.  We have tried to call out the few differences in lab steps as explicitly as possible: Technical Training Organization T TO

Lab 2 – Creating/Graphing a Sine Wave CPU buffer  Create and build a project  Examine variables, memory, code  Run, halt, step, breakpoint your program  Graph results in memory (to see the sine wave) Introduction to Code Composer Studio (CCS) Technical Training Organization T TO

Creating a Sine Wave t A sine.c Generates a value for each output sample float y[3]= {0, 0. 02, 0}; float A = ; short sineGen() { y[0] = y[1] * A - y[2]; y[2] = y[1]; y[1] = y[0]; return((short)(28000*y[0]); } Technical Training Organization T TO

Lab 2 Debrief 1. What differences are there in Lab2 between the C6713 and C6416 solutions? 2. What do we need CCS Setup for? 3. Did you find the “clearArrays” GEL menu command useful? Technical Training Organization T TO

Optional Exercises  Lab2a- Customize CCS  Lab2b- Using GEL Scripts  Lab2d- Float vs Fixed Point Technical Training Organization T TO

Lab 2c: Using Printf #include short func1(short *m, short count); short a[4] = {40,39,38,37}; int y = 0; main() { y = function(); printf("y = %x hex\n", y); } Technical Training Organization T TO

Summary: CCS Automation  GEL Scripting  Command Window  CCS Scripting  TCONF Scripting Technical Training Organization T TO

GEL Scripting GEL:General Extension Language  C style syntax  Large number of debugger commands as GEL functions  Write your own functions  Create GEL menu items GEL:General Extension Language  C style syntax  Large number of debugger commands as GEL functions  Write your own functions  Create GEL menu items Technical Training Organization T TO

Command Window Some frequently used commands:  load  reload  reset  restart  ba  wa  help  dlog,a  dlogclose  alias...  take  run  go  step  cstep  halt Technical Training Organization T TO

CCS Scripting  Debug using VB Script or Perl  Using CCS Scripting, a simple script can:  Start CCS  Load a file  Read/write memory  Set/clear breakpoints  Run, and perform other basic debug functions  Debug using VB Script or Perl  Using CCS Scripting, a simple script can:  Start CCS  Load a file  Read/write memory  Set/clear breakpoints  Run, and perform other basic debug functions

TCONF Scripting (CDB vs. TCF) Tconf Script (.tcf) /* generate cfg files (and CDB file) */ prog.gen(); Textual way to create and configure CDB files Runs on both PC and Unix Create #include type files (.tci) More flexible than Config Tool Textual way to create and configure CDB files Runs on both PC and Unix Create #include type files (.tci) More flexible than Config Tool /* load platform */ utils.loadPlatform(“ti.platforms.dsk6416”); config.board("dsk6416").cpu("cpu0").clockOscillator = 600.0; /* make all prog objects JavaScript global vars */ utils.getProgObjs(prog); /* load platform */ utils.loadPlatform(“ti.platforms.dsk6416”); config.board("dsk6416").cpu("cpu0").clockOscillator = 600.0; /* make all prog objects JavaScript global vars */ utils.getProgObjs(prog); /* Create Memory Object */ var myMem = MEM.create("myMem"); myMem.base = 0x ; myMem.len = 0x ; myMem.space = “data"; /* Create Memory Object */ var myMem = MEM.create("myMem"); myMem.base = 0x ; myMem.len = 0x ; myMem.space = “data"; Technical Training Organization T TO

ti Technical Training Organization