Lecture 3 Code Composer Studio and the DSK6416

Slides:



Advertisements
Similar presentations
Introduction to Eclipse. Start Eclipse Click and then click Eclipse from the menu: Or open a shell and type eclipse after the prompt.
Advertisements

Module 3 Configuring Hardware on a Computer Running Windows XP Professional.
Code Composer Department of Electrical and Computer Engineering
Yaron Doweck Yael Einziger Supervisor: Mike Sumszyk Spring 2011 Semester Project.
Lab7: Introduction to Arduino
Organized by DSP Lab, Dept. of E & ECE, IIT, Kharagpur Sponsored by Texas Instruments (India), Bangalore A Training Programme on TI’s DSP Tools Lectures.
Mohammed Yousef Abd El ghany, Faculty of Eng., Comm. Dep., 3rd year. Digital Signal Processor The Heart of Modern Real-Time Control Systems.
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,
The IDE (Integrated Development Environment) provides a DEBUGGER for locating and correcting errors in program logic (logic errors not syntax errors) The.
Chapter 3 Code Composer Studio and the DSK. Dr. Naim Dahnoun, Bristol University, (c) Texas Instruments 2002 Chapter 3, Slide 2 Learning Objectives 
LAUNCHXL2-RM57L – Project 0
Using PDG with e2studio: Example
About the Presentations The presentations cover the objectives found in the opening of each chapter. All chapter objectives are listed in the beginning.
ECE Department: University of Massachusetts, Amherst Lab 1: Introduction to NIOS II Hardware Development.
EPOCH 1000 File Management Data Logging and Reporting
EE 345S Real-Time Digital Signal Processing Lab Fall 2008
SKP8CMINI-15,17 Tutorial 1 Software Development Process using HEW4
Renesas Technology America Inc. 1 SKP8CMINI Tutorial 1 Introduction.
M16C/Tiny SKP Tutorial 1 Software Development Process using HEW4
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)
Detailed Technical Feature Presentation Background Information The Importance of Software Software Roadblocks Development Environment DSP Development Cycle.
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 Purpose Objectives Content Learning Time
Part 1 Using the ARM board And start working with C Tutorial 5 and 6
Digital Image Processing Lecture3: Introduction to MATLAB.
Silicon Labs ToolStick Development Platform
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.
Renesas Technology America Inc. 1 M16C/Tiny SKP Tutorial 2 Creating A New Project Using HEW4.
DSP/BIOS System Integration Workshop Copyright © 2004 Texas Instruments. All rights reserved. D SP TEXAS INSTRUMENTS TECHNOLOGY 1.
Basic Input Output System
AT91SAM9261-EK WinCE 6.0 DEMO ATMEL AT91 Application & Support Group
Introduction Purpose This training course covers debugging an application on an SH target in the Renesas HEW (High-performance Embedded Workshop) development.
© 2008, Renesas Technology America, Inc., All Rights Reserved 1 Purpose  This training course describes how to configure the the C/C++ compiler options.
CCS APPS CODE COVERAGE. CCS APPS Code Coverage Definition: –The amount of code within a program that is exercised Uses: –Important for discovering code.
Infinity-project.org The Institute for Engineering Education Engineering Education for today’s classroom. 1 Infinity Project Laboratory Setup.
High Speed Data Converter University
Geo CE-XM ch 4 Edited 10/14/05 1 The XM is the newest of the rovers, and unlike other units, it comes with software installed on the unit as well as using.
AT91SAM9261-EK WinCE 5.0 DEMO ATMEL AT91 Application & Support Group Version 1.O February 2007.
© 2008, Renesas Technology America, Inc., All Rights Reserved 1 Purpose  This training module provides an overview of optimization techniques used in.
ADAM2 Single Remocon MCU IDE User’s Manual S/W Integrated Development Environment - Assembler - Simulator - Code Wizard V1.0 Technical Sales Team, ETA.
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 3 Code Composer Studio and the DSKs DSK6711, DSK6713 and DSK6416.
Programmable Logic Training Course HDL Editor
Bit-DSP-MicrocontrollerTMS320F2812 Texas Instruments Incorporated European Customer Training Center University of Applied Sciences Zwickau (FH)
Renesas Technology America Inc. 1 M16C Seminars Lab 3 Creating Projects Using HEW4 14 March 2005 M16C Seminars Lab 3 Creating Projects Using HEW4 Last.
Renesas Technology America Inc. 1 SKP8CMINI Tutorial 2 Creating A New Project Using HEW.
CSC190 Introduction to Computing Operating Systems and Utility Programs.
ChibiOS/RT Demo A free embedded RTOS
Basic Memory Management Chapter 3 C6000 Integration Workshop Copyright © 2005 Texas Instruments. All rights reserved. Technical Training Organization T.
Sem 2v2 Chapter 5 Router Startup and Setup. A router initializes by loading the bootstrap, the operating system, and a configuration file. If the router.
Digital Literacy: Computer Basics
Embedded Systems Design with Qsys and Altera Monitor Program
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.
Some of the utilities associated with the development of programs. These program development tools allow users to write and construct programs that the.
Programming and Debugging with the Dragon and JTAG Many thanks to Dr. James Hawthorne for evaluating the Dragon system and providing the core content for.
Code Composer Studio Compile EditAsm LinkDebug File In File OutProfileGraphStatistics IDE – Integrated Development Environment SIM DSK EVM Emulator RTDX.
Workshop Setup The software/hardware used in this workshop are:
Programming and Debugging with the Dragon and JTAG
Lab 1: Using NIOS II processor for code execution on FPGA
PRU-ICSS Programming with CCS
Microcomputer Systems 1
ECE 3551 Microcomputer Systems 1
DEMO Presentation Prepared by: Bashir SADEGHI Supervised by: Dr
Digital Image Processing
Software Setup & Validation
Presentation transcript:

