Printed on Recycled PaperTMS320C6000Code Composer StudioTutorialLiterature Number: SPRU301CFebruary 2000
x
Using the RTDX Control to Change the Load at Run Time6-10PRD statistics are measured in PRD ticks. SWI statistics are measuredin instruction cycles. T
Modifying Software Interrupt PrioritiesAnalyzing Real-Time Behavior6-116.5 Modifying Software Interrupt PrioritiesTo understand why the program is not
Things to Try6-129) Select Debug→Run to run the example again. Use the RTDX-enabledWindows application loadctrl.exe to change the load at run time (as
Learning MoreAnalyzing Real-Time Behavior6-13the CPU load? Now, add calls to STS_set and STS_delta in the dataIOfunction. How does this change affect
6-14
7-1Chapter 7Connecting to I/O DevicesThis chapter introduces RTDX and DSP/BIOS techniques for implementing I/O.In this chapter, you connect a program
Opening and Examining the Project7-27.1 Opening and Examining the ProjectYou begin by opening a project with Code Composer Studio and examiningthe sou
Reviewing the C Source CodeConnecting to I/O Devices7-37.2 Reviewing the C Source CodeThe example in this chapter simulates a DSP application that dig
Reviewing the C Source Code7-4 While control_channel is enabled by the target via a call toRTDX_enableInput, the other RTDX channels are not enabled f
Reviewing the C Source CodeConnecting to I/O Devices7-5 while (TRUE) { /* Read a new volume when the hosts send it */ if (!RTDX_chann
1-1Chapter 1Code Composer Studio OverviewThis chapter provides an overview of the Code Composer Studio softwaredevelopment process, the components of
Reviewing the Signalprog Application7-67.3 Reviewing the Signalprog ApplicationThe source code for the Visual Basic signalprog.exe application is avai
Running the ApplicationConnecting to I/O Devices7-77.4 Running the Application1) Choose Project→Build or click the (Incremental Build) toolbar butto
Running the Application7-8The signalprog.exe program can be started at any point. It does not useRTDX until you click the Test On button.9) Resize the
Running the ApplicationConnecting to I/O Devices7-911) Slide the control in the Volume Slider window. This changes the volumeof the output signal. Wat
Modifying the Source Code to Use Host Channels and Pipes7-107.5 Modifying the Source Code to Use Host Channels and PipesNow you modify the example to
Modifying the Source Code to Use Host Channels and PipesConnecting to I/O Devices7-11Void A2DscaleD2A(HST_Obj *inpChannel, HST_Obj *outChannel){ PI
More about Host Channels and Pipes7-12Calls to PIP_getReaderNumFrames and PIP_getWriterNumFramesthen determine whether there is at least one frame in
Adding Channels and an SWI to the Configuration FileConnecting to I/O Devices7-137.7 Adding Channels and an SWI to the Configuration FileThe A2DscaleD
Adding Channels and an SWI to the Configuration File7-14 mode. This property determines which end of the pipe the targetprogram manages, and which en
Adding Channels and an SWI to the Configuration FileConnecting to I/O Devices7-155) Insert another HST object and rename it output_HST.6) Set the foll
Code Composer Studio Development1-21.1 Code Composer Studio DevelopmentCode Composer Studio extends the basic code generation tools with a set ofdebug
Adding Channels and an SWI to the Configuration File7-167) Right-click on the SWI manager and choose Insert SWI.8) Rename the new SWI0 object to A2Dsc
Running the Modified ProgramConnecting to I/O Devices7-177.8 Running the Modified Program1) Choose Project→Rebuild All or click the (Rebuild All) to
Index-1This is a draft version printed from file: tutorialix.fm on 2/26/0 IndexAanimating program 4-10archiver 1-5.asm file 1-16assembler 1-5assembly
Index-2 Indexenvironment variablesC6X_A_DIR 1-17C6X_C_DIR 1-17PATH 1-17EPROM programmer 1-5examples folder 1-15Execution Graph 5-10explicit instrument
Index-3IndexNnaming conventions 5-7new project 2-2O.obj file 1-16objectediting properties 5-7inserting 3-3renaming 3-3optionscolor 2-9, 4-13font 2-4op
Index-4 Indexsectti utility 3-10SEM module 1-11signalprog.exe 7-6simulator iii, 1-2SIO module 1-11slider.exe 7-7source filesadding to project 2-3mixed
Code Composer Studio DevelopmentCode Composer Studio Overview1-3Code Composer Studio includes the following components:❏TMS320C6000 code generation to
Code Generation Tools1-41.2 Code Generation ToolsThe code generation tools provide the foundation for the developmentenvironment provided by Code Comp
Code Generation ToolsCode Composer Studio Overview1-5The following list describes the tools shown in Figure 1-1: ❏The C compiler accepts C source code
Code Composer Studio Integrated Development Environment1-61.3 Code Composer Studio Integrated Development EnvironmentThe Code Composer Studio Integrat
Code Composer Studio Integrated Development EnvironmentCode Composer Studio Overview1-71.3.2 Application Building FeaturesWithin Code Composer Studio,
DSP/BIOS Plug-ins1-81.4 DSP/BIOS Plug-insDuring the analysis phase of the software development cycle, traditionaldebugging features are ineffective fo
DSP/BIOS Plug-insCode Composer Studio Overview1-9❏It serves as a visual editor for creating and setting properties for run-timeobjects that are used b
IMPORTANT NOTICETexas Instruments and its subsidiaries (TI) reserves the right to make changes to their products or todiscontinue any product or servi
DSP/BIOS Plug-ins1-101.4.2 DSP/BIOS API ModulesUnlike traditional debugging, which is external to the executing program, theDSP/BIOS features require
DSP/BIOS Plug-insCode Composer Studio Overview1-11❏ MEM. The memory module allows you to specify the memory segmentsrequired to locate the various cod
Hardware Emulation and Real-Time Data Exchange1-121.5 Hardware Emulation and Real-Time Data ExchangeTI DSPs provide on-chip emulation support that ena
Hardware Emulation and Real-Time Data ExchangeCode Composer Studio Overview1-13RTDX consists of both target and host components. A small RTDX software
Third-Party Plug-ins1-14RTDX is well-suited for a variety of control, servo, and audio applications. Forexample, wireless telecommunications manufactu
Code Composer Studio Files and VariablesCode Composer Studio Overview1-151.7 Code Composer Studio Files and VariablesThe following sections provide an
Code Composer Studio Files and Variables1-161.7.2 File ExtensionsWhile using Code Composer Studio, you work with files that have the followingfile-nam
Code Composer Studio Files and VariablesCode Composer Studio Overview1-171.7.3 Environment VariablesThe installation procedure defines the following v
1-18
2-1Chapter 2Developing a Simple ProgramThis chapter introduces Code Composer Studio and shows the basic processused to create, build, debug, and test
iiiThis is a draft version printed from file: tut_pref.fm on 2/26/0 PrefaceRead This FirstAbout This ManualCode Composer Studio speeds and enhances th
Creating a New Project2-22.1 Creating a New ProjectIn this chapter, you create a project with Code Composer Studio and addsource code files and librar
Adding Files to a ProjectDeveloping a Simple Program2-32.2 Adding Files to a Project1) Choose Project→Add Files to Project. Select hello.c and click O
Reviewing the Code2-4When building the program, Code Composer Studio finds files by searchingfor project files in the following path order:❏The folder
Building and Running the ProgramDeveloping a Simple Program2-5#ifdef FILEIO /* clear char arrays */ for (i = 0; i < BUFSIZE; i++) { sc
Building and Running the Program2-6To build and run the program, follow these steps:1) Choose Project→Rebuild All or click the (Rebuild All) toolbar
Changing Program Options and Fixing Syntax ErrorsDeveloping a Simple Program2-72.5 Changing Program Options and Fixing Syntax ErrorsIn the previous se
Changing Program Options and Fixing Syntax Errors2-83) If you are programming for the TMS320C6701 and your program usesfloating point values, go to th
Using Breakpoints and the Watch WindowDeveloping a Simple Program2-92.6 Using Breakpoints and the Watch WindowWhen you are developing and testing prog
Using Breakpoints and the Watch Window2-1010) At the prompt, type goodbye and click OK. Notice that the Stdout tabshows the input text in blue.Also no
Using the Watch Window with StructuresDeveloping a Simple Program2-112.7 Using the Watch Window with StructuresIn addition to watching the value of a
iv Notational ConventionsNotational ConventionsThis document uses the following conventions:❏The TMS320C6000 core is also referred to as ’C6000.❏Code
Profiling Code Execution Time2-122.8 Profiling Code Execution TimeIn this section, you use the profiling features of Code Composer Studio togather sta
Profiling Code Execution TimeDeveloping a Simple Program2-13Profile-points are handled before the profile-point line is executed. Theyreport the numbe
Things to Try2-1414) Before continuing to the next chapter (after completing section 2.9, page2-14), perform the following steps to free the resources
3-1Chapter 3Developing a DSP/BIOS ProgramThis chapter introduces DSP/BIOS and shows how to create, build, debug,and test programs that use DSP/BIOS.In
Creating a Configuration File3-23.1 Creating a Configuration FileAnother way to implement the hello world program is to use the LOG moduleprovided wit
Creating a Configuration FileDeveloping a DSP/BIOS Program3-3You see a window like the following. You can expand and contract the listby clicking the
Adding DSP/BIOS Files to a Project3-4Although these files have extensions of .s62 and .h62, they can also beused with the TMS320C6701. DSP/BIOS does n
Adding DSP/BIOS Files to a ProjectDeveloping a DSP/BIOS Program3-55) In the Project View area, right-click on the vectors.asm source file andchoose Re
Testing with Code Composer Studio3-6interrupts and hardware interrupts to occur. Chapter 5 throughChapter 7 explain these types of events.10) Choose F
Testing with Code Composer StudioDeveloping a DSP/BIOS Program3-79) Choose Tools→RTDX to open the RTDX control window. Select RTDXDisable from the pul
Read This FirstvRelated Documentation from Texas InstrumentsRelated Documentation from Texas InstrumentsThe following books describe the devices, rela
Profiling DSP/BIOS Code Execution Time3-83.4 Profiling DSP/BIOS Code Execution TimeEarlier, you used the profiling features of Code Composer Studio to
Profiling DSP/BIOS Code Execution TimeDeveloping a DSP/BIOS Program3-9Calls to LOG_printf are efficient because the string formatting isperformed on t
Things to Try3-103.5 Things to TryTo explore Code Composer Studio, try the following:❏Load myhello.out and put a breakpoint on the line that calls LOG
4-1Chapter 4Testing Algorithms and Data from a FileThis chapter shows the process for creating and testing a simple algorithmand introduces additional
Opening and Examining the Project4-24.1 Opening and Examining the ProjectYou begin by opening a project with Code Composer Studio and examiningthe sou
Opening and Examining the ProjectTesting Algorithms and Data from a File4-36) Expand the Project View by clickingthe + signs next to Project,VOLUME.MA
Reviewing the Source Code4-44.2 Reviewing the Source CodeDouble-click on the volume.c file in the Project View to see the source codein the right half
Reviewing the Source CodeTesting Algorithms and Data from a File4-5 /* loop forever */ while(TRUE) { /* Read using a Probe Point connec
Adding a Probe Point for File I/O4-64.3 Adding a Probe Point for File I/OIn this section, you add a Probe Point, which reads data from a file on yourP
Adding a Probe Point for File I/OTesting Algorithms and Data from a File4-76) Choose File→File I/O. The File I/O dialog appears so that you can select
vi Related Documentationports, direct memory access (DMA), clocking and phase-locked loop(PLL), and the power-down modes.TMS320C62x Technical Brief (l
Adding a Probe Point for File I/O4-8 The Length field specifies how many samples from the data file areread each time the Probe Point is reached. You
Displaying GraphsTesting Algorithms and Data from a File4-94.4 Displaying GraphsIf you ran the program now, you would not see much information about w
Animating the Program and Graphs4-104.5 Animating the Program and GraphsSo far, you have placed a Probe Point, which temporarily halts the target,tran
Animating the Program and GraphsTesting Algorithms and Data from a File4-11buffer contains the values just read from sine.dat, while the output buffer
Adjusting the Gain4-124.6 Adjusting the GainRecall from section 4.2, page 4-4 that the processing function multiplies eachvalue in the input buffer by
Viewing Out-of-Scope VariablesTesting Algorithms and Data from a File4-134.7 Viewing Out-of-Scope VariablesYou have used the Watch Window to view and
Viewing Out-of-Scope Variables4-1410) Notice that the Watch window area says this variable is an unknownidentifier. This shows that *input is not defi
Using a GEL FileTesting Algorithms and Data from a File4-154.8 Using a GEL FileCode Composer Studio provides another way of modifying a variable. This
Adjusting and Profiling the Processing Load4-164.9 Adjusting and Profiling the Processing LoadIn Chapter 2, you used profile-points to measure the num
Adjusting and Profiling the Processing LoadTesting Algorithms and Data from a File4-1712) Type 2 as the new load and click Execute. The maximum number
viiThis is a draft version printed from file: tutorialtoc.fm on 2/26/0 Contents1 Code Composer Studio Overview . . . . . . . . . . . . . . . . . . .
Things to Try4-184.10 Things to TryTo explore using Code Composer Studio, try the following:❏Add processingLoad to the Watch window. When you use the
5-1Chapter 5Debugging Program BehaviorThis chapter introduces techniques for debugging a program and severalDSP/BIOS plug-ins and modules.In this chap
Opening and Examining the Project5-25.1 Opening and Examining the ProjectYou begin by opening a project with Code Composer Studio and examiningthe sou
Reviewing the Source CodeDebugging Program Behavior5-35.2 Reviewing the Source CodeThis example modifies the example from Chapter 4 to introduce real-
Reviewing the Source Code5-4 The dataIO function calls SWI_dec, which decrements a counterassociated with a software interrupt object. When the counte
Reviewing the Source CodeDebugging Program Behavior5-5/* ======== processing ======== * * FUNCTION: Called from processing_SWI to apply signal *
Modifying the Configuration File5-65.3 Modifying the Configuration FileA DSP/BIOS configuration file has already been created for this example. Inthis
Modifying the Configuration FileDebugging Program Behavior5-74) Right-click on the LOG object called LOG_system. From the pop-upmenu, select Propertie
Modifying the Configuration File5-87) Since the dataIO function is no longer run within main, what causes thisCLK object to run its function? To find
Modifying the Configuration FileDebugging Program Behavior5-910) Right-click on the processing_SWI software interrupt object. From thepop-up menu, sel
viii Contents3 Developing a DSP/BIOS Program . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-1This chapter
Viewing Thread Execution with the Execution Graph5-105.4 Viewing Thread Execution with the Execution GraphWhile you could test the program by putting
Viewing Thread Execution with the Execution GraphDebugging Program Behavior5-119) Choose Debug→Run or click the (Run) toolbar button. The ExecutionG
Changing and Viewing the Load5-125.5 Changing and Viewing the LoadUsing the Execution Graph, you saw that the program meets its real-timedeadlines. Ho
Changing and Viewing the LoadDebugging Program Behavior5-137) Right-click on the Execution Graph and choose Clear from the pop-upmenu. Notice that the
Changing and Viewing the Load5-1412) Using the GEL control, change the load to 1500 and click Execute. TheCPU Load Graph and the Execution Graph stop
Analyzing Thread StatisticsDebugging Program Behavior5-155.6 Analyzing Thread StatisticsYou can use other DSP/BIOS controls to examine the load on the
Analyzing Thread Statistics5-165) If you have halted the program, click the (Run) toolbar button.6) Notice the Max value in the Statistics View. SWI
Adding Explicit STS InstrumentationDebugging Program Behavior5-175.7 Adding Explicit STS InstrumentationIn the previous section, you used the Statisti
Viewing Explicit Instrumentation5-185.8 Viewing Explicit InstrumentationTo view information provided by the explicit instrumentation calls you added,y
Viewing Explicit InstrumentationDebugging Program Behavior5-199) Multiply the Max value for processingLoad_STS by 4.Because you used the CLK_gethtime
ContentsixContents6.6 Things to Try. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .6-
Things to Try5-2015) Remove the check mark from the enable USER0 trace box in the RTAControl Panel.16) Right-click on the Statistics View and choose C
6-1Chapter 6Analyzing Real-Time BehaviorThis chapter introduces techniques for analyzing and correcting real-timeprogram behavior.In this chapter, you
Opening and Examining the Project6-26.1 Opening and Examining the ProjectIn this chapter, you modify the example you worked on in the previouschapter.
Modifying the Configuration FileAnalyzing Real-Time Behavior6-36.2 Modifying the Configuration FileFor this example, you need to add one new object to
Modifying the Configuration File6-47) Click the + sign next to the SWI manager. A SWI object called PRD_swiwas added automatically. This software inte
Reviewing the Source Code ChangesAnalyzing Real-Time Behavior6-56.3 Reviewing the Source Code ChangesDouble-click on the volume.c file in the Project
Reviewing the Source Code Changes6-6This function uses RTDX API functions to change the load of the processingsignal in real time. Notice the followin
Using the RTDX Control to Change the Load at Run TimeAnalyzing Real-Time Behavior6-76.4 Using the RTDX Control to Change the Load at Run TimeWhile you
Using the RTDX Control to Change the Load at Run Time6-87) Right-click on the Statistics View area and choose Property Page fromthe pop-up menu. Highl
Using the RTDX Control to Change the Load at Run TimeAnalyzing Real-Time Behavior6-914) Using the Windows Explorer, run loadctrl.exe, which is located
Commenti su questo manuale