Chapter 3 Code Composer Studio and the DSK. Dr. Naim Dahnoun, Bristol University, (c) Texas Instruments 2002 Chapter 3, Slide 2 Learning Objectives 

Slides:



Advertisements
Similar presentations
Chapter 9 Bootloader.
Advertisements

Chapter 20 This chapter provides a series of applications. There is no daughter cards with the DSK6713 and DSK6416 Part 1: Applications using the PCM3003.
Code Composer Studio and the DSKs
Slides created by: Professor Ian G. Harris PIC Development Environment MPLAB IDE integrates all of the tools that we will use 1.Project Manager -Groups.
ARM development environment Modified Content Philips LPC2106 ARM chip ARM target board PSPad customised development environment Troubleshooting.
Microcomputer Systems 1
FIR TYPE-I Lowpass Filtering using TMS320C6711 Floating Point Processor DEMO Presentation Prepared by: Bashir SADEGHI Supervised by: Dr. Erhan A. INCE.
Chapter 9 Bootloader. Dr. Naim Dahnoun, Bristol University, (c) Texas Instruments 2002 Chapter 9, Slide 2 Learning Objectives  Need for a bootloader.
Infineon Technologies Corp. June 99 1 HOT167-1 Version 2.0 * C167CS not yet supported by DAvE V1.0 CD ROM. See “Hints regarding DAvE.” Exercise 7ASC_1.
Infineon Technologies Corp. June 99 1 HOT167-1 Version 2.0 F PWMmax = x 50ns = 78 kHz Pulse Width Modulation Unit (PWM) (20 MHz)  4 independent.
1-1 Embedded Software Development Tools and Processes Hardware & Software Hardware – Host development system Software – Compilers, simulators etc. Target.
LAUNCHXL2-RM57L – Project 0
Using PDG with e2studio: Example
ECE Department: University of Massachusetts, Amherst Lab 1: Introduction to NIOS II Hardware Development.
1 Introduction to Programming Environment Using MetroWerks CodeWarrior and Palm Emulator.
EE 345S Real-Time Digital Signal Processing Lab Fall 2008
Asst. Prof. Dr. Alper ŞİŞMAN
Dr. Hoganson CSIS HC11 Demo Program This is our first lab using the 68HC11 microcontroller. We will “talk” to the microcontroller from a PC, run.
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.
Lecture 3 Code Composer Studio and the DSK6416
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
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.
EE 362 Microprocessor Systems and Interfacing © 2-1 Laboratory 2.1 Part 1: Assembler Directives Procedure:  Create a directory called H:\cx\source\ee362\lec02\L02LabAld.
Getting Started Installing GreenHills and Net+OS Setting up the Development Board Building the Sample Application.
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.
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
AT91SAM9261-EK WinCE 5.0 DEMO ATMEL AT91 Application & Support Group Version 1.O February 2007.
Spring Introduction  Today’s tutorial focuses on introducing you to Xilinx ISE and Modelsim.  These tools are used for Verilog Coding Simulation.
1 Introduction to Xilinx ISL8.1i Schematic Capture and VHDL 1.
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.
1 Introduction to Xilinx ISL8.1i & 11.1 Schematic Capture 1.
Active-HDL Interfaces Debugging C Code Course 10.
Chapter 3 Code Composer Studio and the DSKs DSK6711, DSK6713 and DSK6416.
DSP Implementation Using The TMS320C6711 Demo Eastern Mediterranean University Department of Electrical & Electronics Engineering Texas Instruments Assistant:
Bit-DSP-MicrocontrollerTMS320F2812 Texas Instruments Incorporated European Customer Training Center University of Applied Sciences Zwickau (FH)
Introduction to the C6713 Laurier Boulianne
Design of DSP testing environment Performed By: Safovich Yevgeny Instructors: Eli Shoshan Yevgeni Rifkin הטכניון - מכון טכנולוגי לישראל הפקולטה.
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.
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.
DSP C5000 Chapter 10 Understanding and Programming the Host Port Interface (EHPI) Copyright © 2003 Texas Instruments. All rights reserved.
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.
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
This chapter provides a series of applications.
DEMO Presentation Prepared by: Bashir SADEGHI Supervised by: Dr
Software Setup & Validation
Chapter 9 Bootloader.
Computer System Laboratory
ECE 3567 Microcontrollers Lab
Presentation transcript:

Chapter 3 Code Composer Studio and the DSK

Dr. Naim Dahnoun, Bristol University, (c) Texas Instruments 2002 Chapter 3, Slide 2 Learning Objectives  Introduction to Code Composer Studio (CCS).  Installation and setup of CCS.  Introduction to the DSK.  Laboratory.