Lecture 3 Code Composer Studio and the DSK6416

Learning Objectives Introduction to Code Composer Studio (CCS). Installation and setup of CCS. Introduction to the DSK. Laboratory.

Code Composer Studio The Code Composer Studio (CCS) application provides an integrated environment with the following capabilities: Integrated development environment with an editor, debugger, project manager, profiler, etc. ‘C/C++’ compiler, assembly optimiser and linker (code generation tools). Simulator. Real-time operating system (DSP/BIOS™). Real-Time Data Exchange (RTDX™) between the Host and Target. Real-time analysis and data visualization.

CCS Installation and Setup (A) Insert CD and Install the CCS Software. (B) Connect DSK to Power and USB and Run CCS Setup (do not remove CD): Start CCS setup utility by using the following desktop icon: Alternatively: Windows Start Menu -> Programs -> Texas Instruments -> Code Composer Studio 3.1 (‘C6000) -> Setup Code Composer Studio 3.1 Run cc_setup.exe located in: c:\CCStudio_v3.1\cc\bin\

CCS Installation and Setup (C) After Installation you should see the following icons:

CCS Installation and Setup You should now see a screen similar to this: Note: If you don’t see the Import Configuration dialog box you should open it from the menu using: File: Import.

CCS Installation and Setup You can clear the previous configuration by selecting the configuration you wish to clear and clicking the clear button. Next select a new configuration that you would like to add: Select the C6416DSK Port x y Mode. The port number, x, and port mode, y, depend on your PC setup.

CCS Installation and Setup Finally save and quit the import configuration dialog box.

Testing Your Connection If you want to test your DSK and USB connection you can launch the C6416 DSK Diagnostic Utility from the icon on your desktop. From the diagnostic utility, press the start button to run the diagnostics. In approximately 30 seconds all the on-screen test indicators should turn green.

Testing Your Connection

CCS Setup - Simulator

CCS Setup - Simulator

CCS Setup - DSK

