Code Composer Studio and the DSKs DSK6711, DSK6713 and DSK6416

  • Upload
    aretha

  • View
    259

  • Download
    12

Embed Size (px)

DESCRIPTION

Code Composer Studio and the DSKs DSK6711, DSK6713 and DSK6416. Dr. Naim Dahnoun, Bristol University, (c) Texas Instruments 2004. Learning Objectives. Introduction to C ode C omposer S tudio - CCS Installation and Setup of CCS. Introduction to the DSK-TI. - PowerPoint PPT Presentation

Citation preview

  • Code Composer Studio and the DSKs

    DSK6711, DSK6713 and DSK6416Dr. Naim Dahnoun, Bristol University, (c) Texas Instruments 2004

  • Learning ObjectivesIntroduction to Code Composer Studio - CCSInstallation and Setup of CCSIntroduction to the DSK-TILaboratorio: Implementazione di un filtraggio vocale sul 6713-DSK.

  • CCSCode Composer StudioC/C++ Compiler, Assembly Optimiser and LinkerThe Code Composer Studio (CCS) application provides an Integrated Development Environment (IDE) with an Editor, Compiler, Debugger, Project Manager, Profiler, etc.Real-time Analysis and Data VisualizationDSP Simulator (for DSKs)Real-Time Operating System - RTOS (DSP/BIOS)Real-Time Data Exchange (RTDX) Host - Target

  • CCSInstallation 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\

  • CCS SetupYou should now see a screen similar to this:Note: If you dont see the Import Configuration dialog box you should open it from the menu using: File:Import.

  • CCS SetupYou 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.

  • If you do not know your configuration then you can select it automatically using the Configure C6x11 DSK Utility.CCS Setup

  • Finally Save and Quit the import configuration dialog box.CCS Setup

  • Using CCSStart 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\

  • TroubleshootingIf 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 6).

  • Introduction to the C6711 DSKThe C6711 DSK provides a powerful, low-cost development environment.The DSK comes with CCS code development tools (does not include the simulator).

  • DSK6711 ContentsHardware150 MHz C6711 DSPTI 16-bit A/D Converter (AD535)External Memory16 MB SDRAM128 kB Flash ROMLEDsDaughter card expansionPower Supply & Parallel Port Cable

    SoftwareCode Generation Tools (C Compiler, Assembler & Linker)Code Composer Debugger (256K program limitation)Example Programs & S/W UtilitiesPower-on Self TestFlash Utility ProgramBoard Confidence TestHost access via DLLSample Program(s)

  • Hardware: Overview1.8V Power Supply16M SDRAM128K FLASHDaughter Card I/F(EMIF Connector)ParallelPort I/FPowerJackPowerLED3.3V Power SupplyJTAG HeaderEmulationJTAG ControllerResetLine Level Output (speakers)Line Level Input (microphone)16-bit codec (A/D & D/A)Three User LEDsUser DIPswitchesC6711DSPD. Card I/F(Periph Con.)TMS320C6711 The daughter card interface socket provides a method for accessing most of the C6711 DSP for hardware extension.

  • Hardware: DSK Connections

  • Hardware: Power On Self Test (POST)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.

  • Hardware: Resets

  • Hardware: Memory Maps

  • Description OriginLengthInternal RAM (L2) mem0x00000000 0x00010000EMIF control regs 0x01800000 0x00000024Cache configuration reg 0x01840000 0x00000004L2 base addr & count regs 0x01844000 0x00000020L1 base addr & count regs 0x01844020 0x00000020L2 flush & clean regs 0x01845000 0x00000008CE0 mem attribute regs 0x01848200 0x00000010CE1 mem attribute regs 0x01848240 0x00000010CE2 mem attribute regs 0x01848280 0x00000010CE3 mem attribute regs 0x018482c0 0x00000010HPI control reg 0x01880000 0x00000004McBSP0 regs 0x018c0000 0x00000028McBSP1 regs 0x01900000 0x00000028Timer0 regs 0x01940000 0x0000000cTimer1 regs 0x01980000 0x0000000cInterrupt selector regs 0x019c0000 0x0000000cEDMA parameter RAM 0x01a00000 0x00000800EDMA control regs 0x01a0ffe0 0x00000020QDMA regs 0x02000000 0x00000014QDMA pseudo-regs 0x02000020 0x00000014McBSP0 data 0x30000000 0x04000000McBSP1 data 0x34000000 0x04000000CE0, SDRAM, 16 MB 0x80000000 0x01000000CE1, 8-bit ROM (FLASH),128 kB0x90000000 0x00020000CE1, 8-bit I/O port 0x90080000 0x00000004CE2 Daughter card 0xA0000000 0x10000000CE3 Daughter card 0xB0000000 0x10000000On-chipPeripheralsMemoryMapsDK6711

  • Software:PC Host UtilitiesDSK Loaderdsk6ldr.exe f.outRuns on PC hostDownloads file.out to DSK memory mapStand alone DSK loader for when you want to bypass CCSFLASH Programminghex6x.exe f.out h.cmdflash.exe f.hexFirst, convert file.out to file.hexThe flash utility downloads the file.hex into the on-DSK FLASHBoth programs run on the PC host. Links: SPRA804.pdfDSK Confidence Testdsk6xtstRun from MSDOS promptCommand-line utility tests proper installation of the DSK boardAdditionally, it tests: Internal SRAM, SDRAM, FLASH, McBSP, Timers, EDMA, LEDs and Audio codec

  • Software:CCS DSK UtilitiesConfidence Test 1.Unload any gel files already loaded in CCS2.Load conftest.gel3.Run confidence tests from GEL menu Quick Test Run from CCS GEL menuDefined in dsk6xinit.gelNon-intrusive test by reading and writing:LEDsSwitchesDSK board revisionOutputs switch valuesGeneral Extension Language (GEL):

    An interpretive language that enables you to write functions to configure the IDE and access the target processor.

  • Software:DSK HelpDSK6711 help is available via the Help menu in CCS.

  • Software:PC DSKCommunicationsXDS

  • dsk6x_open( ) Open a connection to the DSKdsk6x_close( ) Close a connection to the DSKdsk6x_reset_board( ) Reset the entire DSK boarddsk6x_reset_dsp( ) Reset only the DSP on the DSKdsk6x_coff_load( ) Load a COFF image to DSP memorydsk6x_hpi_open( ) Open the HPI for the DSPdsk6x_hpi_close( ) Close the HPI for the DSPdsk6x_hpi_read( ) Read DSP memory via the HPIdsk6x_hpi_write( ) Write to DSP memory via the HPIdsk6x_generate_int( ) Generate a DSP interruptWin32 API functions for Host to DSK communications:Software:PC DSKCommunications

  • TMS320C6713DSP Starter Kit (DSK)TheTMS320C6713 DSP Starter Kit (DSK) developed jointly withSpectrum Digital is a low-cost development platform designed to speed the development of highprecision applications based on TIs TMS320C6000 floating pointDSP generation.

    Link: tmdsdsk6713.html Link: Reference Manual

  • 'C6713 - DSK Block DiagramDaughter CardRoomforExpansionInternalMemoryCPUProgram CacheData CacheEMIFSDRAM(8 MB)CE2CE3Flash ROM(256 kB)I/O PortCE1DSK uses all FOUR External Memory regionsCE0 for SDRAMCE1 for Flash Memory and I/O Port (switches, LEDs, etc.)CE2 and CE3 pinned-out to daughter card connectorCE0

  • C6713 - DSK Memory MapCPLDComplex Programmable Logic Device

    Sono dispositivi logici RIPROGRAMMABILI. La programmazione permette ai CPLD di simulare un generico circuito digitale di complessita' non elevata. A differenza delle FPGA le CPLD mantengono la programmazione anche quando non sono alimentate perch contengono delle memorie non volatili. Vengono usate per applicazioni particolari dove sono richieste alte velocita' o bassi costi o funzionalita' di glue logic overo di interfacciamento tra due dispositivi complessi.

  • 'C6713 - DSK Block Diagram

  • TMS320C6416DSP Starter Kit (DSK)TheTMS320C6416 DSP Starter Kit (DSK) developed jointly withSpectrum Digital is a low-cost development platform designed to speed the development of high performance applications based on TIs TMS320C64x DSP generation. The kit uses USB communications for true plug-and-play functionality.

    Link: tmdsdsk6416.htmlLink: Reference Manual

  • 'C6416 - DSK Block DiagramDSK uses both EMIFs (A and B)EMIFACE0 for SDRAMCE2 and CE3 pinned-out to daughter card connectorEMIFBCE1 for Flash Memory and CE0 for CPLD (switches, LEDs, etc.)

  • 'C6416 - DSK Block Diagram

  • C6416 - DSK Memory Map

  • 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).(3.a) If using the DSK6711 Configure and test the DSK with the utilities shown below:

  • (3.b) If you are using the DSK6713 or DSK6416

    Use the Diagnostics Utilities show below: 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.Laboratory Exercise:DSK Hardware Setup

  • Laboratory Exercise:Using CCS

    Implement:

    with: ai = {40, 39, , 1}xi = {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.

  • Laboratory Exercise: Using CCS

  • Laboratory Exercise: Using CCS

  • (4) Change the build options (compile and link):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:Laboratory Exercise: Using CCS

  • 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:

  • (6) Load the output file lab3.out into DSP memory: (b) Load the lab3.out by selecting File: Load Program as shown below: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.Laboratory Exercise: Using CCS

  • (7) Debug and run code: (c) CCS will automatically add the local variables:

    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:Laboratory Exercise: Using CCS

  • (7) Debug and run code: (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 name it Session 1 and select Profile All Functions by clicking the following toolbar button:

    Laboratory Exercise: Using CCS

  • (8) Benchmarking and profiling code: (c) Expand the lab3.c as shown below: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:Laboratory Exercise: Using CCS

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

  • CCS and DSK CCS Overview: \Links\spru301c.pdf Resets:\Links\ccs_dsk.pdf