Dr. Naim Dahnoun, Bristol University, (c) Texas Instruments 2002 Chapter 3, Slide 3 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 visualisation.

Dr. Naim Dahnoun, Bristol University, (c) Texas Instruments 2002 Chapter 3, Slide 4 CCS Installation and Setup (A)Install the CCS Software. (B)Run CCS Setup:  Start CCS setup utility by using the following desktop icon:  Alternatively:  Windows Start Menu -> Programs -> Texas Instruments -> Code Composer Studio 2 (‘C6000) -> Setup Code Composer Studio.  Run cc_setup.exe located in: c:\ti\cc\bin\

Dr. Naim Dahnoun, Bristol University, (c) Texas Instruments 2002 Chapter 3, Slide 5 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.

Dr. Naim Dahnoun, Bristol University, (c) Texas Instruments 2002 Chapter 3, Slide 6 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 C6x11DSK Port x y Mode.  The port number, x, and port mode, y, depend on your PC setup.

Dr. Naim Dahnoun, Bristol University, (c) Texas Instruments 2002 Chapter 3, Slide 7 CCS Installation and Setup  If you do not know your configuration then you can select it automatically using the “Configure C6x11 DSK” Utility.

Dr. Naim Dahnoun, Bristol University, (c) Texas Instruments 2002 Chapter 3, Slide 8 CCS Installation and Setup  Finally save and quit the import configuration dialog box.

Dr. Naim Dahnoun, Bristol University, (c) Texas Instruments 2002 Chapter 3, Slide 9  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:\ti\cc\bin\ Using CCS

Dr. Naim Dahnoun, Bristol University, (c) Texas Instruments 2002 Chapter 3, Slide 10Troubleshooting  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 (See Slide 7).

Dr. Naim Dahnoun, Bristol University, (c) Texas Instruments 2002 Chapter 3, Slide 11 Introduction to the ‘C6711 DSK  The ‘C6711 DSK provides a powerful, low-cost development environment.  The DSK comes with CCS code development tools (does not include the simulator).  A laboratory at the end of this section takes you through the DSK setup and shows you how to run the confidence test to check it is working correctly.

Dr. Naim Dahnoun, Bristol University, (c) Texas Instruments 2002 Chapter 3, Slide 12 DSK Contents Hardware (Schematics)Schematics   150 MHz ‘C6711 DSP   TI 16-bit A/D Converter (‘AD535)   External Memory   16M Bytes SDRAM   128K Bytes Flash ROM   LED’s   Daughter card expansion   Power Supply & Parallel Port Cable Software   Code Generation Tools (C Compiler, Assembler & Linker)   Code Composer Debugger (256K program limitation)   Example Programs & S/W Utilities   Power-on Self Test   Flash Utility Program   Board Confidence Test   Host access via DLL   Sample Program(s)

Dr. Naim Dahnoun, Bristol University, (c) Texas Instruments 2002 Chapter 3, Slide V Power Supply16M SDRAM128K FLASH Daughter Card I/F (EMIF Connector) Parallel Port I/F Power Jack Power LED 3.3V Power Supply JTAG Header Emulation JTAG Header Reset Line Level Output (speakers) Line Level Input (microphone) 16-bit codec (A/D & D/A) Three User LEDs User DIP switches ‘C6711 DSP D. Card I/F (Periph Con.) TMS320C6711 Hardware: (1) Overview  The daughter card interface socket provides a method for accessing most of the C6711 DSP for hardware extension.

Dr. Naim Dahnoun, Bristol University, (c) Texas Instruments 2002 Chapter 3, Slide 14 Hardware: (2) DSK Connections (A)Parallel port: The PC’s parallel port is connected to the parallel port on the DSK. (B)JTAG: An XDS JTAG emulator connected to the PC (either internal or external) is connected to the JTAG header on the DSK. Line-level Output Line-level Input PCDSK Parallel Cable Power Supply External Power Supply PCDSKJTAG Power Supply Line-level Output Line-level Input XDS External Power Supply

Dr. Naim Dahnoun, Bristol University, (c) Texas Instruments 2002 Chapter 3, Slide 15 Hardware: (3) Power On Self Test (POST) TestLED 3LED 2LED 1Description 0000Start state 1001DSP internal SRAM test 2010External SDRAM test 3011DSP McBSP0 loop back test 4100External codec read/write test 5101External codec tone generation test 6110External LED and DSP timer test 7111Unused – available for future test use B L I N K A L LAll tests completed successfully  There are three LEDs to provide the user with feedback from the test procedure.  The test program (stored in the FLASH memory, code available on the DSK CD-ROM) runs every time DSK is powered on and reset.