Using CCS Start CCS by either: Using the desktop icon: Start -> Programs -> Texas Instruments -> Code Composer Studio 2 -> Code Composer Studio. Run cc_app.exe in c:\CCStudio_v3.1\cc\bin\

Troubleshooting If the following window appears on your screen then: Check that the DSK is connected properly and powered up. Check if the port address and mode is correct

Starting CCS

Connecting DSK Board to CCS Studio

Software: (1) DSK Help DSK6416 help is available via the Help menu in CCS.

Software: (2) PC  DSK Communications CCS uses parallel port to control DSP via JTAG port You can use full TI eXtended Dev System (XDS) via 14 pin header connector Communicate from Windows program (C++, VB) via parallel port using Win32 DLL Use HPI via Win32 DLL DSP JTAG ....... JTAG Emulation Port Note: You should not use the parallel port for simultaneous emulation and HPI connection.

Software: (3) PC  DSK Communications CCS uses USB to control DSP via JTAG port You can use RTDX Communicate from MATLAB (SIMULINK) Use USB DSP JTAG ....... JTAG Emulation Port Note: Limited data rate up to 2MB/Sec.

Software: (4) PC  DSK Communications Win32 API functions for Host to DSK communications: dsk6x_open( ) Open a connection to the DSK dsk6x_close( ) Close a connection to the DSK dsk6x_reset_board( ) Reset the entire DSK board dsk6x_reset_dsp( ) Reset only the DSP on the DSK dsk6x_coff_load( ) Load a COFF image to DSP memory dsk6x_hpi_open( ) Open the HPI for the DSP dsk6x_hpi_close( ) Close the HPI for the DSP dsk6x_hpi_read( ) Read DSP memory via the HPI dsk6x_hpi_write( ) Write to DSP memory via the HPI dsk6x_generate_int( ) Generate a DSP interrupt

Software (5): Project Management Intuitive organization Drag & drop Fast access Easy file manipulation Graphically configure build options Saved with each project

Software: Program Code Editing Features Code Composer Studio allows you to edit C and assembly source code together. The integrated editor provides support for the following activities: o Highlight of keywords, comments, and strings in color o Mark C blocks in parentheses and braces, parenthesis or brace matching o File Find and replace, and quick search o Context-sensitive help o Custom key commands

Software: Edit and Build with CCS

Software: Debugger in CCS Debugging is optimized for DSP C expression based conditional breakpoints Advanced breakpoints View source and dis-assembly simultaneously C and Assembly debugging Advanced Watch Window Multi-processor debug Global breakpoints Synchronized control over groups

Software: What is DSP/BIOS? A scalable real-time kernel for applications Real-time scheduling and synchronization Host-to-target communication Real-time instrumentation DSP/BIOS provides Preemptive multi-threading, hardware abstraction, real-time analysis, and configuration tools Packaged as a set of modules that can be linked into an application Integrated with CCSTM, requires no runtime fees, and is fully supported by TI Supports the TMS320C6000 DSP platform DSP/BIOS Users’ Guide SPRU303B.PDF

Software: eXpress DSP Support Libraries Chip Support Library (CSL) Board Support Library (BSL) DSK version EVM version DSPLIB C62x version C64x version Image/Video Library (IMGLIB)

Software: Chip Support Library (CSL) Provides a C-language interface for configuring and controlling on-chip peripherals. It consists of discrete modules that are built and archived into a library file. Each module relates to a single peripheral with the exception of several modules that provide general programming sup-port, such as the interrupt request (IRQ) module which contains APIs for interrupt management, and the CHIP module which allows the global setting of the chip. SPRU401.PDF

Software: Chip Support Library (CSL)

Software: DSK Board Support Library (BSL) BSL is a set of APIs used to configure and control all on-board devices To make it easier for developers by eliminating much of the tedious grunt-work usually needed to get algorithms up and running in a real system

TMS320C6416 DSP Starter Kit (DSK) The TMS320C6416 DSP Starter Kit (DSK) developed jointly with Spectrum Digital is a low-cost development platform designed to speed the development of high performance applications based on TI´s TMS320C64x DSP generation. The kit uses USB communications for true plug-and-play functionality.   Link: Reference Manual

Kit Contents

TMS320C6416 DSK Hardware Line Out Mic In Line In Headphones Expansion CPU Codec RAM Supply +5V USB JTAG LEDs Reset Sw3 Switches

Typical C6416 DSK Setup USB to PC to +5V Headphones Microphone

DSK6416 Block Diagram

'C6416 DSK Block Diagram TMS320C6416 DSP Starter Kit (DSK) Daughter Card CE0 CPLD Program Cache CE2 Room for Expansion CE1 Flash ROM (512 kB) L2 RAM Prog/Data (1 MB) EMIFB CPU CE3 EMIFA SDRAM (16 MB) CE0 TMS320C6416 DSP Starter Kit (DSK) Data Cache DSK uses both EMIFs (A and B) EMIFA CE0 for SDRAM CE2 and CE3 pinned-out to daughter card connector EMIFB CE1 for Flash Memory and CPLD (switches, LED’s, etc.)

C6416 DSK Memory Map TMS320C6416 C6416 DSK CPLD: LED’s DIP Switches 0000_0000 Internal RAM: 1 MB Internal RAM: 1MB 0010_0000 Internal Peripherals or reserved 6000_0000 EMIFB CE0: 64 MB CPLD 6400_0000 EMIFB CE1: 64 MB Flash: 512 kB 6800_0000 EMIFB CE2: 64 MB 6C00_0000 EMIFB CE3: 64 MB 8000_0000 EMIFA CE0: 256 MB SDRAM: 16 MB 9000_0000 EMIFA CE1: 256 MB A000_0000 EMIFA CE2: 256 MB Daughter Card B000_0000 EMIFA CE3: 256 MB CPLD: LED’s DIP Switches DSK status DSK rev# Daughter Card

DSK6416 Block Diagram Switch SW3

DSK6416 Block Diagram

Laboratory Exercise: DSK Hardware Setup (1) Connect the following cables: USB. Audio cables. (2) Connect the power and observe the Power On Self-Test (POST) (Refer to Slide 15). (3) A . If using the DSK6416 Configure and test the DSK with the utilities shown below:

Laboratory exercise: DSK Hardware Setup Notes: The SDRAM may take a while due to the large amount of SDRAM on the ‘C6416 DSK. The CODEC test performs two operations: (1) a 1kHz tone output, and (2) an audio input to output loopback. You must have a speaker connected to the the output jack to hear the test. If the confidence test fails: (1) Remove the power and parallel cable from the DSK. (2) Reset your PC. (3) Reconnect the power and the parallel cable. (4) Invoke CCS.

Laboratory Exercise (hello64): Using CCS First Project Hello World! #include <stdio.h> void main() { int nTarget = 0; printf("Hello, CCStudio Scripting World!\n"); nTarget = 0x64; printf("We are a C%x!\n", nTarget); } (1) Create a working directory and copy the following files from \Lab03\Code\Hello64: (a) rts6400.lib (b) hello.c (c) lnk.cmd (d) vectors.asm (2) Create a new project (Hello64): (a) Start CCS. (b) Create a new project as shown on the following slides.

Laboratory Exercise (dotp64): Using CCS Implement: with: ai = {40, 39, …, 1} xi = {1, 2, …, 40} (1) Create a working directory and copy the following files from \Lab03\Code\Dotp64: (a) rts6400.lib (b) dotp.c (c) lnk.cmd (d) vectors.asm (2) Create a new project (Dotp64): (a) Start CCS. (b) Create a new project as shown on the following slide.

Laboratory Exercise (dotp64): Using CCS Note: When you type in the “Project Name” a directory is created in the “Location”. Delete this if not required.