Dr. Naim Dahnoun, Bristol University, (c) Texas Instruments 2002 Chapter 3, Slide 16 TMS320C6711 Hardware: (4) Resets Apply Power   POST runs CCS Reset   Menu selection: Debug  DSP Reset   Resets ‘C6711 DSP   Causes bootload from FLASH which overwrites internal memory Absolute Reset On rare occasions you might have to:   Pull power jack   Pull parallel port Reset Pushbutton   Don’t push when CCS is running   Does not force FULL system reset   To fully reset board, pull power plug Power On Self Test (POST)   Counts   4:  mic input  spkr out   5: sinewave  spkr out   Don’t start CCS until end (all 3 LEDs flash at the end)   If switches are set to 0100, a fast version of POST is run

Dr. Naim Dahnoun, Bristol University, (c) Texas Instruments 2002 Chapter 3, Slide 17 Hardware: (5) Memory Maps FFFF_FFFF 0000_ KB Internal (Program or Data) On-chip Periph 0180_ MB External 8000_ _0000 A000_0000 B000_0000 TMS320C _0000 Available via Daughter Card Connector ‘C6711 DSK 16MB SDRAM 128K byte FLASH 4 byte I/O Port  LED’s  Switches  DSK status  DSK rev#  Daughter Card

Dr. Naim Dahnoun, Bristol University, (c) Texas Instruments 2002 Chapter 3, Slide 18 Hardware: (5) Memory Maps Description OriginLength Internal RAM (L2) mem0x x EMIF control regs 0x x Cache configuration reg 0x x L2 base addr & count regs 0x x L1 base addr & count regs 0x x L2 flush & clean regs 0x x CE0 mem attribute regs 0x x CE1 mem attribute regs 0x x CE2 mem attribute regs 0x x CE3 mem attribute regs 0x018482c0 0x HPI control reg 0x x McBSP0 regs 0x018c0000 0x McBSP1 regs 0x x Timer0 regs 0x x c Timer1 regs 0x x c Interrupt selector regs 0x019c0000 0x c EDMA parameter RAM 0x01a x EDMA control regs 0x01a0ffe0 0x QDMA regs 0x x QDMA pseudo-regs 0x x McBSP0 data 0x x McBSP1 data 0x x CE0, SDRAM, 16 MBytes 0x x CE1, 8-bit ROM, 128 Kbytes0x x CE1, 8-bit I/O port 0x x CE2 - Daughtercard 0xA x CE3 - Daughtercard 0xB x

Dr. Naim Dahnoun, Bristol University, (c) Texas Instruments 2002 Chapter 3, Slide 19 Software: (1) PC Host Utilities DSK Loader dsk6ldr.exe filename.out  Runs on PC host  Downloads.out file to DSK memory map  Stand alone DSK loader for when you want to bypass CCS FLASH Programming hex6x.exe f.out h.cmd flash.exe f.hex  First, convert file.out to file.hex  The flash utility downloads the hex file into the on-DSK FLASH  Both programs run on the PC host. Links\SPRA804.pdf Links\SPRA804.pdf DSK Confidence Test dsk6xtst  Run from MSDOS prompt  Command-line utility tests proper installation of the DSK board  Additionally, it tests: Internal SRAM, SDRAM, FLASH, McBSP, Timers, EDMA, LEDs and Audio codec

Dr. Naim Dahnoun, Bristol University, (c) Texas Instruments 2002 Chapter 3, Slide 20 Software: (2) CCS DSK Utilities Confidence Test 1.Unload any gel files already loaded in CCS 2.Load conftest.gel 3.Run confidence tests from GEL menu Quick Test Quick Test  Run from CCS GEL menu  Defined in dsk6xinit.gel  Non-intrusive test by reading and writing:  LEDs  Switches  DSK board revision  Outputs switch values General Extension Language (GEL): An interpretive language that enables you to write functions to configure the IDE and access the target processor.

Dr. Naim Dahnoun, Bristol University, (c) Texas Instruments 2002 Chapter 3, Slide 21 Software: (3) DSK Help  DSK6711 help is available via the Help menu in CCS.

Dr. Naim Dahnoun, Bristol University, (c) Texas Instruments 2002 Chapter 3, Slide 22 Software: (4) PC  DSK Communications DSP JTAG JTAGEmulationPort CCS uses parallel port to control DSP via JTAG port You can use full TI eXtended Dev System (XDS) via 14 pin header connector Use HPI via Win32 DLL Communicate from Windows program (C++, VB) via parallel port using Win32 DLL Note: You should not use the parallel port for simultaneous emulation and HPI connection.

Dr. Naim Dahnoun, Bristol University, (c) Texas Instruments 2002 Chapter 3, Slide 23 Software: (4) PC  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  Win32 API functions for Host to DSK communications:

Dr. Naim Dahnoun, Bristol University, (c) Texas Instruments 2002 Chapter 3, Slide 24 Laboratory Exercise: DSK Hardware Setup (1)Connect the following cables:  Parallel port.  Audio cables. (2)Connect the power and observe the Power On Self- Test (POST) (Refer to Slide 15). (3)Run the confidence test for the PC. There are three methods to run this test: (a)Run the “dsk6xtst.exe” by double-clicking on the file in “\Code\Chapter 03 - CCS and DSK\”. (b)Run the “dsk6xtst.exe” file from windows by double clicking on the file in “\ti\c6000\dsk\conftest\Host\Debug”. (c)Open a DOS window and run the “dsk6xtst.exe” file located in the directory above.

Dr. Naim Dahnoun, Bristol University, (c) Texas Instruments 2002 Chapter 3, Slide 25 Laboratory exercise: DSK hardware setup Notes:  The SDRAM may take a while due to the large amount of SDRAM on the ‘C6711 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.

Dr. Naim Dahnoun, Bristol University, (c) Texas Instruments 2002 Chapter 3, Slide 26 Laboratory Exercise: Using CCS Implement: with: a i = {40, 39, …, 1} x i = {1, 2, …, 40} (1)Create a working directory and copy the following files from \Code\Chapter 03 - CCS and DSK\: (a)lab3.cdb (b)lab3.c (c)lab3cfg.cmd (2)Create a new project: (a)Start CCS. (b)Create a new project as shown on the following slide.

Dr. Naim Dahnoun, Bristol University, (c) Texas Instruments 2002 Chapter 3, Slide 27 Laboratory Exercise: Using CCS

Dr. Naim Dahnoun, Bristol University, (c) Texas Instruments 2002 Chapter 3, Slide 28 Laboratory Exercise: Using CCS (3)Add files to the project (lab3.c, lab3.cdb, lab3cfg.cmd).

Dr. Naim Dahnoun, Bristol University, (c) Texas Instruments 2002 Chapter 3, Slide 29 Laboratory Exercise: Using CCS (4)Change the build options (compile and link):

Dr. Naim Dahnoun, Bristol University, (c) Texas Instruments 2002 Chapter 3, Slide 30 Laboratory Exercise: Using CCS (5)Build the output program (lab3.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”:

Dr. Naim Dahnoun, Bristol University, (c) Texas Instruments 2002 Chapter 3, Slide 31 Laboratory Exercise: Using CCS (6)Load the output file lab3.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:

Dr. Naim Dahnoun, Bristol University, (c) Texas Instruments 2002 Chapter 3, Slide 32 Laboratory Exercise: Using CCS (6)Load the output file lab3.out into DSP memory: (b)Load the lab3.out by selecting File:Load Program as shown below:

Dr. Naim Dahnoun, Bristol University, (c) Texas Instruments 2002 Chapter 3, Slide 33 Laboratory Exercise: 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 lab3.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.

Dr. Naim Dahnoun, Bristol University, (c) Texas Instruments 2002 Chapter 3, Slide 34 Laboratory Exercise: Using CCS (7)Debug and run code: (c) CCS will automatically add the local variables:

Dr. Naim Dahnoun, Bristol University, (c) Texas Instruments 2002 Chapter 3, Slide 35 Laboratory Exercise: 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:

Dr. Naim Dahnoun, Bristol University, (c) Texas Instruments 2002 Chapter 3, Slide 36 (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 name it “Session 1” and select “Profile All Functions” by clicking the following toolbar button: Laboratory Exercise: Using CCS (e)Stop the processor from running and watch the variable y: y = 0x2cdb or 11480

Dr. Naim Dahnoun, Bristol University, (c) Texas Instruments 2002 Chapter 3, Slide 37 Laboratory Exercise: Using CCS (8)Benchmarking and profiling code: (c)Expand the lab3.c as shown below:

Dr. Naim Dahnoun, Bristol University, (c) Texas Instruments 2002 Chapter 3, Slide 38 Laboratory Exercise: 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:

Dr. Naim Dahnoun, Bristol University, (c) Texas Instruments 2002 Chapter 3, Slide 39 Laboratory Exercise: Using CCS (8)Benchmarking and profiling code: (e)Run the program and examine the profile window:

Dr. Naim Dahnoun, Bristol University, (c) Texas Instruments 2002 Chapter 3, Slide 40 CCS and DSK  CCS Overview:  \Links\spru301c.pdf \Links\spru301c.pdf  Resets:  \Links\ccs_dsk.pdf \Links\ccs_dsk.pdf

Chapter 3 Code Composer Studio and the DSK - End -