Laboratory Exercise (dotp64): Using CCS (3) Add files to the project (dotp.c, lnk.cmd, vectors.asm, rts6400.lib).

Laboratory Exercise (dotp64): Using CCS (4) Change the build options (compile and link):

Laboratory Exercise (dotp64): Using CCS (4) Change the build options (compile and link):

Laboratory Exercise (dotp64): Using CCS (5) Build the output program (dotp64.out): (a) Build the project by: (i) Clicking the Rebuild All toolbar icon. (ii) Selecting Rebuild All in the project menu. (b) Verify that the build output window is complete with “0 errors, 0 warnings”: CCS menu

Laboratory Exercise (dotp64): Using CCS (6) Load the output file Dotp64.out into DSP memory: (a) The program will be automatically loaded after each project build if the “Program Load after Build” option is selected as shown below:

Laboratory Exercise (dotp64): Using CCS (6) Load the output file dotp64.out into DSP memory: (b) Load the dotp64.out by selecting File:Load Program as shown below:

Laboratory Exercise (dotp64): Using CCS (7) Debug and run code: (a) Go to the beginning of the program, that is main() by selecting Debug:Go Main. (b) Watch variables: (i) Select the variable (to be watched) from the dotp64.c file, right click and select “Add To Watch Window”. If the variable is y for instance, the following window will be shown. (ii) To add another variable to the watch select it and then drag and drop it on to the window.

Laboratory Exercise (dotp64): Using CCS (7) Debug and run code: (c) CCS will automatically add the local variables:

Laboratory Exercise (dotp64): Using CCS (7) Debug and run code: (d) You can run or step through the code by using the various icons on the toolbar or use the Debug menu:

Laboratory Exercise (dotp64): Using CCS (e) Stop the processor from running and watch the variable y: y = 0x2cdb or 11480 (8) Benchmarking and profiling code: (a) Stop the processor, reload the code or select Debug: Restart then select Debug: Go Main. (b) Open a new profiling session and select “Profile All Functions” by clicking the following toolbar button:

Laboratory Exercise (dotp64): Using CCS (8) Benchmarking and profiling code: (c) Expand the dotp.c as shown below:

Laboratory Exercise (dotp64): Using CCS (8) Benchmarking and profiling code: (d) Add a breakpoint at “for(;;);”. This can be done by: (i) Click the cursor on the highlighted line below. (ii) Click the “Add Breakpoint” toolbar button:

Laboratory Exercise (dotp64): Using CCS (8) Benchmarking and profiling code: (e) Run the program and examine the profile window:

Profiling Profiling allows you to obtain an average, maximum, and minimum cycle count for blocks of code. Multiple functions, loops, and ranges can all be profiled at the same time. Code Composer will provide you with many readings. The figure used in our DSP lab is the 'CPU Cycles: Incl. Max". The instructions to set profile points and obtain a cycle count for a piece of code: View the profiling windows by selecting Profile->Setup and Profile->Viewer. Load the program onto the DSP. Click on the Stopwatch symbol in the Profiling Setup window on the right to enable profiling. Select the 'Ranges' tab in the Profiling Setup window. Highlight the range of code you would like to obtain the cycle count for and drag it to the 'Ranges' menu. (Another way to do the same is to highlight those lines, right click, and select Profile -> Range.) Run the code for a while for Code Composer to collect data. The default stats shown do not include what we are looking for. In the profiler viewer window, right click on the address range you would like stats for and select 'Columns and Rows Setting'. Different counts can be shown, but 'CPU Cycles: Incl. Max.' is probably the most important.

Laboratory Exercise (Lab1): Using CCS Open Project: Lab1 (Lab03\Project\Lab1\) Run Use Graphics

Laboratory Exercise (Lab1): Using CCS Watch Value it’s nice, but Graphic Display is better!

CCS and DSK CCS Overview: \Links\spru327c.pdf

Chapter 3 Code Composer Studio and the DSK - End -