Home
Code Composer Studio User's Guide
Contents
1. A 10 7 E Index 6 registers viewing reloading COFF file removing file from project requirements operating system h a resetting DSP resetting the target 2 18 restarting program 8 Run a Run Free Run to Cursor 2 14 Sampling Rate graph option saving files scanning dependencies section setting breakpoints 4 2 setting build options 10 9 setting file specific options setting Find Replace properties setting project level options 10 9 setup 1 3 sei E simulator B 5 single stepping invoking multiple operations slider GEL keyword 5 source file Standard toolbar Start Address graph option statistics profiling imm Display graph option 6 38 Steplnto 2 14 StepOut 2 14 StepOver 2 14 stop build 10 10 storing data file streaming data symbol Symbol Size graph option symbol table symbolic information synchronizing multiple processors Synchronous Animation Synchronous Halt Synchronous Run 8 3 system requirements 1 2 tabbing multiple lines target board configuring 1 3 ael system andl finding a ue ne Time Display Unit aren pa 6 32 Time Frequency graph 6 2 Time Frequency options Acquisition putter Size Autoscale Axes Display E Cursor Mode 6 18 Data Plot St le i DC Value Display ateg ize Display Peak and Hold Display Type 6 3 SE Graph Title Grid Style Left Shifted Data Seale ET Magnitude Displa To Plot Data F
2. sample mak Include H E Libraries sample cmd E Source sample c E File View Bookmarks The Project View is automatically opened when Code Composer Studio is started If the Project View is not visible select View gt Project Click the File View icon at the bottom of the Project View window if the Bookmarks icon is selected Within a project files are grouped into separate folders Include Contains all header include files h Libraries Contains all library files lib Source Contains all source files c asm The linker command file cmd appears directly under the project file mak To expand or contract the Project list click the signs next to the Project folder the project name mak and the folders Include Libraries and Source The Project Environment 10 3 Using the Project View Window 10 2 1 Using the Project View Context Menus Many operations can be performed within the Project View window using context menus For example to quickly close a project right click on the project name and select Close B File View kd Allow Docking Project view Files GEL files Project E T Inchid ae Files l Librat can All Dependencies samp Build a Sourc Options Hide Float In Main Window Here are a few more shortcuts m m To open an existing project right click on Project
3. 4 stee Locked Step You can use locked step to single step all processors that are not already running T StepOvel Locked Step Over You can use locked step over command to execute step over on all processors that are not already running Step0ut Locked Step Out If all the processors are inside a subroutine you can use locked step out to execute the Step Out command on all the processors that are not already running fun f Synchronous Run This command sends a global Run command to all processors that are not already running a Hat synchronous Halt This command halts all processors simultaneously Animate Synchronous Animation This command starts animating all the processors that are not already running See Section 2 7 Run Halt Animate Run Free for details Multiprocessing With Code Composer Studio 3 5 Broadcasting GEL Commands 3 5 Broadcasting GEL Commands To broadcast GEL commands 1 Select Group gt Broadcast Command from the Parallel Debug Manager menu This opens the Broadcast Command dialog box 2 Enter a built in GEL function or user defined GEL function in the command box see Section 12 5 Loading Unloading GEL Functions 3 Click OK or press Enter to broadcast the command to each processor in the current group Note Broadcast GEL Commands Broadcast GEL commands are restricted to processors whose parent window is also open 3 6 Auto Executing GEL F
4. This error message may be appearing due to the use of linker options other than those provided by Code Composer Studio These options may have been set via environment variables in your autoexec bat file Windows 95 or your System Environment Variables Windows NT or by options you have typed yourself into the Code Composer Studio Build Options dialog box A possible solution is to remove the z option from the set C_OPTION line in your autoexec bat file Windows 95 or from the System Environment Variables Windows NT and or remove the Assembler Linker options you have typed yourself in the Code Composer Studio Build Options dialog box The options set when using Code Composer Studio are not used when I build a project For example have turned optimization off from the Code Composer Studio Build Options dialog box When start the compile process can see that the TI compiler has been invoked with the correct options however when I look at the final code optimization has not been turned off The TI code generation tools are invoked using the options that you have specified in the Code Composer Studio Build Options dialog box However these options are overridden by options set via environment variables such as C_OPTIONS Therefore if you have environment variables defined in your autoexec bat file Windows 95 or as part of your System Environment Variables Windows NT these options will override any conflicti
5. Contents Overview of Features 0 0 eee eee 9 1 1 Standard Toolbar 0 00 c eect ele 9 1 2 Edit Toolbar 208 adie fan acted alee dn ee a dl eae War ee ea 9 2 Keyboard ShortcutS a a ai E a E E E S 9 2 1 Customizing Keyboard Shortcuts s sssaaa aaea 9 3 File Manipulation 0 0 0 0c eee eae 9 3 1 Creating a New File 0 20 9 3 2 Openinga File site neasi ae eee dean bee eat de phe eee doen 9 3 3 Duplicating File Views 0 00 cece ete eee 9 3 4 SAVING Fil Ss 022 cerime pee atees e A a ee ee ae pe ee ere 9 3 5 Printing FileSs i 2i 4 pend yene Jpb eee ee ele eda aie Bb ole daded 9 3 6 Cutting Copying and Pasting Text 0 0 00 c eee eee 9 3 7 Deleting Text ocean de aiaa ede tie eared A R a ta dda eee ne cae 9 3 8 Editing Columns 0000 c eects 9 3 9 Undo Redo Actions 02 00 cee ee 9 3 10 Tabbing Multiple Lines 00 eee 9 3 11 Go To Source LING sasia a eens need eee eee eee bale eee eee ens 9 3 12 Changing Fonts 0 00 cect ee 9 4 Finding and Replacing Text 0 cece eee 9 4 1 Finding Text in the Current File 0 000 ccc eee eee 9 4 2 Setting Find Replace Properties 000 cece eee eee eee 9 4 3 Finding and Replacing Text 00 c eee tee 9 4 4 Finding Text in Multiple Files 0 2 0 cee eee eee 9 5 Setting Editor Properties 2 0 000 c cece 9 6 Using Bookmarks s i saamia e
6. Find Replace hi Replace Replace all Properties Type the search text in the Find field Click Find next The Integrated Editor 9 15 Finding and Replacing Text 9 4 2 9 4 3 9 16 Setting Find Replace Properties You can control your search by setting options in the Find Replace Properties dialog 1 3 In the Find and Replace dialog box click Properties The Find Replace Properties dialog box appears Find Replace Properties x Direction C Up I Match case Down I Whole word Cancel Help Select options to specify Direction Specify the direction of the search Match case Search for text that matches the capitalization of the text string Whole word Match only occurrences of the text string that are not preceded or followed by an alphanumeric character or an underscore Click OK Finding and Replacing Text In addition to finding text within a file you can also use the Find Replace command to search for a text string and replace it with another text string To Find and Replace Text a A U N 6 Position the insertion point where you want to start your search Select Edit gt Find Replace The Find and Replace dialog box appears Type the search text in the Find field Type the text you wish to replace the text with in the Replace field Click Find next When the text is found click Replace to replace the selected tex
7. creating Gaels Cursor Mode Ac 6 18 6 24 6 32 6 38 cutting text D data copying data file formats 5 5 loading 5 storing Data Plot Style graph option DC Value graph option define GEL preprocessing statement 12 9 deleting breakpoints 4 2 Probe Points 4 8 text dependencies displaying 10 4 excluding file from scanning 10 8 regenerating 10 8 8 scanning search path 10 7 device drivers setup dialog GEL keyword 12 12 disable Probe Points Dis Assembly options _ 2 4 disassembly options 2 4 Dis Assembly window breakpoints changing start address opening multiple windows Probe Points profile pois Oa using 2 3 disassemb 2 defined B 2 Display Data Size graph option 6 14 display formats setting 2 7 Watch window Display Length graph option 6 29 Display Peak and Hold graph El Display Type graph option i6 a 6 20 dockable windows 2 DSP Data Type graph option 6 15 a Index 2 E Edit toolbar 9 4 editing CPU registers editing a memory location 2 editing bookmarks editing columns editing variables Watch window editor 9 1 creating Tiles cutting copying ive ei 12 deleting duplicating your view Edit toolbar 9 4 find and replace 9 15 GoTo source line 9 13 keyboard shortcuts 9 5 opening files redo setting properties Standard toolbar 9 3 3 using emulator enable Probe Points 4 10 entry point environment project environment
8. j Ppeqoraen pe ee 4 10 Probe Points To Enable a Probe Point Select Debug gt Probe Points The Break Probe Profile Points dialog box appears with the Probe Points tab selected Select the Probe Point you wish to enable from the Probe Point window The Probe Point checkbox is empty when the Probe Point is disabled Click on the Probe Point checkbox This puts a check in the box indicating that the Probe Point is now enabled Click OK to close the dialog box To Disable a Probe Point Select Debug gt Probe Points The Break Probe Profile Points dialog box appears with the Probe Points tab selected Select the Probe Point you wish to disable from the Probe Point window The Probe Point checkbox is checked when the Probe Point is enabled Click on the Probe Point checkbox This removes the check from the box indicating that the Probe Point is now disabled Click OK to close the dialog box To Enable All Probe Points Select Debug gt Probe Points The Break Probe Profile Points dialog box appears with the Probe Points tab selected Click Enable All All checkboxes now contain a check mark Click OK to close the dialog box To Disable All Probe Points Select Debug gt Probe Points The Break Probe Profile Points dialog box appears with the Probe Points tab selected Click Disable All All checkboxes change to empty Click OK to close the dialog box Breakpoints and Probe Points 4 11 Conditional Probe Point
9. Here is a sample of C code include lt stdio h gt main printf hello world n 1 In syntax descriptions the instruction command or directive is in a bold typeface and parameters are in an italic typeface Portions of a syntax that are in bold should be entered as shown portions of a syntax that are in italics describe the type of information that should be entered Syntax that is entered on a command line is centered Syntax that is used in a text file is left justified m Square brackets and identify an optional parameter If you use an optional parameter you specify the information within the brackets Unless the square brackets are in a bold typeface do not enter the brackets themselves Related Documentation From Texas Instruments Related Documentation From Texas Instruments For additional information on your target processor and related support tools see Related Documentation in Code Composer Studio s online help Related Documentation Trademarks You can use the following books to supplement this user s guide American National Standard for Information Systems Programming Language C X3 159 1989 American National Standards Institute ANSI standard for C The C Programming Language second edition by Brian W Kernighan and Dennis M Ritchie published by Prentice Hall Englewood Cliffs New Jersey 1988 Programming in C Kochan Steve G Hayden Book Company Code Composer Studio DS
10. Points are useful for setting probes in ROM memory or tracing memory accesses Note Target Processor Halts on Probe Point The target processor is temporarily halted by the host processor when it encounters a hardware Probe Point Therefore the target application may not be able to meet real time constraints when using hardware Probe Points Note Simulator Hardware Probe Points Not Supported Hardware breakpoints and thus Probe Points cannot be implemented on a simulated DSP target Loo To Trace Memory Accesses The following steps allow you to create a file object that stores the data at the memory location you wish to trace see Section 5 1 File Input Output 1 Select File gt File I O 2 Inthe File I O dialog box click Add Probepoint The Break Probe Profile Points dialog box appears with the Probe Points tab selected 3 In the Probe type field from the drop down list select probe on lt bus gt lt Read Write R W gt at location 4 Inthe Location field enter the memory location you want to trace 5 Select the file object from the Connect To drop down list 6 Click Add to create and enable a new Probe Point 7 Click OK to close the dialog box Breakpoints and Probe Points 4 13 Chapter 5 Using the File Input Output Capabilities This chapter describes how you can stream files into your actual or simulated target as signals It also tells you how to load and store PC files with target memory
11. The asterisk disappears when the file is saved Select File gt Save or File gt Save As The Save As dialog box appears You can also use the Save File button on the Standard toolbar Save File In the main window of the Save As dialog box double click the directory where you want to store the source file If the directory you want is not visible navigate to the correct directory The file name appears in the File name field If you want to change the file extension type in another extension or select one in the Save as type field Click Save New files are labeled Untitled until they are saved Before you can save or close a window it must be active To make a window active click anywhere in the window or select Window gt Untitled The Integrated Editor 9 9 File Manipulation 9 3 2 9 3 3 9 3 4 9 10 Opening a File The Open command opens an existing source file You can open any ASCII file created with any editor To Open a File 1 4 Select File gt Open The Open dialog box appears You can also use the File Open button on the Standard toolbar a File Open ry In the main window of the Open dialog box double click the file you want to open If the file you want is not visible navigate to the correct directory and double click the file The file name appears in the File name field If you want to change the file extension type in another extension or select one in the Files of type fi
12. m Start Address V Source 6 34 Image m RGB Specifies the relationship among R G and B samples Selecting RGB causes the following additional field to be displayed in the Graph Property Dialog box E Interleaved Data Sources Specifies whether the signal sources are interleaved or not If this option is set to Yes the following additional fields appear in the Graph Property Dialog box I Start Address This represents a single buffer input with triple interleaved sources This implies a 3 source input buffer where the interleaving length is 1 For example the sequence RoGoBoR1G1B4 represents a stream of RGB components for pixel 0 followed by the components for pixel 1 I Bits Per Pixel You may select among the following options 8 256 Color Palette Each pixel is an 8 bit value indexed to a palette 16 6 Bits for Green Each pixel is a 2 byte value with 5 bits for red 6 bits for green and 5 bits for blue 24 Each pixel is a 3 byte value with 8 bits for red green and blue respectively 32 Each pixel is a 4 byte value with the highest byte not used and 8 bits for red green and blue If you choose either 16 6 Bits for Green 24 or 32 for Bits Per Pixel an additional property is displayed I Image RGB Order Specifies the order of red green and blue colors You may choose among the following options RGB BGR RBG BRG GBR and GRB If you choose 8 256 Color Palette in Bits Per Pixel an addition
13. such as the start address and acquisition buffer size For more information see Section 2 3 3 1 Using Symbols within Expressions How the Image Graph Works There are two buffers associated with the graph window the acquisition buffer and the display buffer The acquisition buffer resides on the actual simulated target board It contains the data that you are interested in When a graph is updated the acquisition buffer is read from the actual simulated target board and updates the display buffer The display buffer resides in the host memory so it keeps a history of the data The graph is generated from the data in the display buffer When you have entered all your option choices and press OK the graph window is updated It receives an acquisition buffer of DSP data that starts at the data memory location you enter in the Start Address field A display buffer is allocated within the host memory with no data to display initially Both the acquisition buffer and the display buffer maintain the entire image When the graph is updated the acquisition buffer containing the entire image is fetched from the actual simulated target board and the display buffer is overwritten by the acquisition buffer When the associated Probe Point is reached see Section 4 4 Probe Points a block of DSP data is read and the display is updated The following sections describe input fields in the Graph Property Dialog box The Graph Window 6 33 Image
14. the contents of the Reference Buffer are not changed This option only becomes active when Enable Reference Buffer is selected All input fields are C expression input fields An expression containing a symbol name can be used to specify the starting address in the Memory Window Options dialog For further information see Section 2 3 3 1 Using Symbols within Expressions Display Formats The Memory window can display the contents of memory in many different formats The supported display formats are listed below C style hex Words are displayed with the prefix Ox Hex TI format for displaying hex numbers Signed integer Values are shown as signed integers Unsigned integer Values are shown as unsigned integers Character Character equivalent of the LSB of each word is displayed Packed character Each word is shown as the sum of 8 bit characters Floating point Values are shown in decimal floating point format Exponential float Values are shown in exponential floating point format Binary Values are shown in binary format Using the Memory Window 2 3 2 Editing a Memory Location You can edit a memory location in one of the following ways 1 In the Memory window double click on the data you wish to edit or LY Select the Edit gt Memory gt Edit command Both of these methods open the Edit Memory dialog box If you have double clicked on a memory location in the Memory window the Address and Data fields contain the address
15. 3 Click OK The Integrated Editor 9 13 File Manipulation 9 3 12 Changing Fonts You can change the text font and size with the Option gt Font command To Change a Font and Size 1 Select Option gt Font The Font dialog box appears 2 Select the font font style and size that you wish to use 3 Click OK 9 14 Finding and Replacing Text 9 4 Finding and Replacing Text Code Composer Studio allows you to search the current file or multiple files for a text string You may also choose to replace one text string with another text string 9 4 1 Finding Text in the Current File Use the Find field in the standard toolbar to quickly search the active window for a text string To Find a Text String 1 Type the search string in the Find field which is part of the standard toolbar The Find field is a scrollable list containing a history of search strings You may scroll through the list to find a previous search parameter Begin your search by clicking either the Find Next or Find Previous button on the Standard toolbar depending on the direction of the search Find Next ry Find Previous T Alternatively you can use the Edit gt Find Replace command to search for a text string To Find a Text String Using the Find Replace Command 1 2 3 4 Position the insertion point where you want to start your search Select Edit gt Find Replace The Find and Replace dialog box appears Find and Replace
16. Click Delete Click OK to close the dialog box To Delete All Probe Points Using the Probe Point Dialog Box Select Debug gt Probe Points The Break Probe Profile Points dialog box appears with the Probe Points tab selected Click Delete All Click OK to close the dialog box To Delete All Probe Points Using the Toolbar Click the Remove All Probepoints button on the Project toolbar E Remove All Probepoints Connecting Probe Points To Connect a Display Window to a Probe Point 1 2 Open the window that you want to connect to Create the Probe Point by placing the cursor on the line where you want the point set and clicking on the Toggle Probe Point button on the Project toolbar Toggle Probe Point ie Select Debug gt Probe Points The Break Probe Profile Points dialog box appears with the Probe Points tab selected In the Probe Point window the new Probe Point that you have created appears This Probe Point indicates it currently has no connection Ww echocan c line 191 gt No Connection Select this Probe Point to make it current You can now edit its fields in the dialog box Select a type of Probe Point from the Probe type drop down list The default is unconditional This means that every time the execution of the code reaches the Probe Point its connected file or window is updated Breakpoints and Probe Points 4 9 Probe Points and execution of the code continues after the update You can chan
17. GEL Functions 12 5 12 10 Loading Unloading GEL Functions When you have defined the file containing your GEL function s you must load it into Code Composer Studio before you can access the functions in that file The GEL functions then reside in Code Composer Studio s memory and can be executed at any time The GEL function remains in memory until you remove the corresponding file When a loaded file is modified you must unload it and then reload it before the changes take effect The GEL loader checks for syntax errors in the file when it is loaded It does not check variables to see if they are defined Therefore you can load the GEL function even before you load your COFF file containing the symbolic information This also allows you to reference GEL functions that are not yet defined or loaded The symbols must be defined when the GEL function is executed If Code Composer Studio finds syntax errors while it is loading it aborts the loading process and displays the appropriate error message You must fix the error and then attempt to reload the file To Load a GEL File 1 Select File gt Load Gel 2 Inthe Open dialog box browse to the file containing your GEL functions 3 Either double click on the filename or click on the filename and then click Open 1 If the Project View window is not visible select View gt Project 2 Right click on the GEL Files folder and select Load GEL from the context menu 3 Inthe Open d
18. GEL_MemoryFill Built In GEL Functions e aO AEN Save a block of memory to File Format Parameters Description Example See Also GEL_MemorySave Startaddress Page Length fileName Startaddress required first address in the block Page required identifies the type of memory to fill Memory Type Page Parameter Program memory 0 Data memory 1 I O space 2 For processors that do not have more than one type of memory use 0 for this parameter For simulated DSP targets I O Space parameter is not supported Length required defines the number of words to fill fileName required in quotes name of file to store the target data GEL_MemorySave can be used to save a block of target memory to a specified file The block of data is specified by the Startaddress Page and Length If the filename contains a out for the file extension COFF format is used otherwise C Style Hex is used GEL_MemorySave 0x1000 1 0x100 c workdir temp dat GEL_MemoryLoad GEL_MemoryFill The General Extension Language GEL 12 29 Built In GEL Functions ejam Open an Output Window for Display Format Parameters Description Example See Also 12 30 GEL_OpenWindow windowName windowType MaxLines windowName optional in quotes user defined name of the output window If a name is not specified Macro Output is assumed window Type optional type of output window to create 0 scrolling window
19. I Index Increment Specifies the sample index increment for the data graph A specification in this field is equivalent to a sample offset for noninterleaved sources This permits you to extract signal data from multiple sources using a single graph An index increment of 2 for instance corresponds to a sample offset value of 2 which in turn graphically displays every other sample in the acquisition buffer You can therefore specify multiple data sources for display by entering the corresponding offset value in this field This option provides a general specification for interleaved sources E FFT Framesize Specifies the number of samples used in each FFT calculation Note Acquisition Buffer a Different Size The acquisition buffer can be a different size than the FFT frame size L J E FFT Order Specifies the FFT size 2 FFT order E FFT Windowing Function You may select among the following windowing functions Rectangle Bartlett Blackman Hanning Hamming These are performed on the data before the FFT calculation is performed Time Frequency m FFT Waterfall Performs an FFT on the data in the display buffer and plots a magnitude versus frequency graph as a frame A chronological series of these frames forms an FFT waterfall graph When you select the FFT Waterfall option the following additional options appear in the Graph Property Dialog box E Frequency Display Unit Specifies the unit of measure for the frequency
20. Not Connected To connect a file to a Probe Point click Add Probepoint The Break Probe Profile Points dialog box appears with the Probe Points tab selected L Inthe Probe Point list highlight the Probe Point you want to connect to Notice that the Probe Point has No Connection 1 From the Connect To drop down list select the appropriate file LY Click Replace Notice that the Probe Point list now shows that the Probe Point is connected to the file you have selected LY Click OK The Probepoint field in the File I O dialog box show the word Connected when a file has been successfully connected to a Probe Point In the File I O dialog box enter values in the Address and Length fields for each file selected The Address field specifies where you want the data transferred to File Input or from File Output You can enter either a valid label or a numeric address in this field The Length field indicates how many samples are to be transferred to File Input or from File Output the target board every time the selected Probe Point is reached You can enter affny valid C expression in the Address and Length fields These expressions are recalculated every time samples are read from or written to the target This means that if you enter a symbol in this field that later changes in value you do not have to reenter this parameter Click OK The parameters you have entered will be verified Using the File In
21. Probe Point or open and close the window as needed When you connect the Profile Statistics window to a Probe Point it only updates when the Probe Point is hit Therefore you have control over when in your application the Profile Statistics window updates This window only displays profiler results and is not needed to collect profiler statistics therefore it does not need to be open all the time To Clear Statistics for a Profile Point 1 Select the desired profile point in the Profile Statistics window using the mouse or the cursor keys The selected profile point is outlined with a dotted line 2 Right click and select Clear Selected from the context menu The count average total maximum and minimum fields are cleared to 0 There is no undo for this action on the Edit menu To Clear Statistics for All Profile Points Right click and select Clear All from the context menu All count average total maximum and minimum fields are cleared to 0 There is no undo for this action on the Edit menu 11 10 Viewing Statistics To Change the Display Options 1 Click on the Profile Statistics window to make it current 2 Right click and select Properties gt Display Options from the context menu The Profiler Display Options dialog box appears Profiler Display Options Ed m Justification Units Left Cycle C Center Time s Right C Freg Hz Cancel Help You may select either the Lef
22. Sampling Rate Status Bar Display 6 32 Time Display Unit Trigger Level Trigger Source Image graph Image options Byte Packing l 37 Color Space Operations Cursor Mode Error Diffusion Graph Title Image Origin Image Row 4 pa Aligned l 37 Lines Per Display 457 Pixels Per Line Status Bar Display Uniform Quantization to 256 Colors 6 38 Time Frequency graph Time Frequency options Acquisition Buffer Size Autoscale Axes Display Cursor Mode Data Page Data Plot Style DC Value Display Data Size Index 4 Graph window Time Frequency options continued Display Peak and Hold Display Type DSP Data Type Graph Title Grid Style Left Shifted Dala Display Bae Magnitude Displa Scale Plot Data ee 6 16 Q Value Sampling as Start Address Status Bar Display 7 6 17 Graph Window Tinere uency Options Data Page 6 21 6 281 6 36 Grid Style grap option 6 18 grouping processors H Halt 2 16 hardware breakpoints 4 7 hardware Probe Points 4 13 hardware profile points 11 9 help using online help 1 4 hotmenu GEL keyword 12 11 I Image graph 6 33 Image options Byte Packing 6 37 Color Space Operations 6 32 Cursor Mode aa Error Diffusion _ 6 Graph Title 6 34 Image Origin Image Row 4 Aligned 6 37 Lines Per Displa Pixels Per Line Status Bar Display Uniform Quantization to 256 Colors Image Origin graph option 6 37 incremental bui
23. Setting this option to Yes implies a 2 source input buffer where the odd samples represent the first source and even samples represent the second Setting this option to Yes creates the following additional field in the Graph Property Dialog box I Start Address Starting location on the actual simulated target board of the acquisition buffer containing the data to be graphed When the graph is updated the acquisition buffer starting at this location is fetched from the actual simulated target board The acquisition buffer then updates the display buffer which is graphed You can enter any valid C expression in the Start Address field This expression is recalculated every time samples are read from the actual simulated target This means that if you enter a symbol in this field and the symbol later changes value you do not have to reenter this parameter Setting Interleaved Data Sources to No creates the following additional fields I Start Address upper display I Start Address lower display I Index Increment Specifies the sample index increment for the data graph A specification in this field is equivalent to a sample offset for noninterleaved sources This permits you to extract signal data from multiple sources using a single graph An index increment of 2 for instance corresponds to a sample offset value of 2 which in turn graphically displays every other sample in the acquisition buffer You can therefore specify mult
24. The variable must be a char pointer pointing to the first character of the string on the target Using the Watch Window 8 5 Quick Watch 8 4 8 6 Quick Watch You can use the Quick Watch feature of the Code Composer Studio debugger to quickly view and or modify variables or add an item to the Watch window The Quick Watch dialog box is similar to the Watch window therefore many of the features are very similar To modify a variable double click on it To expand or collapse an expression make sure that it is selected and then press Enter To View a Variable Using Quick Watch 1 Place the cursor on the variable that you wish to examine in the Edit window 2 Right click and select Quick Watch from the context menu The Quick Watch dialog box appears You may also use the Quick Watch button on the Debug toolbar Quick Watch a Chapter 9 The Integrated Editor This chapter describes the features you may use in Code Composer Studio to edit your source program Topic Page 9 1 Overview of Features 0cc ccc e ccc e cece eee eennees 9 2 Keyboard Shortcuts 0000ccncccsssncccsceressacs 9 3 File Manipulation 0000cccecee eee eee e ne eaeeees 9 4 Finding and Replacing Text 0eeeecceeeeeeee 9 15 9 5 Setting Editor Properties 00cceeeeeceeeeeeees 9 6 Using Bookmarks e secretes creer sce eee ice eer seems econ tees 9 19 9 1 Overview of Features 9 1 Ov
25. Variable dialog box Edit Yariable x Variable Jec_parms flag Value oxo00d Cancel Help Edit the information in the Value field as desired You can also replace the existing watch expression with a new one For example you can modify the existing expression to change its display format See Section 8 3 Watch Window Display Formats Note Cannot Edit Expanded Expression You cannot edit the Variable field if the variable is an expanded expression or if itis an element of an expanded variable If you want to change the variable you must first collapse the variable and then edit it LS Watch Window Display Formats 8 3 Watch Window Display Formats You can use formatting symbols to change the display format of the variables in the Watch window The default display format depends on the type of variable displayed To change the format enter the variable followed with a comma and formatting letter as follows myVar x 0x1234 Symbol d e f Format Decimal Exponential floating point Decimal floating point Hexadecimal Octal Unsigned integer ASCII character bytes Packed ASCII character using big endian format the first character is in the most significant byte MSBbyte of the target Packed ASCII character using little endian format the first character is in the least significant byte LSByte of the target Note P and p Display String The p and P formats display a string on the target
26. a JTAG based device driver this command also disconnects from the target processor so you can remove the JTAG or MPSD cable You can also perform a hardware reset of your target processor while in free run Note Simulator Run Free Not Supported When running the simulator the run free capability is not available Run Halt Animate Run Free 2 7 1 Setting Animation Speed The animation speed is the minimum time between breakpoints In animation mode the program executes until a breakpoint is encountered At this breakpoint execution stops and all windows not connected to any Probe Points are updated The program execution resumes until the next breakpoint This animates the processor state at each breakpoint A Probe Point always resumes execution after updating the window connected to it To Set Animation Speed 1 Select the command Option gt Animate Speed 2 Inthe Animate Speed Properties dialog box enter the animation speed in seconds 3 Click OK Program execution does not resume until the minimum time has expired since the previous breakpoint To animate select Debug gt Animate To halt animation select Debug gt Halt The Basics of Code Composer Studio 2 17 Resetting Your Target Processor 2 8 2 9 2 18 Resetting Your Target Processor The following commands are available to reset your target processor Reset DSP The Debug gt Reset DSP command initializes all register contents to their power
27. a signal in serial fashion Although the samples are only available one at a time this lets you view a history of the samples When the associated Probe Point is reached see Section 4 4 Probe Points a block of DSP data is read and the display is updated The following sections describe input fields in the Graph Property Dialog box Display Type Graph Title The Display Type option in the Graph Property Dialog box contains several options in the drop down menu in the right column The Constellation option appears by default when you use the command View gt Graph gt Constellation Other options for this field are associated with time frequency see Section 6 1 Time Frequency eye see Section 6 3 Eye Diagram or image graphs see Section 6 4 Image You can identify each graph that you create with a unique title This helps to differentiate results when there are many windows open Interleaved Data Sources Specifies whether the signal sources are interleaved or not Toggling this display option allows a single buffer input to represent two sources Setting this option to Yes implies a 2 source input buffer where the odd samples represent the first source X source and even samples represent the second Y source Setting this option to Yes creates the following additional field in the Graph Property Dialog box m Start Address Starting location on the actual simulated target board of the acquisition buffer containing the d
28. and select Open project To add a file to a project right click on the project name and select Add Files To edit a file right click on the file name and select Open To set compiler options for an individual source file right click on the file name and select File Specific Options To compile a single file right click on the file name and select Compile file To build the entire project right click on the project name and select Build To remove a file from a project right click on the file name and select Remove from project 10 2 2 Drag and Drop Capabilities Windows 95 98 NT Code Composer Studio supports drag and drop capability for Windows 95 98 NT You can load any project mak or source c asm cmd file by dragging the file from Windows Explorer directly into the Project View window Adding Files to the Project 10 3 Adding Files to the Project Use the following procedures to add source code files object files library files and a linker command file to a project or remove a file from the project list To Add Files to the Project 1 Select Project gt Add Files to Project The Add Files to Project dialog box appears OR Right click on the project name in the Project View window and select Add Files 2 Inthe Add Files to Project dialog box specify a file to add If the file does not exist in the current directory browse to the correct location Use the Files of type drop down list t
29. are C expression input fields An expression containing a symbol name can be used for all fields requiring numerical inputs such as the start address and acquisition buffer size For more information see Section 2 3 3 1 Using Symbols within Expressions 6 2 1 How the Constellation Diagram Works There are two buffers associated with the graph window the acquisition buffer and the display buffer The acquisition buffer resides on the actual simulated target board It contains the data that you are interested in When a graph is updated the acquisition buffer is read from the actual simulated target board and updates the display buffer The display buffer resides in the host memory so it keeps a history of the data The graph is generated from the data in the display buffer When you have entered all your option choices and press OK the graph window receives an acquisition buffer of DSP data of length you entered in the Acquisition Buffer Size field starting at DSP location Start Address in the data memory space A display buffer of size Constellation Points is allocated within the host memory with no data to display initially The Graph Window 6 19 Constellation Diagram 6 2 2 6 2 3 6 2 4 6 20 When the graph is updated the entire display buffer is left shifted by the value in the Acquisition Buffer Size field with the values of the DSP acquisition buffer shifted in from the right end This is useful when you are processing
30. eee 12 2 GEL Function Definition 0 0 ee 12 3 GEL Function Parameters 0000 ccc eee 12 4 Calling GEL Functions and Statements 00000 cece eee 12 4 1 GEL Return Statement 00 0 eee 12 42 GELIfElse Statement 0 0 00 ee 12 43 GEL While Statement 0 00000 c eee 12 44 GEL Comments 0 00 cece eee 12 45 GEL Preprocessing Statements 000 c eee eee 12 5 Loading Unloading GEL Functions 000 c cece eee 12 6 Adding GEL Functions to the GEL Menu Using Keywords 12 6 1 The hotmenu Keyword 0000 eee 12 6 2 The dialog Keyword 0 cece eae 12 6 3 The slider Keyword 00 cece tenes 12 7 Accessing the Output Window 0 000 cece eae 12 8 Autoexecuting GEL Functions Upon Startup 00 0c eee eee 12 9 Viewing the Expression Queue 200 cts 12 10 Built In GEL Functions 0 0 00 ccc eee A Frequently Asked Questions 00 e cece eee A 1 Installation Loading Code Composer Studio 00 0c eee eee eee A 2 DSP Project Management System 0 00 cet A 3 General Debugging 0 0 cts A 4 Edo cinta beet eet e Pa ee he ee Cd ae bee whale d oad A 5 Watch Window 2 0 0 c cece eee ee A 6 General Extension Language GEL 0 0000 cece eee A 7 Graph Window 0 0 0 0 Bi GIOSSANY 2 25 ine sete Rie E a ea arene eee ee ee
31. eee eee 4 4 2 Connecting Probe Points 0000 c cee eee eee 4 4 3 Enabling and Disabling Probe Points 0020 cee eens 4 5 Conditional Probe Points 0 0 00 cee een eee 4 6 Hardware Probe PointS aana eee eee Using the File Input Output Capabilities 0 2 ce ee 5 1 File Input Output a oa anaua aaa 5 1 1 File VO Controls x cae eae et herent a hae eed ea 5 1 2 Data File Formats 0 000 ccc cece eens 5 2 Loading a Data File 0 0 0 tte eee 5 3 Storing a Data File 0 0 0 ccc tees Contents 6 The Graph Window 6 0 a sinite taima ad a ee eee hia eee hes 6 1 TIme FIequency ii cecccens arene ce ee nieccioeseiw due dea cece aee Dene ale 6 1 1 How the Time Frequency Graph Works 000 0c ee eee eel 6 1 2 Display TYPE ive via bao es Web be ee en ee aed alee wad eet 6 1 3 Graph Tile peser acc saeara ake ot ee ae ae nants aren tare 6 1 4 Data Page c2 cit at ieesdd ees ceeded beade bea ean fawn ed cae 6 1 5 Start Address 0 cette eee 6 1 6 Acquisition Buffer Size 6 ee 6 1 7 Display Data Size opoe ene tte 6 1 8 DSP Data TYp wa seeks een ed doe dee one reene dee ee aw ee een ene 6 1 9 OPV AUG eree ea a Rescate oe ae ee eee ee anes ete 6 1 10 Sampling Rate HZ 0 0 ee 6 1 11 Plot Data From esaa iota d doe pe ceed eo ween ARRECARE ERE ELERS 6 1 12 Left Shifted Data Display 0 0 00000 cee ee 6 1 13 Display Peak and Hol
32. following items as sub selections under the GEL menu My Functions gt InitT arget LoadMyPrag Adding GEL Functions to the GEL Menu Using Keywords When you use the InitTarget command the Function InitTarget dialog box prompts you for the start and end addresses Function InitT arget Ed Starting Address End ddress When you enter values into the entry fields click Execute to call the GEL function with these parameters 12 6 3 The slider Keyword You can also use the slider keyword to add a GEL function to the GEL menu When you select the function from the GEL menu a slider object appears to control the value passed to the GEL function Each time you move the position of the slider the GEL function is called with a new parameter value reflecting the new position of the slider You can only pass one parameter to a slider GEL function The format of a slider GEL function is as follows slider param_definition min Val maxVal increment pagelncrement paramName statements param_definition Parameter description that is printed on the slider object minVal An integer constant specifying the value to be passed to the function when the position of the slider is at its lowest level max Val An integer constant specifying the value to be passed to the function when the position of the slider is at its highest level increment An integer constant specifying the increment added to the value each time the slider
33. following options O No Grid 1 Zero Line Displays only the 0 axes 1 Full Grid Displays the full grid 6 3 21 Cursor Mode This field sets the cursor s appearance and function in the graph You may choose among the following options m No Cursor 4 Data Cursor Appears on the graph screen with the cursor coordinates in the graph status bar T Zoom Cursor Allows you to enlarge areas of the graph Place the cursor on one corner of the area hold the left mouse button down and draw a rectangle around the area of interest 6 32 6 4 6 4 1 Image Image The graph menu contains many options that allow you to be flexible in how you display your data You can use an image graph to test image processing algorithms Image data is displayed based on RGB and YUV data streams Use the View gt Graph gt Image command to view the Graph Property Dialog box Field names appear in the left column You can adjust the values as needed in the right column then click OK The graph window appears with the properties you have set You can change any of these parameters from the graph window by right clicking the mouse selecting Properties and adjusting the parameters as needed You can also update the graph at any point in your program See Section 4 4 2 Connecting Probe Points for more details All input fields are C expression input fields An expression containing a symbol name can be used for all fields requiring numerical inputs
34. in an infinite loop or is taking too much time to execute 12 18 Built In GEL Functions 12 10 Built In GEL Functions There are several built in GEL functions that allow you to control the state of the actual simulated target access the actual simulated target memory locations and to display results in the output window All GEL built in functions are preceded with the prefix GEL_ to ensure they are not confused with user defined GEL functions If you wish to avoid preceding all calls to GEL built in functions with GEL_ you can define functions with your own names and call the GEL built in functions within your functions For example the following GEL function allows you to call the GEL_Load built in functions just by typing in Load Load a GEL_Load a j ny Note All built in GEL functions and user defined GEL functions consisting of GEL statements can be invoked directly from the Code Composer Studio GEL toolbar This toolbar consists of an expression field and an Execute button To invoke any GEL statement or user defined function enter the appropriate function call in this field box and press Execute to evaluate the expression The expression dialog box maintains a history of the most recently invoked GEL statements user defined functions you may select any of these using the scroll buttons The GEL toolbar is displayed by default and can be toggled on or off by selecting View gt Gel Toolbar LS The
35. in how you display your data You can use a time frequency graph to view signals in either the time or frequency domain For frequency domain analysis the display buffer is run through an FFT routine to give a frequency domain analysis of the data Frequency graphs include FFT Magnitude FFT Waterfall Complex FFT and FFT Magnitude and Phase In time domain analysis no preprocessing is done on the display data before it is graphed Time domain graphs can be either single or dual time Select View gt Graph gt Time Frequency to view the Graph Property Dialog box Field names appear in the left column You can adjust the values as needed in the right column then click OK The graph window appears with the properties you have set You can change any of these parameters from the graph window by right clicking the mouse selecting Properties and adjusting the parameters as needed You can also update the graph at any point in your program See Section 4 4 2 Connecting Probe Points for more details All input fields are C expression input fields An expression containing a symbol name can be used for all fields requiring numerical inputs such as the start address and acquisition buffer size For more information see Section 2 3 3 1 Using Symbols within Expressions 6 1 1 How the Time Frequency Graph Works 6 2 There are two buffers associated with the graph window the acquisition buffer and the display buffer The acquisition buffer res
36. in the Graph Property Dialog box I Start Address Starting location on the actual simulated target board of the acquisition buffer containing the data to be graphed When the graph is updated the acquisition buffer starting at this location is fetched from the actual simulated target board This acquisition buffer then updates the display buffer which is graphed You can enter any valid C expression in the Start Address field This expression is recalculated every time samples are read from the actual simulated target This means that if you enter a symbol in this field and the symbol later changes value you do not have to reenter this parameter The Graph Window 6 5 Time Frequency 6 6 Setting Interleaved Data Sources to No creates the following additional fields I Start Address real data I Start Address imaginary data I Index Increment Specifies the sample index increment for the data graph A specification in this field is equivalent to a sample offset for noninterleaved sources This permits you to extract signal data from multiple sources using a single graph An index increment of 2 for instance corresponds to a sample offset value of 2 which in turn graphically displays every other sample in the acquisition buffer You can therefore specify multiple data sources for display by entering the corresponding offset value in this field This option provides a general specification for interleaved sources E FFT
37. memory mapping the Code Composer Studio debugger checks each of its memory accesses against the memory map provided If you try to access an undefined or protected area the debugger displays the default value instead of trying to access the target Note Simulator Memory Map Seitings The simulator uses hard coded memory map settings to provide a generic representation of the DSP family simulated by the software For information on simulator memory map settings see the online help topic Simulator Memory Map Specifications You can manipulate the memory map settings using the methods in this chapter However to avoid anomalous behavior try to keep your program size within the specified memory map ranges Se Accessing Nonexistent Memory When the Code Composer Studio debugger compares memory accesses against the memory map it performs this checking in software not hardware The debugger cannot prevent your program from attempting to access nonexistent memory You can define a valid memory map range for your target as follows m You can enter the commands interactively while using the debugger LY You can use the GEL built in functions to define your memory map The debugger provides a complete set of memory mapping commands that you can invoke via the General Extension Language GEL and the menu bar The easiest method of implementing the memory map is to put the memory mapping commands in a GEL text file and execut
38. no argument passed for the filename the statement is equivalent to GEL_Load and results in an Invalid File Name error You also get an error on the statement a 0 The second call to the Initialize function passes only two arguments to the function The third is automatically assigned to 0 GEL is very loosely defined which provides the flexibility to make GEL function calls simple if you use default values It also provides you the Opportunity to pass more parameters if you wish You can see this with GEL built in functions such as TextOut which can take up to six arguments For an advanced application you may want to use all the parameters to provide great control over the output You can also call this function using only one parameter as follows GEL_TextOut Hello World 12 4 12 4 1 Calling GEL Functions and Statements Calling GEL Functions and Statements You can call a GEL function from anywhere you can enter a valid C expression You can call a GEL function from any dialog box that accepts a valid C expression or from within another GEL function Recursive GEL function calls are not supported however When a GEL function is executing you cannot run another instance of it Passing arguments to a GEL function is optional Omitted arguments assume default values See Section 12 3 GEL Function Parameters for more details The following sections describe several GEL statements that use C syntax GEL Return Sta
39. the Pipeline Adjustment field to offset the number of cycles used to flush the processor s pipeline when servicing breakpoints Every time the processor stops to service breakpoints halt the processor or step the processor it must flush the pipeline The cycles needed to do this depend on the number of program wait states which is not known To obtain more accurate cycle counts you may specify a value to be subtracted from the cycle count to compensate for this effect 11 1 2 Profile Clock Accuracy During program execution the profile clock accurately counts instruction cycles including cycles for wait states and pipeline conflicts To read the cycle count from the target processor however the processor must be halted Several types of measurement errors are introduced when halting the processor due to pipeline flushing missing pipeline conflicts and extra program fetches Every time the processor stops the pipeline must be flushed This results in counting extra instruction cycles After it is flushed it avoids conflicts with the next instruction that would cause an extra instruction cycle to be counted because the next instruction is not executed This results in fewer instruction cycles being counted than there should be If the program is halted by a software breakpoint extra instruction cycles are used to fetch and decode the breakpoint instruction Usually the extra fetch and decode is overlapped with the cycles that flush the
40. the cursor s appearance and function in the graph You may choose among the following options LY No Cursor 4 Data Cursor Appears on the graph screen with the cursor coordinates in the graph status bar T Zoom Cursor Allows you to enlarge areas of the graph Place the cursor on one corner of the area hold the left mouse button down and draw a rectangle around the area of interest 6 18 Constellation Diagram 6 2 Constellation Diagram The graph menu contains many options that allow you to be flexible in how you display your data You can use a constellation graph to measure how effectively the information is extracted from the input signal The input signal is separated into two components and the resulting data is plotted using the Cartesian coordinate system in time by plotting one signal versus the other Y source versus X source where Y is plotted on the Y axis and X on the X axis Use the View gt Graph gt Constellation command to view the Graph Property Dialog box Field names appear in the left column You can adjust the values as needed in the right column then click OK The graph window appears with the properties you have set You can change any of these parameters from the graph window by right clicking the mouse selecting Properties and adjusting the parameters as needed You can also update the graph at any point in your program See Section 4 4 2 Connecting Probe Points for more details All input fields
41. the size of the acquisition buffer you are using on your actual simulated target board For example if you are processing samples one at a time enter a 1 in this field Make sure you connect the display to the correct location in your program See Section 4 4 2 Connecting Probe Points for more details When a graph is updated the acquisition buffer is read from the actual simulated target board and updates the display buffer The data in the display buffer is left shifted by the amount in the Acquisition Buffer Size field The data in the acquisition buffer is shifted into the display buffer from the right end The display buffer is graphed You can enter any valid C expression for the Acquisition Buffer Size field This expression is recalculated every time samples are read from the actual simulated target Therefore if you enter a symbol in this field and the symbol later changes values you do not have to reenter this parameter Index Increment This field allows you to specify the sample index increment for the data graph A specification in this field is equivalent to a sample offset for noninterleaved sources This permits you to extract signal data from multiple sources using a single graph An index increment of 2 for instance corresponds to a sample offset value of 2 which in turn graphically displays every other sample in the acquisition buffer You can therefore specify multiple data sources for display by entering the co
42. to visualize the signal around the trigger point Setting this option to 0 places the left trigger point on the left boundary of the graph window Setting this option to a positive value moves the left trigger point toward the right boundary of the window Setting this option to a negative value moves the left trigger point to the left side of the left boundary window which is outside the window With the wrap around effect the point is moved away from the right boundary of the window 6 3 12 DSP Data Type 6 30 This field allows you to select among the following data types 32 bit signed integer 32 big unsigned integer 32 bit floating point 32 bit IEEE floating point 16 bit signed integer 16 bit unsigned integer 8 bit signed integer 8 bit unsigned integer C OOOO C O O You can use signed integer in combination with the Q Value to interpret fixed point values Eye Diagram 6 3 13 Q Value 6 3 14 6 3 15 6 3 16 6 3 17 This field contains a nonzero Q Value which are fractional representations of integer values The data on the actual simulated target is interpreted using the Q Value They are formed by inserting a decimal space in the binary representation of an integer resulting in greater precision The Q Value indicates amount of the displacement according to the formula New_integer_value 20 Value A Q Value of xx indicates a signed 2s complement integer whose decimal point is displaced xx places from th
43. up state and halts the execution of your program If the target board does not respond to this command and you are using a kernel based device driver the DSP kernel may be corrupt In this case you must reload the kernel The simulator initializes all register contents to their power up state according to target simulation specifications Load Kernel If you are using a kernel based debugger not JTAG then the DSP kernel is responsible for the communication to the host computer If it is corrupt the device driver may not be able to communicate with the target In this case you must execute the Debug gt Load Kernel command to restore the kernel to its proper state Restart The Debug gt Restart command restores the PC to the entry point for the currently loaded program This command does not start program execution Go Main The Debug gt Go Main command sets a temporary breakpoint at the symbol main in your program and starts execution The breakpoint is removed when execution is halted or a breakpoint is encountered This provides a convenient way for C programmers to start their application When execution stops at main the associated source file is automatically loaded Copying Data Values To Copy a Block of Memory to a New Location 1 Select Edit gt Memory gt Copy 2 Inthe Setup for Copying dialog box enter the Source information Address The starting address of the block of memory to be copied Length The length of t
44. values Topic Page 51 File InpuvOutput lt 5 252 5 50 cease E ok Gee nce aes 5 2 5 2 boadinga Data File 02 5 065 55 0aecu cena nce eetee eas 5 7 BS Senha weelds ocspoaacsoconooncsoonnnnoounpoadoonusos 5 7 5 1 File Input Output 5 1 File Input Output 5 2 Code Composer Studio allows you to stream or transfer data to or from the actual simulated target from a PC file This is a great way to simulate your code using known sample values The File I O feature uses the Probe Point concept which allows you to extract inject samples or take a snapshot of memory locations at a point you define Probe Point A Probe Point can be set at any point in your algorithm similar to the way a breakpoint is set When the execution of the program reaches a Probe Point the connected object whether it is a file graph or memory window is updated Once the connected object is updated execution continues Using this concept if we set a Probe Point at a specific point in the code and then connect a file to it you can implement file I O functionality You can associate a file with either an input or an output signal At a specific Probe Point a stream of data can be either read from or written to a specified file Note Real Time Data Transfer File I O does not support real time data transfer Select Help gt Tools gt RTDX for information on using Real Time Data Exchange RTDX To Stream Data To From a File 1 Before you
45. window Context Sensitive Menus All Code Composer Studio windows contain context menus To open a context menu right click within the window Context menus provide a list of options and or commands that can be applied to that particular window For example you can manipulate projects add remove source GEL files set build options etc by right clicking on the project files displayed in the Project View window and selecting the appropriate action See Chapter 10 The Project Environment for information on working with projects Using the Dis Assembly Window 2 2 Using the Dis Assembly Window When you load a program onto your target or simulator the Code Composer Studio debugger automatically opens a Dis Assembly window The Dis Assembly window displays disassembled instructions and symbolic information needed for debugging Disassembly reverses the assembly process and allows the contents of memory to be displayed as assembly language code Symbolic information consists of symbols and strings of alphanumeric characters that represent addresses or values on the target For each assembly language instruction the Dis Assembly window displays the disassembled instruction the address at which the instruction is located and the corresponding opcodes machine codes that represent the instruction To produce the disassembly listing the debugger reads opcodes from the target board disassembles them and adds symbolic information st
46. 1 nonscrolling If a value is not specified for this parameter scrolling is assumed MaxLines optional if a nonscrolling window is specified this parameter specifies the maximum number of lines the window can hold If a scrolling window is specified this argument is ignored This function creates an output window with name windowName The windowName is then used by other GEL functions to access the output window An unlimited number of output windows can be created GEL_OpenWindow GEL_OpenWindow Macro Output 1 20 GEL_CloseWindow GEL_TargetTextOut GEL_TextOut Built In GEL Functions e a E TEE Patch the Memory with Assembly Patch String Format Parameters Description Example GEL_ProjectBuild Format Parameters Description Example See Also GEL_PatchAssembly Address Page PatchString Address required address to which to patch an assembly instruction Page required identifies the type of memory to fill Memory Type Page Parameter Program memory 0 Data memory 1 I O space 2 For processors that do not have more than one type of memory use 0 for this parameter PatchString required assembly string to patch into memory This function loads an assembly string PatchString at Address on Page GEL_PatchAssembly 0x1000 1 LAR AR4 01h Note C6000 processors Patch assembly is not supported for C6000 processors actual or simulated L J Build the Current P
47. 10 Filling Memory LocationS 000 cece eee eee eee 211 Editing Variables Ghassan one eee eee eae 2 12 Editing the Command Line 20 2eeee cece n 2 20 2 13 Refreshing WindowS 00 0 ce cece eee eee e een enees 21 2 14 Viewing the Call Stack 00 cece eee eee eee eee 21 2 15 Saving and Restoring Your Workspace 5 2 29 2 1 Using Code Composer Studio Windows and Toolbars 2 1 2 1 1 2 2 Using Code Composer Studio Windows and Toolbars All windows except Edit windows and all toolbars are dockable within the Code Composer Studio environment This means you can move and align a window or toolbar to any portion of the Code Composer Studio main window You can also move dockable windows and toolbars out of the Code Composer Studio main window and place them anywhere on the desktop To move a toolbar simply click and drag the toolbar to its new location To Move a Window Out of the Main Window 1 Right click in the window and select Allow Docking from the context menu 2 Left click in the window s title bar and drag the window to any location on your desktop All dockable windows contain a context menu that provides three options for controlling window alignment Allow Docking Toggles window docking on and off Hide Hides the active window beneath all other windows Float in the Main Window Turns off docking and allows the active window to float in the main
48. 6 17 Axes Display graph option 6 17 6 23 6 31 basic concepts adding deleting block repeat instruction conetonal breakpoints delayed a enabling disabling 4 4 global breakpoints 3 9 hardware breakpoints 4 7 BreakPtReset GEL function build commands building programs Byte Packing graph option C expression input fields C source and assembly co C_DIR environment variable Index call stack displaying 2 21 changing color highlights CLK profiling variables 11 2 closing projects Code Composer Studio Setup Code Composer Studio Tutorial i Code Composer Studio installing COFF file loading 2 12 reloading 2 12 COFF defined B 2 collapsing variables Watch window Color Space Operations graph option column editing command line Ez executing GEL functions 2 20 compile file compiler option setting fes concepts basic features conditional breakpoints conditional Probe Points configuring system files connecting Probe Points Constellation diagram Constellation options Acquisition ale f Axes Display Constellation rene Graph Title Grid Style Index Increment Interleaved Data os Maximum X Value 6 23 Maximum Y Value Minimum X Value a Minimum ba Q Value 6 23 Status Bar Displa 6 24 Symbol Size Constellation Points graph_option context sensitive menus 2 2 controlling file I O Index 1 Index copying data values 2 18 copying text 9 12 CPU cose editing
49. 6 4 2 Graph Title You can identify each graph that you create with a unique title This helps to differentiate results when there are many windows open 6 4 3 Color Space Operations This field specifies the way data is interpreted and displayed You can choose between the following color space options 11 YUV Every Y U and V sample is represented using 8 bits If you select YUV the following additional fields are displayed in the Graph Property Dialog box YUV Ratio Specifies the relationship among Y U and V samples You may choose among the following options 4 1 1 For every four horizontal Y samples there is one U and V sample There is no reduction of U and V in the vertical direction 4 2 2 For every two horizontal Y samples there is one U and V sample There is no vertical reduction of U and V in the vertical direction 4 2 0 There is a 2 1 reduction of U and V in both the vertical and horizontal This means that for every 2x2 Y samples there is one U and V sample E Transformation of YUV Values Converts YUV to RGB To transform YUV there are two steps YUV to Y U V and Y U V to RGB You may choose between the following options Unity none Uses the unity matrix to transform YUV to Y U V ITU R BT 601 CCIR601 Follows recommendation ITU R BT 601 formerly CCIR 601 luma to convert YUV into RGB using the CCIR601 matrix to transform YUV to Y U V E Start Address Y Source Start Address U Source
50. 62 18 Grid Style ams eaa nana veces Pe dee eer eane eee cae eee eee 6 2 19 Cursor Mode 0 000 eee Contents vii Contents 6 3 Eye DiaQram 2 ineedarsie de toe aes dows paws ope epee eee beke ee ety de wad 6 3 1 How the Eye Diagram Works 0 00 eee tee 6 3 2 Display Ty OG amp erreak raen och aeuned Wann eaters Gene ache au eee 6 3 3 Graph Titles aisiari i mi Sak ad oo dle ee ee aid adta a 6 3 4 Trigger Source retaso eaaa n a a E ea E E N eee 6 3 5 Data Paer seses resini ennaa a A a a ar a 6 3 6 Acquisition Buffer Size 0 0 0 0 ce ee 6 3 7 Index INCrEMONE sesse dialed eal d a dles ed eden PR be ne eed bios eas 6 3 8 Persistence SiZ 0 teens 6 3 9 Display Length ee accee nerd enue ead d cede ee eae ee ae deen tos 6 3 10 Minimum Interval Between Triggers 0c eee eee ee 6 3 11 Pre Trigger in samples 0 000 ekiko kdar eee 6 3 12 DSP DataType 0 00 ete 6 30 13 O Valu y cs aae a a iowa di bea ccehdabhenaie baer Gaae AG a a aae ia 6 3 14 Sampling Rate 0 cette 6 3 15 Trigger Level cs wa eee ed eae a ee ee eae ee ee aed ed 6 3 16 Maximum Y Value 0 0 eee eee 6317 AXES Display 2ccc een rare ee need eee de Paw eee ele eee he 6 3 18 Time Display Unit 00 0 tees 6 3 19 Status Bar Display 0 0 tee 6 320 Gid SWS crips enian se detoadaaae d vor eewer tit wena Gaede eee 6 3 21 Cursor MOd ences ceca a dee einen eae ded a iT E da wee na
51. A 5 Watch Window 1 Editor How do I shift a whole paragraph one Tab position in the editor Use the mouse to select the paragraph of interest Then use the Tab or shift Tab to shift the entire paragraph one tab position How do select the display option of a variable in the Watch window You can select different display options by following the expression with a D where D can be any valid display option Refer to the online help under Watch window for more details Frequently Asked Questions A 9 General Extension Language GEL A 6 General Extension Language GEL 1 Why are quotation marks needed around some symbols in some places and not other For example WatchAdd requires quotes and BreakPtAdd does not Quotes are placed around an expression or string that is NOT to be parsed or evaluated before it is executed Whenever you type in an expression it is parsed and executed The same is true if you call a GEL function including built in functions If you pass an expression as an argument to a GEL function it will be evaluated and the final result will be passed to the GEL function For example in the following call to the built in function GEL_BreakPtAdd StartAddress 0x100 the expression StartAddress 0x100 is evaluated and then the result is passed to the built in function For the built in function GEL_WatchAdd we do not want to pass an expression as an argument We want to pass a ST
52. ATIONS IS UNDERSTOOD TO BE FULLY AT THE CUSTOMER S RISK In order to minimize risks associated with the customer s applications adequate design and operating safeguards must be provided by the customer to minimize inherent or procedural hazards Tl assumes no liability for applications assistance or customer product design TI does not warrant or represent that any license either express or implied is granted under any patent right copyright mask work right or other intellectual property right of TI covering or relating to any combination machine or process in which such semiconductor products or services might be or are used Tl s publication of information regarding any third party s products or services does not constitute Tl s approval warranty or endorsement thereof Copyright 1999 2000 Texas Instruments Incorporated Preface Read This First About This Manual This book explains how to use the Code Composer Studio development environment to build and debug embedded real time software applications Notational Conventions This document uses the following conventions 1 Program listings program examples and interactive displays are shown inaspecial typeface Examples use a bold version ofthe special typeface for emphasis interactive displays use a bold version of the special typeface to distinguish commands that you enter from items that the system displays Such as prompts command output error messages etc
53. Breakpoints from the Parallel Debug Manager menu bar A check mark beside this menu item indicates that global breakpoints are enabled By changing the current group see Section 3 3 Grouping Processors you can control which processors are triggered by global breakpoints Multiprocessing With Code Composer Studio 3 9 Chapter 4 Breakpoints and Probe Points This chapter describes how you can set breakpoints to control the execution of your program and how to set Probe Points for signal analysis Topic Page A osBreakpointSosce as actu are santa tae mee eee ec 4 2 Conditional Breakpoints 00csecceeeeeeeeeeeenees 4 3 Hardware Breakpoints 0 000 c cece cece teen eens Ai Pia OS soscosscuscssnscovenccueesuuegcuBDecdoDEEORS 4 5 Conditional Probe Points 000ceeeeeeeeeeeees 4 12 46 Hardware Probe Points oee e eean e e 4 1 Breakpoints 4 1 4 1 1 4 1 2 4 2 Breakpoints Breakpoints stop the execution of the program When the program is stopped you can examine the state of your program examine or modify variables examine the call stack etc You can set a breakpoint by using the Toggle Breakpoint button on the Project toolbar or by selecting Debug gt Breakpoints The latter brings up the Break Probe Profile Points dialog box When a breakpoint is set you can enable or disable it Designer Notes Kernel Based Code Composer Studio Debugger Follow these guidelines to avoid possibl
54. COFF file containing the symbol information cpuName optional in quotes name of the CPU on which to load the symbolic information useful in a multiprocessor environment This function loads the symbol information of the specified object file GEL_SymbolLoad is useful in a debugging environment where the debugger cannot or need not load the object code for example if the code is in ROM The entry point is not modified GEL_SymbolLoad d mydir myfile out cpu_b GEL_Load Built In GEL Functions GEL_System Execute a DOS Command Format Parameters Description Example GEL_System dosCommana param1 param2 param4 dosCommand required DOS command which may contain optional format specifiers that is to be executed param1 param4 optional additional parameters that are substituted in the dosCommand when a format specifier is encountered These parameters allow the user to pass values from the target or values passed from the user to the DOS command The GEL_System function allows you to execute DOS commands from within Code Composer Studio The output of the DOS Command is sent to an output window in Code Composer Studio The DOS command can only be one that produces a text output and does not require additional user input once it starts executing The DOS command that is executed is actually the formatted string given by dosCommand and the additional parameters parm1 parm4 This allows us
55. Call Stack window to change the scope to that of the function you are interested in You can then observe or add to the Watch window all local variables of that function The Basics of Code Composer Studio 2 21 Saving and Restoring Your Workspace 2 15 2 22 Saving and Restoring Your Workspace You can save and restore your current working environment called a workspace between debugging sessions You can also switch between different working environments in the same debugging session To Save a Workspace 1 Select File gt Workspace gt Save Workspace 2 In the Save As dialog box enter a name for the workspace in the File name field 3 Click Save When you exit Code Composer Studio your current workspace is automatically saved in a file named default wks see Section 2 15 2 The Default Workspace To Load a Workspace 1 Select File gt Workspace gt Load Workspace 2 Inthe Load Workspace dialog box enter the name of the workspace file in the File name field 3 Click Open You can automatically load a particular workspace every time you start Code Composer Studio see Section 2 15 1 Automatically Loading Your Workspace Things that are Saved in the Workspace Parent windows including size and position Child windows including size and position Breakpoints Probe Points profile points Profiler options Current project Currently loaded GEL functions Memory map Animation speed option File I O s
56. Chapter 1 Setting Up Code Composer Studio This chapter describes how to install and set up Code Composer Studio on your computer Topic Page 1 1 System Requirements Errr rE T 1 2 Installing Code Composer Studio 0000000 1 3 Setting Up Code Composer Studio 0002e0eee 1 4 Getting Started with Code Composer Studio 1 4 1 5 Using Online Help ssn sce cere ne renren ete eeepc EEE ens ee 1 4 System Requirements 1 1 System Requirements To use Code Composer Studio your operating platform must meet the following minimum requirements 1 IBM PC or compatible 1 Microsoft Windows 95 Windows 98 or Windows NT 4 0 1 32 Mbytes RAM 100 Mbytes of hard disk space Pentium processor SVGA display 800x600 Installing Code Composer Studio 1 2 Installing Code Composer Studio The complete installation process consists of two phases 1 Install the Code Composer Studio software onto your system 2 Run the Code Composer Studio Setup application to configure the interface that enables Code Composer Studio to communicate with your target board or simulator The rest of this section describes how to install the software onto your system Section 1 3 Setting Up Code Composer Studio describes how to run the Code Composer Studio Setup application Installing Code Composer Studio for Windows 95 98 NT Use the following procedure to install Code Composer Studio for Windows 95 98
57. Code Composer Studio User s Guide Literature Number SPRU328B February 2000 i 2 PRINTED WITH wip TEXAS KBfsov Nk INSTRUMENTS Printed as Paper IMPORTANT NOTICE Texas Instruments and its subsidiaries Tl reserve the right to make changes to their products or to discontinue any product or service without notice and advise customers to obtain the latest version of relevant information to verify before placing orders that the information being relied on is current and complete All products are sold subject to the terms and conditions of sale supplied at the time of order acknowledgment including those pertaining to warranty patent infringement and limitation of liability TI warrants performance of its semiconductor products to the specifications applicable at the time of sale in accordance with Tl s standard warranty Testing and other quality control techniques are utilized to the extent TI deems necessary to support this warranty Specific testing of all parameters of each device is not necessarily performed except those mandated by government requirements CERTAIN APPLICATIONS USING SEMICONDUCTOR PRODUCTS MAY INVOLVE POTENTIAL RISKS OF DEATH PERSONAL INJURY OR SEVERE PROPERTY OR ENVIRONMENTAL DAMAGE CRITICAL APPLICATIONS TI SEMICONDUCTOR PRODUCTS ARE NOT DESIGNED AUTHORIZED OR WARRANTED TO BE SUITABLE FOR USE IN LIFE SUPPORT DEVICES OR SYSTEMS OR OTHER CRITICAL APPLICATIONS INCLUSION OF TI PRODUCTS IN SUCH APPLIC
58. Composer Studio If you have a GEL function defined as StartUp it is also executed If you have a common file that all your CPUs load on startup you can place this filename in the command line of the Properties dialog box of the Code Composer Studio icon Multiprocessing With Code Composer Studio 3 7 Auto Executing GEL Functions 3 8 To Autoload a Workspace and Associated GEL Files On Start Up Code Composer Studio allows you to load both your workspace and the associated GEL files immediately on start up as follows 1 Inthe Parallel Debug Manager menu select Options gt Startup 2 Inthe StartUp Files dialog box enter the GEL file names corresponding to each CPU and click OK 3 Save the setup as a workspace by selecting File gt Save Workspace 4 Inthe Save As dialog box enter the name of the workspace with the wks extension in the File name field see Section 2 15 1 Automatically Loading Your Workspace 5 Click Save Global Breakpoints 3 7 Global Breakpoints Global breakpoints allow breakpoints on a given processor to halt other processors in a multiprocessor environment JTAG based device drivers use the EMU0 1 pins that trigger other processors to stop at the same time When this option is enabled all processors in the current group halt if any processor included in the current group encounters a breakpoint To enable global breakpoints on all processors in the current group select Options gt Global
59. Framesize Specifies the number of samples used in each FFT calculation Note Acquisition Buffer a Different Size The acquisition buffer can be a different size than the FFT frame size L J E FFT Order Specifies the FFT size 2 FFT order E FFT Windowing Function You may choose among the following windowing functions Rectangle Bartlett Blackman Hanning Hamming These are performed on the data before the FFT calculation is performed E Display Peak and Hold Allows you to enter more information on how the history of the samples is graphically maintained Time Frequency m Complex FFT Consists of a real and imaginary data portion displayed on two graphs that are contained in the same graph display window When you select the Complex FFT option the following additional items appear in the Graph Property Dialog box E Frequency Display Unit Specifies the unit of measure for the frequency axis of the graph Select among the values Hz Hertz kHz kiloHertz and MHz megaHertz E Signal Type Specifies the type of signal source to produce a particular graph Two options are available for the Signal Type property Real corresponding to a single source display as in the case of a single time display and Complex corresponding to two signal sources When you select Complex the Graph Property Dialog box displays the Interleaved Data Sources option E Interleaved Data Sources Specifies whether the signal sources are
60. General Extension Language GEL 12 19 Built In GEL Functions GEL_Animate Format Parameters Description Example See Also GEL_BreakPtAdd Format Parameters Description Example See Also 12 20 Animate the DSP Target GEL_Animate None This function starts animating the DSP target GEL_Animate GEL_Go GEL_Halt GEL_Run Add a Breakpoint GEL_BreakPtAdd address Condition address required indicates the location of the breakpoint Condition optional in quotes condition used in the conditional breakpoint This function sets a software breakpoint at a specific address If a condition is specified the breakpoint becomes a conditional breakpoint and execution stops only if the condition evaluates to true The address can be an absolute address any C expression the name of a C function or the name of an assembly language label GEL_BreakPtAdd 0x2000 GEL_BreakPtAdd TargetLabel 100 GEL_BreakPtAdd 0x2000 a lt b GEL_BreakPtDel GEL_BreakPtReset Built In GEL Functions GEL_BreakPtDel Delete a Breakpoint Format Parameter Description Example See Also GEL_BreakPtReset Format Parameters Description Example See Also GEL_CloseWindow Format Parameter Description Example See Also GEL_BreakPtDel address address required This function clears a software breakpoint at a specific address If there is no software breakpoint set at addre
61. NT 1 While in Windows insert the installation CD into the CD ROM drive 2 In Windows Explorer switch to the CD ROM drive and run setup exe You must install Code Composer Studio using administrator privileges for Windows NT The installation creates CCStudio and Setup CCStudio program icons on the desktop 1 3 Setting Up Code Composer Studio Code Composer Studio Setup establishes the interface that allows Code Composer Studio to communicate with your target board or simulator Before running the setup program you must install the software as described in Section 1 2 Installing Code Composer Studio Start Code Composer Studio Setup by double clicking on the Setup CCStudio icon located on the desktop Follow the Code Composer Studio Setup on screen prompts to define your system configuration If you need additional help please consult the Help menu Setting Up Code Composer Studio 1 3 Getting Started with Code Composer Studio 1 4 1 5 Note Troubleshooting If you experience difficulty in setting up your Code Composer Studio software see Appendix A Frequently Asked Questions for troubleshooting tips Getting Started with Code Composer Studio When you have completed the installation and setup process run the Code Composer Studio Tutorial This tutorial familiarizes you with many features of the software including features that are new in this version Performing this tutorial before you u
62. OK to close the dialog box Breakpoints To Enable All Breakpoints 1 Select Debug gt Breakpoints The Break Probe Profile Points dialog box appears with the Breakpoints tab selected 2 Click Enable All This button allows you to quickly enable all breakpoints in the breakpoint list 3 Click OK to close the dialog box To Disable All Breakpoints 1 Select Debug gt Breakpoints The Break Probe Profile Points dialog box appears with the Breakpoints tab selected 2 Click Disable All This button allows you to quickly disable all breakpoints in the breakpoint list 3 Click OK to close the dialog box Breakpoints and Probe Points 4 5 Conditional Breakpoints 4 2 4 6 Conditional Breakpoints Every conditional breakpoint has its own conditional expression When the location of the conditional breakpoint is reached the expression is evaluated If the result of the expression is false the processor resumes execution without updating the display otherwise the display is updated as if a traditional breakpoint were hit You can also define GEL General Extension Language files to meet conditions that must be satisfied for a breakpoint to be enabled To enter the GEL file name 1 Select Debug gt Breakpoints The Break Probe Profile Points dialog box appears with the Breakpoints tab selected 2 From the Breakpoint type drop down list select Break at Location if expression is TRUE Only when this selec
63. P BIOS Probe Point s and RTDX are trademarks of Texas Instruments Incorporated Pentium is a registered trademark of Intel Corporation Windows and Windows NT are registered trademarks of Microsoft Corporation To Help Us Improve Our Documentation If you would like to make suggestions or report errors in documentation please send us mail or email Be sure to include the following information that is on the title page the full title of the book the publication date and the literature number Mail Texas Instruments Incorporated Technical Documentation Services MS 702 P O Box 1443 Houston Texas 77251 1443 Email dsph ti com 1 The Basics of Code Composer Studio 0 20 e cece 2 1 2 3 2 4 2 5 2 6 2 7 2 8 210 etting Up Code Composer Studio 0 2 cee eee Contents System Requirements 0 00 ccc teen eeeneeeee Installing Code Composer Studio 1 2 0 eens Setting Up Code Composer Studio 0 cc eee eee Getting Started with Code Composer Studio 0 00 c eee eee Using Online Help 1 2 0 0 0 0 teens Using Code Composer Studio Windows and Toolbars 2 00 cee eae 2 1 1 Context Sensitive Menus 0 020s Using the Dis Assembly Window 0 000 eee eee 2 2 1 Opening More Than One Dis Assembly Window 2055 2 2 2 Changing the Start Address 1 2 2 0 0200s 2 2 3 Managing Breakpo
64. RING that is added to the Watch window It is the Watch window that is responsible for evaluating the expression contained in the string Can I execute a GEL function each time start Code Composer Studio Yes You can automatically load a GEL function upon startup if you specify a GEL filename at the end of the command line which starts up Code Composer Studio You must realize that this action is only LOADING the GEL file into Code Composer Studio s memory so that you can access the GEL functions within the file If this file contains a GEL function named StartUp Code Composer Studio will execute this function Therefore you can place your initialization tasks within this function How can execute a GEL function every time the code hits a breakpoint A good way to execute a GEL function at a breakpoint is to set a CONDITIONAL breakpoint Enter the function you wish to call as the conditional expression If you just want to call the GEL function and then continue to execute have the GEL function return a FALSE i e 0 otherwise return a TRUE i e 1 4 General Extension Language GEL How do automatically load up a GEL file and a Workspace every time I invoke Code Composer Studio Within the Code Composer Studio environment load up your GEL files and set up your debugging environment Then save the set up as a Workspace and place this workspace name with the wks extension on the Code Composer Studio e
65. SP Project Management System A 2 DSP Project Management System A 4 1 When try to invoke a BUILD or a COMPILE from within the Code Composer Studio environment obtain the following error message error 1010 can t initialize loader LINEXE_LOADER 1 or obtain an Out of Memory error message What could be happening This is most likely caused by insufficient conventional memory available within your system Please check how much conventional memory you have available in your DOS shell by entering mem within the DOS shell You should have at least 590K RAM You should also try invoking the TI tools from the DOS shell just enter the same command line used by Code Composer Studio to invoke the tools For instance if your source code file is in Mydirectory switch to this directory and enter the command line used by Code Composer Studio to invoke the TI tools You should free up some of your conventional memory to alleviate the problem Windows 95 When invoking a BUILD from within Code Composer Studio encounter the following error message in the Build window General failure error reading drive E This error arises due to the interaction between 16 bit TI code generation tools and the 32 bit Code Composer Studio application Adding the following to your WIN INI file should alleviate the situation Code Composer Studio BackgroundCompile SAFE Windows 95 When invoking a BUILD from within C
66. _Run GEL_ Halt Run Code GEL_Run Condition Condition optional in quotes condition that must be satisfied while the target is executing Once the execution reaches a breakpoint and the condition is evaluated to be false the debugger stops at that address This function starts executing code on the target If a condition is specified the run function becomes a conditional run statement That is execution continues while the statement is true The statement is evaluated at each breakpoint that is encountered GEL_Run GEL_Run A B GEL_Restart GEL_Go GEL_Halt GEL_RunF The General Extension Language GEL 12 33 Built In GEL Functions Format Parameters Description Example See Also GEL_SymbolLoad Format Parameters Description Example See Also 12 34 Run Free GEL_RunF None This function disables breakpoints before it starts executing code on the target It also disconnects from the target system This is useful if you need to perform a hardware reset on your target system or if you need to disconnect the JTAG or MPSD cable The Code Composer Studio debugger reconnects to the target system and enables breakpoints if any access is requested on the target system e g memory read or if the user halts the processor GEL_RunF GEL_Restart GEL_Go GEL_Halt GEL_Run Load Symbol Information Only GEL_SymbolLoad fileName couName fileName required in quotes
67. a meaningful description of the bookmark This description will appear in the Bookmarks listing Click OK to accept the parameters Chapter 10 The Project Environment Code Composer Studio provides integrated program management using projects A project keeps track of all information that is needed to build a target program or library A project records T Filenames of source code and object libraries LY Compiler assembler and linker options 1 Include file dependencies Program management is most easily accomplished using the Project View window The Project View window displays the entire contents of the project organized by the types of files associated with the project All project operations can be performed from within the Project View window The project environment speeds development time by providing a variety of commands for building your project If your project contains many source files and you edited only a few of the files since the project was last built use the Incremental Build command to recompile only the files that have changed The Rebuild All command forces all files to be compiled Use the Compile File command to compile an individual source file Topic Page 10 1 Creating Opening and Closing Projects 10 2 Using the Project View Window 00e eee e eens 10 3 Adding Files to the Project 000c cece cece eens 10 4 Scanning Dependencies 000ce e
68. a single time display and Complex corresponding to two signal sources When you select Complex the Graph Property Dialog box displays an additional option E Interleaved Data Sources Specifies whether the signal sources are interleaved or not This field appears when the Signal Type field is set to Complex Toggling this display option allows a single buffer input to represent two sources Setting this option to Yes implies a 2 source input buffer where the odd samples represent the first source and even samples represent the second Setting this option to Yes creates the following additional field in the Graph Property Dialog box I Start Address Starting location on the actual simulated target board of the acquisition buffer containing the data to be graphed When the graph is updated the acquisition buffer starting at this location is fetched from the actual simulated target board This acquisition buffer then updates the display buffer which is graphed You can enter any valid C expression in the Start Address field This expression is recalculated every time samples are read from the actual simulated target This means that if you enter a symbol in this field and the symbol later changes value you do not have to reenter this parameter The Graph Window 6 9 Time Frequency 6 10 Setting Interleaved Data Sources to No creates the following additional fields I Start Address real data I Start Address imaginary data
69. a symbol in this field and the symbol later changes value you do not have to reenter this parameter The Graph Window 6 11 Time Frequency Setting Interleaved Data Sources to No creates the following additional fields I Start Address real data I Start Address imaginary data I Index Increment Specifies the sample index increment for the data graph A specification in this field is equivalent to a sample offset for noninterleaved sources This permits you to extract signal data from multiple sources using a single graph An index increment of 2 for instance corresponds to a sample offset value of 2 which in turn graphically displays every other sample in the acquisition buffer You can therefore specify multiple data sources for display by entering the corresponding offset value in this field This option provides a general specification for interleaved sources E FFT Framesize Specifies the number of samples used in each FFT calculation Note Acquisition Buffer a Different Size The acquisition buffer can be a different size than the FFT frame size L J E FFT Order Specifies the FFT size 2 F order There is 0 padding if FFT frame size is smaller than FFT order E FFT Windowing Function You may select among the following windowing functions Rectangle Bartlett Blackman Hanning Hamming These are performed on the data before the FFT calculation is performed E Number of Waterfall Frames Specifies the num
70. aaa a a h A E A E ERRA Aa AA nett 9 6 1 Managing Your Bookmarks 0000 e eee 9 6 2 Editing Bookmark Properties 00 00 c eee eee eee The Project Environment 000 c cece eee eee eee 10 1 Creating Opening and Closing Projects 0 00 cee ees 10 2 Using the Project View Window 000 eee eee 10 2 1 Using the Project View Context Menus 0 0000 cece eee 10 2 2 Drag and Drop Capabilities Windows 95 98 NT 000 10 3 Adding Files to the Project 0 0 0 eee 10 3 1 File Extensions 2 0 0 2 000 cee ee eee eee 10 4 Scanning Dependencies 00 000s 10 5 Setting Build Options 0 0 0 eae 10 6 Building Your Progaitivsctina wigs iccaave nies anaana aana Contents ix Contents 11 Profiling Code Execution 00 c eee eee Ti Profile CloCK asna ace conn aw chat paw eae Be d deed a a oo bale cee ee be 11 1 1 Profile Clock Setup 00000 eee teens 11 1 2 Profile Clock Accuracy 000 cect eee V1 2 PONO Pont nis 22eseedu e iota den ae bats ea tueee EERE ENEE ARRIT EEREN RETE 11 2 1 Enabling and Disabling Profile Points 11 3 Hardware Profile Points 0 0 cette 11 4 Viewing Statistics 0 tte ee 11 5 Divide And Conquer Using Profile Points 00 000 c eee eee eee 12 The General Extension Language GEL 20 00 eee e eee eee eee 121 GEL Grammat eesis ceed ooh ee ee eae aa wa a ee ee ene
71. added to the project are displayed with absolute path names They are stored however with relative path names so that the project can be easily moved to a different directory The absolute path names are determined every time the project is opened Path names are stored relative to the project make file For example if your make file is in path c version1 linker make and your source file is in path c version1 source then the relative path to your source file is source Each indicates to backup one directory level If your source file is stored on another drive the source file is stored with an absolute path since no relative path exists If you now move or copy your project make file from c version1 linker make to c versiona linker make the source file is assumed to be located in c version2 source when you open the project When you move a make file rescan all dependencies to make sure that all references are resolved Scanning Dependencies 10 4 Scanning Dependencies To determine which files must be compiled during an incremental compile the project must maintain a list of include file dependencies for each source file A dependency tree is created whenever you build a project execute Project gt Show Dependencies or execute Project gt Scan All Dependencies To create the dependency tree all the source files in the project list are recursively scanned for include include and copy directives and each included fil
72. ailable on the Standard toolbar New Create a new file Open Open an existing file Save Save the file in the active window Cut Cut marked text to the clipboard Copy Copy marked text to the clipboard Paste Paste text at the cursor position from the clipboard Undo Undo the last edit action Redo Redo the last undo action Find Next Find the next instance of the search string in the active meee e ee 2 o ra Find Previous Find the previous instance of the search string in the active window Search Word Uses the word under the cursor as search text or if a section of text is highlighted uses the section as search text Clicking this button moves the window to the next occurrence of the search text a Find in Files Search multiple files for the specified text Print Print the active source file 2 k Help Click this button and then click on an object to view context sensitive help The Integrated Editor 9 3 Overview of Features 9 1 2 9 4 Edit Toolbar The Edit toolbar is automatically displayed when Code Composer Studio is started You can toggle it on or off by selecting View gt Edit Toolbar During multiprocessing edit features operate on the active child window in the currently selected parent window The parent window s name one parent window for each CPU in a multiprocessor system appears in the Edit toolbar s title The following buttons are available on the Edit t
73. al property is displayed I Palette Option Specifies the conversion of an 8 bit pixel value palette index into RGB color values You may choose among the following options Uniform Palette of 256 Colors Gray Scale of 256 Colors and User Defined 256 Colors If you select User Defined 256 Colors in Palette Option the following additional property items are displayed I Palette Address Specifies the starting address from which to fetch the user provided palette The address can be any valid C expression and is recalculated every time samples are read from the actual simulated target The Graph Window 6 35 Image 6 4 4 6 36 Data Page I Palette Entry 4 Byte Aligned If you select Yes each palette entry is a 4 byte value with the lowest byte not used and uses eight bits for red green and blue respectively If you select No each palette entry is a 3 byte value with 8 bits for red green and blue respectively I Palette Entry RGB Order Specifies the order of red green and blue colors You may choose among the following options RGB BGR RBG BRG GBR and GRB I Read Palette Once Only If you select No the palette is fetched every time the graph is updated If you select Yes the palette is fetched from the actual simulated target board only once even though the graph is updated many times Changing graph properties forces a reload of the palette If you select No for the Interleaved Data Sources field eac
74. am Load The Program Load Options dialog box offers the following options Perform verification after Program Load By default this checkbox is checked This means that Code Composer Studio will verify by reading back selected memory that the program was loaded correctly If you remove the check from this option Code Composer Studio will not perform this verification Load Program After Build If you check the Load Program After Build option the executable is loaded immediately upon building the project This ensures that the target contains the most up to date symbolic information generated after a build The Basics of Code Composer Studio 2 13 Single Stepping 2 6 Single Stepping 2 14 Use the following buttons from the Debug toolbar to single step through code a a Step Into You can single step through the code by either clicking the button on the Debug toolbar or by selecting Debug gt StepInto If you are in C source mode this command steps through a single C instruction otherwise it steps through a single assembly instruction vl T Step Over You can use the step over command to step through and execute individual statements in the current function If a function call is encountered the function executes to completion unless a breakpoint is encountered before it stops after the function call You can step over code by either clicking the button on the Debug toolbar or by selecting Debug gt StepOver You may view t
75. ameter is not supported Length required defines the number of words to fill Pattern required the value that is placed in each word in the block GEL_MemoryFill can be used to fill a block of target memory with a specified pattern GEL_MemoryFill 0x1000 0 0x100 Oxa5a5 GEL_MemoryLoad GEL_MemorySave The General Extension Language GEL 12 27 Built In GEL Functions e e Tnatelaydmer cel Load a block of memory from a File Format Parameters Description Example See Also 12 28 GEL_MemoryLoad Startaddress Page Length fileName Startaddress required first address in the block Page required identifies the type of memory to fill Memory Type Page Parameter Program memory 0 Data memory 1 I O space 2 For processors that do not have more than one type of memory use 0 for this parameter For simulated DSP targets the I O space parameter is not supported Length required defines the number of words to fill fileName required in quotes name of file to store the target data You can use GEL_MemoryLoad to load a block of target memory from a specified file The block of data is specified by the Startaddress Page and Length If the filename contains a out for the file extension COFF format is used otherwise the Code Composer Studio debugger uses the header information in the file to determine the file format GEL_MemoryLoad 0x1000 1 0x100 c workdir temp dat GEL_MemorySave
76. an overview of the most frequently asked questions pertaining to the use of Code Composer Studio Topic Page A 1_Installation Loading Code Composer Studio A 3 A 2 DSP Project Management System 0200 ee ee ee eens A 4 A 3 General Debugging aeae e eenean cte i eesiers a yelele ae se A a E RN E e E E ee eee ce lA 9 A5 Watch WINDOW as e ae soa ee rare ee eee ece A 9 A 6 General Extension Language GEL 20005 A 10 Az Graph Window eee A etree ce eer pepe ee eae pe ee A 12 A 1 Installation Loading Code Composer Studio A 1 A 2 Installation Loading Code Composer Studio 1 When I attempt to execute Code Composer Studio for the first time l intermittently obtain the following error messages ERROR MESSAGE 1 Can t Initialize Target DSP Trouble with JTAG controller Check your Cabling and your Multiprocessing Configuration ERROR MESSAGE 2 Can t Initialize Target DSP I O Port lt address gt There are a number of troubleshooting areas to consider when encountering this error These are listed below in the order from most to least likely to have invoked this error message DSP Target I O Settings a Your DSP target has been set at an invalid I O address Make sure that your DIP switch settings on your target card match the I O address set when running the Code Composer Setup utility b A conflict may exist at the I O address set for your target Check t
77. and data value of the selected location If you used the menu command the Address and Data fields contain default values To get the desired address location enter the address you wish to edit in the Address field Press Tab or click on the Data field and the content is updated with the value at the specified address To change the data value of that location enter the desired value into the Data field and click Done You can also use the scroll buttons on the Address field to move through the memory locations If you double click on a location in the Memory window the default format of the Data field is the same as in the Memory window You can enter values in either hex format with prefix Ox or in decimal format with no prefix if the display format is integer You can also enter floating point values provided the display format is compatible All the input fields are C expression input fields 2 3 3 C Expression Input Fields All input fields that require a numerical value are C expression input fields In these input fields you can enter any valid C expression including the names of C functions or assembly language labels The expression is then reduced to a single numerical value and displayed as shown in the following examples MyFunction Ox1000 2 35 int MyFunction 0x100 PC 0x10 The default display format for these fields is hexadecimal but can be changed by using special formatting symbols similar to the Wat
78. apDelete Address Page Address required identifies the memory range that is to be deleted from the memory map Address can be any valid address in the memory map range that is to be deleted This parameter can be an absolute address any C expression the name of a C function or an assembly language label Page required identifies the type of memory to fill Memory Type Page Parameter Program memory 0 Data memory 1 I O space 2 For processors that do not have more than one type of memory use 0 for this parameter For simulated DSP targets the I O space parameter is not supported This function deletes a range of memory from the memory map When deleted the Code Composer Studio debugger does not read or write from to the target If you display a memory location that is not readable the debugger does not display the value on the target instead it displays the default value GEL_MapDelete 0x1000 0 GEL_MapAdd GEL_MapOn GEL_MapOff GEL_MapReset The General Extension Language GEL 12 25 Built In GEL Functions GEL_MapOff Format Parameters Description Example See Also GEL_MapOn Format Parameters Description Example See Also GEL_MapReset Format Parameters Description Example See Also 12 26 Disable a Memory Map GEL_MapOff None This function disables memory mapping Note that disabling memory mapping can cause bus fault problems in the target because the Code Co
79. are graphed on your screen The display buffer resides on the host so a history of your signal can be displayed even though it no longer exists on the actual simulated target board The size of the display is determined differently depending on what you have selected for the time frequency domain Display Type option For a time domain graph Display Data Size contains the number of samples that the graph displays No preprocessing is done on the display buffer Usually Display Data Size is greater than or the same as Acquisition Buffer Size If Display Data Size is greater than Acquisition Buffer Size the buffer data can be left shifted into the display buffer For a frequency domain graph FFT Magnitude Complex FFT FFT Magnitude and Phase Display Data Size is represented by the FFT frame size rounded up to the nearest power of 2 used for the FFT frequency analysis see Section 6 1 2 Display Type You can enter any valid C expression for the Display Data Size field This expression is recalculated every time samples are read from the actual simulated target Therefore if you enter a symbol in this field which later changes values you do not have to reenter this parameter 6 1 8 6 1 9 Time Frequency DSP Data Type Q Value This field allows you to select among the following data types 32 bit signed integer 32 big unsigned integer 32 bit floating point 32 bit IEEE floating point 16 bit signed integer 16 bit unsigned i
80. arting at the location indicated by the active program counter PC The line containing the current PC is highlighted in yellow As you step through your program using the stepping commands the PC advances to the appropriate instruction For the sections of your program code that are written in C you can choose to view mixed C source and assembly code see Section 2 2 6 Viewing Mixed C Source and Assembly Code 2 2 1 Opening More Than One Dis Assembly Window Multiple Dis Assembly windows can be opened by selecting the command View gt Dis Assembly or by using the Dis Assembly Window button on the Debug toolbar Dis Assembly Window The first window tracks the location of the PC When more than one Dis Assembly window appears the title bar displays Dis Assembly lt n gt where n is a unique window number 2 2 2 Changing the Start Address You can change the start address of the Dis Assembly window by double clicking on the address field of the window This brings up the View Address dialog box that allows you to enter the start address you wish to use You may enter any absolute number or C expression that uses valid program symbols The Basics of Code Composer Studio 2 3 Using the Dis Assembly Window 2 2 3 2 2 4 2 2 5 2 4 Managing Breakpoints Probe Points and Profile Points from the Dis Assembly Window To set or clear breakpoints Probe Points and profile points place the cursor on the line of interest in t
81. ata to be graphed When the graph is updated the acquisition buffer starting at this location is fetched from the actual simulated target board This acquisition buffer then updates the display buffer which is graphed You can enter any valid C expression in the Start Address field This expression is recalculated every time samples are read from the actual simulated target This means that if you enter a symbol in this field and the symbol later changes value you do not have to reenter this parameter 6 2 5 6 2 6 Data Page Constellation Diagram Setting Interleaved Data Sources to No creates the following additional fields E Start Address X Source E Start Address Y Source E Index Increment Specifies the sample index increment for the data graph A specification in this field is equivalent to a sample offset for noninterleaved sources This permits you to extract signal data from multiple sources using a single graph An index increment of 2 for instance corresponds to a sample offset value of 2 which in turn graphically displays every other sample in the acquisition buffer You can therefore specify multiple data sources for display by entering the corresponding offset value in this field This option provides a general specification for interleaved sources If your actual simulated target consists of multiple pages such as program data and I O you can specify pages using the Data Page options From the list select e
82. atch Add Expression x Expression o OE Cancel Help Using Symbols as Expressions A symbol name can be specified as an expression in the Watch window However Code Composer Studio interprets symbols differently depending on whether or not the object file contains symbolic debugging information If a symbol is defined in a C source file and symbolic debugging information g is specified when building the file the symbol is treated as a variable representing the contents of memory at the specified address Without symbolic debugging information all symbols are treated as addresses Adding and Deleting Expressions in the Watch Window For example when using a symbol name to specify an expression in the Watch window If symbolic debugging information is available the value at the memory location represented by the symbol name variable is displayed in the Watch window If symbolic debugging information is not available the Watch window can only indicate that a label exists at a certain address The symbol s address is displayed in the Watch window To display the value at the memory location represented by the symbol it is necessary to prepend the symbol name with and asterisk To Delete Expressions in the Watch Window 1 Select the expression you wish to remove from the active Watch window by clicking on it with the mouse or using the up down arrow keys to move to the expression 2 Press the Delete key on t
83. ater changes value you do not have to reenter this parameter E Index Increment Specifies the sample index increment for the data graph A specification in this field is equivalent to a sample offset for noninterleaved sources This permits you to extract signal data from multiple sources using a single graph An index increment of 2 for instance corresponds to a sample offset value of 2 which in turn graphically displays every other sample in the acquisition buffer You can therefore specify multiple data sources for display by entering the corresponding offset value in this field This option provides a general specification for interleaved sources The Graph Window 6 3 Time Frequency 6 4 11 Dual Time Plots the data in the display buffer on a magnitude versus time graph with no preprocessing A dual time trace of signal s is displayed on the graph allowing you to plot two time domain traces in a single graph window When you enable this option the following additional options appear in the Graph Property Dialog Box E Time Display Unit Specifies the unit of measure for the time axis of the graph Select among the values s Second ms millisecond us microsecond and sample displays the values on the time axis in terms of the display buffer index E Interleaved Data Sources Specifies whether the signal sources are interleaved or not Toggling this display option allows a single buffer input to represent two sources
84. ave been replaced by older backup versions The Project Environment 10 7 Scanning Dependencies To Regenerate Include File Dependencies Use any of the following methods to regenerate include file dependencies 1 Select Project gt Show Dependencies An incremental scan for dependencies is completed before displaying the dependency tree for the entire project LY Select Project gt Build An incremental scan for dependencies is completed before performing an incremental build MY Select Project gt Scan All Dependencies OR Right click on the project name in the Project View and select Scan All Dependencies from the context menu All files are scanned for dependencies regardless of whether or not they have changed since the last dependency scan To Display Include File Dependencies 1 Ifthe project is not already open select Project gt Open 2 In the Project Open dialog box select the filename of the project to display If the project is not located in the current directory browse to the correct directory 3 Select Project gt Show Dependencies An incremental scan for dependencies is performed This ensures the dependency tree is up to date Whenever a dependency scan occurs the Dependencies status window appears If any of the files listed in the Dependencies status window are displayed in red it indicates that the dependencies for these files have not been resolved and when invoked the incremental build wil
85. axis of the graph Select among the values Hz Hertz kHz kiloHertz and MHz megaHertz E Signal Type Specifies the type of signal source to produce a particular graph Two options are available for the Signal Type property Real corresponding to a single source display as in the case of a single time display and Complex corresponding to two signal sources When you select Complex the Graph Property Dialog box displays an additional option E Interleaved Data Sources Specifies whether the signal sources are interleaved or not This field appears when the Signal Type field is set to Complex Toggling this display option allows a single buffer input to represent two sources Setting this option to Yes implies a 2 source input buffer where the odd samples represent the first source and even samples represent the second Setting this option to Yes creates the following additional field in the Graph Property Dialog box I Start Address Starting location on the actual simulated target board of the acquisition buffer containing the data to be graphed When the graph is updated the acquisition buffer starting at this location is fetched from the actual simulated target board This acquisition buffer then updates the display buffer which is graphed You can enter any valid C expression in the Start Address field This expression is recalculated every time samples are read from the actual simulated target This means that if you enter
86. ber of waterfall frames to be displayed H Waterfall Height Specifies the percentage of vertical window height used to display a waterfall frame 6 12 6 1 3 6 1 4 6 1 5 Graph Title Data Page Time Frequency You can identify each graph that you create with a unique title This helps to differentiate results when there are many windows open If your actual simulated target consists of multiple pages such as program data and I O you can specify pages using the Data Page options From the list select either Prog Data or I O This indicates whether the page of variable memory location graphically displayed is the program data or I O page Note Simulator I O Memory Page Not Supported The simulator for C54x DSPs does not support the I O memory page Start Address This is the starting location on the actual simulated target board of the acquisition buffer containing the data to be graphed When the graph is updated the acquisition buffer starting at this location is fetched from the actual simulated target board This acquisition buffer then updates the display buffer which is graphed You can enter any valid C expression in the Start Address field This expression is recalculated every time samples are read from the actual simulated target This means that if you enter a symbol in this field and the symbol later changes value you do not have to reenter this parameter Depending on values for
87. ble 3 Right click on the shortcut that is created and select Properties 4 Inthe Properties dialog box select the Shortcut tab 5 Verify that the Target field contains the path name and file name of the Code Composer Studio executable For example c ti cc bin cc_app exe 6 Atthe end of this path name add the name of your workspace file which must end in wks For example c ti cc bin cc_app exe myspace wks Note Default Workspace If you specify the file default wks the default workspace will be automatically loaded every time you start Code Composer Studio L 2 15 2 The Default Workspace 2 24 Your current workspace is automatically saved in a file named default wks when you exit Code Composer Studio If you wish to resume where you left off start Code Composer Studio and load default wks with the File gt Workspace gt Load Workspace command If you start Code Composer Studio with default wks as the first program parameter on the command line the default workspace is automatically loaded every time you start Code Composer Studio You can setup Code Composer Studio to automatically load the default workspace every time you start the application This provides a way to automatically save and restore your environment between sessions Saving and Restoring Your Workspace To Autoload a Workspace and GEL Files On Start Up You can load both your workspace and the associated GEL files when you start Code C
88. bles the axes and Off disables them The Graph Window 6 23 Constellation Diagram 6 2 17 Status Bar Display This option turns the status bar display at the bottom of the graph window on and off Selecting On enables the display and Off disables it 6 2 18 Grid Style This field sets the pattern of horizontal and vertical background lines in the graph You may choose among the following options OY No Grid 1 Zero Line Displays only the 0 axes 4 Full Grid Displays the full grid 6 2 19 Cursor Mode This field sets the cursor s appearance and function in the graph You may choose among the following options LY No Cursor 4 Data Cursor Appears on the graph screen with the cursor coordinates in the graph status bar T Zoom Cursor Allows you to enlarge areas of the graph Place the cursor on one corner of the area hold the left mouse button down and draw a rectangle around the area of interest 6 24 Eye Diagram 6 3 Eye Diagram You can use an eye diagram to qualitatively examine signal fidelity Incoming signals are continuously superimposed upon each other within a specified display range and are displayed in an eye shape The signal s period is shown over time by plotting the signal serially and wrapping it back when O crossings are detected These are reference points at which a signal specified by the data source can wrap back to the beginning of the window frame A wrap occurs if either 1 A 0 crossin
89. braries and linker command file to the project list For more details see Section 10 3 Adding Files to the Project To Open an Existing Project 1 2 Select Project gt Open If the directory where your project file exists is not selected in the Project Open dialog box browse to the correct directory In the Project Open dialog box highlight the project file you wish to use and click Open If an existing project is already open it is automatically closed When the file is successfully loaded Code Composer Studio s title bar changes to display the name of the new project If the file is not loaded an error message appears indicating that the file is corrupt Verify that you have selected the correct project file If the file is corrupt you must create a new project from scratch If you have upgraded from a previous version of Code Composer you may get a warning message that says the project file is in an older format In this case click the OK button to convert the project file to the new format without any loss of data If you do not convert the project file it cannot be opened To Close a Project To close a project perform any of the following operations m m m Select Project gt Close Create a new project Open another project Using the Project View Window 10 2 Using the Project View Window The Project View window graphically displays the contents of a project Project view Files GEL files
90. ch window symbols see Section 8 3 Watch Window Display Formats The Basics of Code Composer Studio 2 9 Using the Memory Window 2 3 3 1 Using Symbols within Expressions 2 10 An expression containing a symbol name can be used for all fields requiring numerical input However Code Composer Studio interprets symbols differently depending on whether or not the object file contains symbolic debugging information If a symbol is defined in a C source file and symbolic debugging information g is specified when building the file the symbol is treated as a variable representing the contents of memory at the specified address Without symbolic debugging information all symbols are treated as addresses For example when using a symbol name to specify the starting address in the Memory Window Options dialog or the Graph Property dialog box If symbolic debugging information is available and you want to use the address of a simple variable you should prepend the symbol name variable with an ampersand amp the standard C language notation for expressing an address Otherwise without the ampersand the expression evaluates to the contents of the symbol The exception is variables representing arrays in C notation specifying the name with the ampersand implies that you are referring to the address at the start of the array If no symbolic debugging information is available specify only the symbol name address CPU Regist
91. ck the Edit Bookmarks button on the Edit toolbar to open the Bookmarks dialog box Edit Bookmarks ca The Integrated Editor 9 19 Using Bookmarks 9 6 1 Managing Your Bookmarks Use the Bookmarks dialog to manage all of your bookmarks The Bookmarks dialog displays the complete list of the currently available bookmarks To select a bookmark from the list simply click on the desired bookmark The Bookmarks dialog offers the following options Go To After selecting a bookmark from the list Go To opens the file that contains the bookmark if it is not already open and places the cursor at the location of the bookmark Close Closes the Bookmarks dialog box Help Provides help on using the Bookmarks dialog box Edit After selecting a bookmark from the list Edit opens the Bookmark Properties dialog box Add Opens the Bookmark Properties dialog box Remove After selecting a bookmark from the list Remove deletes the bookmark from its current location 9 6 2 Editing Bookmark Properties 9 20 Use the Bookmark Properties dialog box to add a new bookmark or edit an existing bookmark Provide the following information File After selecting Add in the Bookmarks dialog you will notice that the Browse button is activated Press the Browse button and the Open dialog box appears Select the file that will contain the bookmark and click Open Line Specify the line number that is to be bookmarked Description Type
92. configure the Code Composer Studio environment according to your needs You may want to set up your environment each time you start Code Composer Studio Instead of loading your GEL file using File gt Load Gel each time and then executing the GEL function you can pass a GEL file name to Code Composer Studio on startup This informs Code Composer Studio to scan and load the specified GEL file It may not be enough to just load the GEL file you may also want to execute the function as well You can do this by naming one of your GEL functions in the specified file StartUp When a GEL file is loaded into Code Composer Studio it searches for a function defined as StartUp If it finds this function in the file it automatically executes it To Automatically Load and Execute a GEL Function Windows 95 NT 1 In Windows Explorer select the Code Composer Studio executable 2 Right click on the executable and select Create Shortcut from the context menu 3 Right click on the shortcut that is created and select Properties from the context menu 4 Inthe Shortcut Properties dialog box select the Shortcut tab The Target field shows the path name and file name for the Code Composer Studio executable for example c composer cc_app exe 5 At the end of this path name add the name of the GEL file that contains your GEL functions For example c composer cc_app exe myfile gel Now each time you double click on the Code Composer Studio short
93. cut icon the GEL file myfile gel is automatically scanned and loaded into Code Composer Studio If you have a GEL function defined as StartUp it also gets executed Example 12 9 Startup GEL Function shows a typical GEL file that you may load at startup Autoexecuting GEL Functions Upon Startup Example 12 9 Startup GEL Function StartUp Everything in this function will be executed on startup turn on our memory map GEL_MapOn GEL_MapAdd 0 0 OxF000 1 1 GEL_MapAdd 0 1 OxF000 1 1 dialog LoadMyFile load my coff file and start at main GEL_Load myfile out GEL_Go main In the previous example each time you start Code Composer Studio the memory mapping feature is turned on and the function LoadMyFile is added to the GEL menu The General Extension Language GEL 12 17 Viewing the Expression Queue 12 9 Viewing the Expression Queue All GEL functions and expressions are evaluated using the expression evaluator You can queue up as many expressions as needed for the evaluator Select View gt Expression List The Expressions Executing dialog box appears which allows you to view the expressions that are currently being evaluated by the expression evaluator You can abort any expressions that are currently being evaluated by the expression evaluator by selecting the expression and clicking Abort This is useful if you are executing a GEL function that is stuck
94. d 0 0 cece eee 61 14 Autoscales 2 4o8 sleeve ale eevee ede ee eee ee ea ees 61615 DG Value sie oe taae a cee Bee E a a eae eateries 6 16 Axes Display s oiiae ce eenewe a a AA E a E nea cee ee we de eee ee eee ee 6 1 17 Status Bar Display 00 0000 ee 6 1 18 Magnitude Display Scale 0000 c eee 6 1 19 DataPlotStyle 0 0 cee 6 1 20 Grid Style ws ceeds a aa aaea i pee iat dew ate betes ae dew d ed cee 6 1 21 Cursor Mode 00 ccc tte nee 6 2 Constellation Diagram 0 000 eee 6 2 1 How the Constellation Diagram Works 60000 eee eee 6 2 2 Display TyP esi c4 ee cdeea cede di a a E eee ee ted aa edie eae anaes 6 2 3 Graph Tle ccc roria eeelecnen od ef Spec a ane ee A A te 6 2 4 Interleaved Data SourceS 00 cette ee 6 2 5 Dalla PaE eenas s erorar diee pe EENEN EE IES 4 aie REEERE eee eas 6 2 6 Acquisition Buffer Size 6 ee 6 2 7 Index incremente es ees karerista kana eee a 6 2 8 Constellation Points 0 000 c eee eee 6 2 9 DSP Data TYPE e miatea cat leew EaR eae E E 6 210 _QValuen sais siia e aaa aga ad eD a a a ee d aaa ede eee nee 6 2 11 Minimum X Value 6 06 tee 6 2 12 Maximum X Value 0 0 cee 6 2 13 Minimum Y Value 0 0 eee 6 2 14 Maximum Y Value 0 0 0 6 2 15 Symbol Size 2 2 eee 62 16 Axes Displays ce ese cya wel abe eevee dee eee eee eed a ees 6 2 17 Status Bar Display 0 00 000 ee
95. d from the user to the output window Format specifications always begin with a percent sign and are read left to right When the first format specification if any is encountered the value of the first argument parm1 is converted and printed in the output window of Code Composer Studio The second format specification causes the second argument to be converted and printed and so on If there are more arguments than there are format specifications the extra arguments are ignored The General Extension Language GEL 12 39 Built In GEL Functions This function prints a fixed string to a specified output window This function GEL_TextOut Failed Memory Test n Diagnostic Results 2 GEL_TextOut Tests Executed d Tests Passed d targExe targPass Description is ideal for printing messages Example GEL_TextOut All Tests Passed n See Also GEL_OpenWindow GEL_TargetTextOut GEL_CloseWindow Format Specification Fields A format specification has the following form type Unlike C the GEL format specification contains only the percent sign and a type character for example s The type character determines whether the associated argument is interpreted as a string or number as detailed below Character Type d int u int x int f double e double S string 12 40 Output Format Signed decimal integer Unsigned decimal integer Hexadecimal format Signed value having the form Jdddd d
96. ddd Signed value having the form d dddd e sign ddd Characters printed up to the first null character The string passed to this format type must be a constant string declared on the host GEL_WatchAdd Format Parameters Description Example See Also GEL_WatchDel Format Parameter Description Example See Also GEL_WatchReset Format Parameters Description Example See Also Built In GEL Functions Add an Expression to the Watch Window GEL_WatchAdd expression label expression required expression that is to be added to the Watch window This expression may contain the formatting string as specified by the Watch window formats label optional label used to display the watch entry This function can be used to add expressions to the Watch window from the GEL environment See the description on The Watch Window for more details GEL_WatchAdd int 0x1000 x Task Number GEL_WatchAdd i GEL_WatchDel GEL_WatchReset Delete an Existing Expression from the Watch Window GEL_WatchDel expression expression required expression that you wish to delete from the Watch window This function removes an existing expression from the Watch window The expression must be exactly the same as the expression in the Watch window GEL_WatchDel int 0x1000 x GEL_WatchAdd GEL_WatchReset Clear The Watch Window GEL_WatchReset None This function clears all
97. e Select to beginning of line Select one screen up Select one screen down Switch to next Edit window Switch to previous Edit window Insert Ctrl C Ctrl Insert Ctrl X Shift Delete Ctrl V Shift Insert Ctrl Z Tab Shift Tab Page Up Page Down Shift left arrow Shift right arrow Shift Ctrl left arrow Shift Ctrl right arrow Shift down arrow Shift up arrow Shift End Shift Home Shift Page Up Shift Page Down Ctrl F6 Shift Ctrl F6 Keyboard Shortcuts Keyboard Action To Press Switch to next window includes all F6 windows Switch to previous window includes Shift F6 all windows Switch to previously active window Ctrl Tab Close active window Ctrl F4 The Integrated Editor 9 7 Keyboard Shortcuts 9 2 1 Customizing Keyboard Shortcuts 9 8 You can customize keyboard shortcuts not only for editing commands but for all menu commands within Code Composer Studio Select Option gt Keyboard to open the Customize Keyboard dialog where you can assign keyboard shortcuts Filename CACOMPOSER cc_app key El Save As Commands Assigned Keys Debug Add To Watch F5 Add Debug Animate Debug Breakpoints Debug Enable Task Level Debuging Debug Go Main Debug Halt Default Keys Debug Probe points Debug Real Time Mode BRIEF Keys Debug Reset DSP Debug Restart Description zi Help Cancel Run Target Debug Run F
98. e Edit window Select File gt Print or use the Print button on the Standard toolbar Print amp In the Print dialog box select the printer you wish to use in the Name drop down list Fill in the page range you wish to use in the Print Range area Click OK The Integrated Editor 9 11 File Manipulation 9 3 6 Cutting Copying and Pasting Text Use the Edit gt Cut command to remove selected text from the active window and copy it to the clipboard Use the Edit gt Copy command to copy selected text from the active window to the clipboard Use the Edit gt Paste command to insert text from the clipboard To Cut Copy and Paste Text 1 Highlight the text you want to cut or copy 2 Select Edit gt Cut or Edit gt Copy You can also use the Cut and Copy buttons on the Standard toolbar Cut l Copy ES 3 Place the insertion point in any Edit window where you want the text 4 Select Edit gt Paste or use the Paste button on the Standard toolbar Paste ae 9 3 7 Deleting Text Selecting Edit gt Delete deletes highlighted text without copying it to the clipboard You cannot paste this text to another location You may also use the Delete key on the keyboard 9 3 8 Editing Columns 9 12 You can select cut and paste columns of text instead of entire rows Make the file active by clicking the Edit window Enter into column mode by selecting Edit gt Column Editing or by pressing the keyboard sequence Ct
99. e Graph Property Dialog box m Maximum Y Value Sets the maximum value of the Y axis displayed on the graph DC Value This option sets the middle point of the Y axis range the Y axis is symmetrical about the value you enter in the DC Value field This value is enabled regardless of whether the Autoscale field is enabled This field is ignored for FFT Magnitude displays Axes Display This option turns the X and Y axes in the graph window on and off Selecting On enables the axes and Off disables them Status Bar Display This option turns the status bar display at the bottom of the graph window on and off Selecting On enables the display and Off disables it Magnitude Display Scale This field sets the scaling function used for data values in the graph You may choose between the following options m Linear Uses unmodified integer values 1 Logarithmic Uses the function 20 x log x The Graph Window 6 17 Time Frequency 6 1 19 Data Plot Style This field sets how the data is visually represented in the graph You may choose between the following options m Line Connects data values linearly 1 Bar Uses vertical lines to display values 6 1 20 Grid Style This field sets the pattern of horizontal and vertical background lines in the graph You may choose among the following options OY No Grid 1 Zero Line Displays only the 0 axes MY Full Grid Displays the full grid 6 1 21 Cursor Mode This field sets
100. e Type field select H W profile at location 3 In the Location field type the location where you want to set the profile point You can use either of the methods E Foran absolute address enter any valid C expression the name of a C function or a symbol name Enter a profile point location based on your C source file This is convenient when you do not know where the C instruction is in the executable The format for entering in a location based on the C source file is as follows fileName line lineNumber 4 Click Add to create a new hardware profile point 5 Click OK to close the dialog box Profiling Code Execution 11 9 Viewing Statistics 11 4 Viewing Statistics To view profiler statistics select Profiler View Statistics from the menu bar This opens the Profile Statistics window Profile Statistics E3 Volume c line 92 Volume c line 89 Volume c line 91 The Profile Statistics window displays the results for each profile point Each point displays the number of times it has been hit and the statistics on the number of cycles or other events that have elapsed since the previous profile point was hit The statistics include the minimum maximum total and average number of cycles The Profile Statistics window updates every time a profile point is hit but too many window updates can slow down the profiling performance There are two ways to reduce the number of times the window updates connect the window to a
101. e corruption of the processor pipeline m m Do not set a breakpoint on any instructions executed as part of a delayed branch or call Do not set a breakpoint on the last one or two instructions before the end of a block repeat instruction Adding and Deleting Breakpoints To Add a Breakpoint Using the Breakpoint Dialog Box Select Debug gt Breakpoints The Break Probe Profile Points dialog box appears with the Breakpoints tab selected In the Breakpoint Type field select either Break at Location unconditional or Break at Location if Expression is TRUE conditional Enter the location where you want to set the breakpoint using either of the following formats E For an absolute address enter any valid C expression the name of a C function or a symbol name E Enter a breakpoint location based on your C source file This is convenient when you do not know where the C instruction ends up in the executable The format for entering a location based on the C source file is as follows fileName line lineNumber If you selected a conditional breakpoint in step 2 you must enter the condition in the Expression field Click Add to create a new breakpoint This causes a new breakpoint to be created and enabled Click OK to close the dialog box Breakpoints To Add a Breakpoint Using the Toolbar Using the Toggle Breakpoint buftton on the Project toolbar is the easiest way to set and clear breakpoints at any location in
102. e deme i 6 4 WM AGG scons oe tate geet oo een has Se ae De a es a eee ene 6 4 1 How the Image Graph Works 000 e eee eee 6 4 2 Graph Mile ca tcc 6 een cee tre eave avast eo cemnad doe soe ee tee aE 6 4 3 Color Space Operations 0 000 cette 6 4 4 Dalia PAGS icect tern cch terete dunn acini Wun cata S Gan Sane T aan ae hes 6 4 5 Lines Fer DISplay s i a0 eine fae a aoe Ba te dea a ee a ace E ee 6 4 6 Pixels Per LING s eers ged irar nEn TAREE RISEN E NA 4 eaten Caley aoe 6 4 7 Byte Packing to Fill 32 Bits 0 2 Lee eee 6 4 8 Image Origin 6 teens 6 4 9 Uniform Quantization to 256 Colors 0 cc eee 6 4 10 Status Bar Display 0 0 c cee 6 4 11 Cursor Mode sesh ec maar be wee AW eee wee areieae die dtaeta we dad 7T TheMemory Map oc cc no ee cei ee ee ee VE ee Ses 7 1 Accessing Memory Maps asuaussausasauaaraaaraarnnarnananarna annann 7 2 Defining the Memory Map 0 eects 7 3 Using GEL to Define Your Memory Map 0 00 0c cee eee ee 8 Using the Watch Window 00 cece eee eee eee eee eee 8 1 Adding and Deleting Expressions in the Watch Window 8 1 1 Expanding and Collapsing Watch Variables 0000005 8 2 Editing Variables in the Watch Window 000 e cee eee 8 3 Watch Window Display Formats 00 0c eee cee tenets B 5 8 4 Quick Watch irea e peaa ama ia aa teeta viii 9 The Integrated Editor 0 cece eee eee 10 9 1
103. e eeneeeees B 3 3 4 Multiprocessor Broadcast Commands 2 2 0 00 B 5 3 5 Broadcasting GEL Commands 2 00 e0eeeeeeeeees B a 3 6 Auto Executing GEL Functions 000eeeeeeees B 7 37 Global Breakpoints a m a aaa a ee newer ease 3 9 3 1 The Parallel Debug Manager 3 1 3 2 3 2 The Parallel Debug Manager The Parallel Debug Manager allows you to synchronize multiple processors If you have several processors and a device driver that supports them the Parallel Debug Manager is enabled when you start Code Composer Studio From the Parallel Debug Manager menu you can open individual parent windows to control each processor or you can broadcast commands to a group of processors see Section 3 3 Grouping Processors gf Parallel Debug Manager lei E3 File Open Group Debug Options Help el Bul amp eS Step StepOver StepOut Run Halt Animate Parallel Debug Manager is a floating toolbar To keep it on top of other windows select Options gt Always On Top You can change the shape of the menu bar by resizing it The command buttons and menus wrap around to fit the size of the window Opening an Individual Parent Window From the Parallel Debug Manager menu you can open a window to control each processor To Select A Debugging Session on a Processor 1 Select Open from the Parallel Debug Manager menu bar 2 Select the processor by its name This opens a parent window
104. e include header files To alleviate this situation and increase the number of options that can be passed to the command line you may utilize environment variables to specify the include search paths as follows Windows 95 Environment variable s must be set inside your autoexec bat file using the following syntax SET TEMP lt pathname gt Please note that there are no spaces between TEMP and lt pathname gt Windows NT Environment variable s must be set via the System Environment Variables From the Start button select Settings gt Control Panel gt System Enter the following information under the Environment tab in the dialog box d add the word TEMP in the Variable field L enter the complete path name of the include file in the Value field DSP Project Management System TEMP denotes an environment variable name used for this example You may enter any name you wish for the variable itself Include Search Path inside the Code Composer Studio Build Options Compiler dialog box can reference the environment variable by entering TEMP inside the dialog window In case of multiple environment variables these can be entered in the Include Search Path window by entering TEMP TEMP1 5 TEMPn where TEMP TEMPn are all predefined environment variables 10 When initiate my project build can see the compiler commands invoked in blue in the Build window but don t see any response and then the
105. e it upon start up Defining the Memory Map 7 2 Defining the Memory Map You can use the Memory Map dialog box to define and list your memory map interactively Invoke the dialog box with Option gt Memory Map When you first invoke Code Composer Studio the memory map is turned off You can access any memory location the memory map does not interfere To Add a New Memory Map Range Use the following steps to define a memory range you wish to access 1 Select Option gt Memory Map The Memory Map dialog box appears 2 Make sure that the Enable Memory Mapping checkbox is checked Otherwise all addressable memory RAM on your target is assumed to be valid by the Code Composer Studio debugger 3 Select the folder that corresponds to the page you wish to modify Program Data or IO Skip this step if you are using a processor that has only one memory page When the processor has only one memory page only one folder is created 4 Enter the start address of the new memory map range in the Starting Address input field 5 Enter the length of the new range in the Length input field 6 Select the read write characteristics of the new memory range in the Attributes field Click Add N The debugger allows you to enter a new memory range that overlaps existing ones The new range is assumed to be valid and the overlapped range s attributes are changed accordingly When you have defined a memory map range you may wis
106. e least significant bit LSB Sampling Rate This field contains the sampling frequency for acquisition buffer samples such as for analog to digital conversion The values for the axis are from 0 to Display Length 1 Sampling Rate The Pre Trigger in samples parameter is subtracted from these values to give the labeled axis values Trigger Level This field sets the 0 crossing level if the Trigger Source field is enabled Maximum Y Value This value sets the maximum value of the Y axis displayed on the graph The values in the Maximum Y Value and the Trigger Level fields determine the minimum value of the Y axis Axes Display This option turns the X and Y axes in the graph window on and off Selecting On enables the axes and Off disables them The Graph Window 6 31 Eye Diagram 6 3 18 Time Display Unit This field specifies the unit of measure for the time axis of the graph This option and the value in the Sampling Rate field determine the values on the axis You may select among the following values s second ms millisecond us microsecond sample displays values in terms of the display buffer index C O O O 6 3 19 Status Bar Display This option turns the status bar display at the bottom of the graph window on and off Selecting On enables the display and Off disables it 6 3 20 Grid Style This field sets the pattern of horizontal and vertical background lines in the graph You may choose among the
107. e number of recently used files to appear in menu items such as File gt Recent Source Files Project gt Recent Project Files etc 3 Click OK 9 18 Using Bookmarks 9 6 Using Bookmarks You can set bookmarks to find and maintain key locations within your source files A bookmark can be set on any line of any file Bookmarks that are set are saved with a Code Composer Studio workspace so that they can be recalled at any time To Set a Bookmark from the Edit Window To set a bookmark while editing source code in an Edit window 1 Place the cursor in the line to be bookmarked 2 Right click in the Edit window and select Bookmarks from the context menu From the Bookmarks submenu select Set a Bookmark OR Click the Edit Toggle Bookmark button on the Edit toolbar Edit Toggle Bookmark Notice that the bookmarked line is highlighted in the Edit window Use the Edit Next Bookmark and Edit Previous Bookmark buttons on the Edit toolbar to quickly advance from one bookmark to another Edit Next Bookmark Edit Previous Bookmark To View the List of Bookmarks Use any of the following methods to view the list of bookmarks that are currently set T Select the Bookmarks tab on the Project View window Clicking on any bookmark in the list opens the file that contains the bookmark and places the cursor at the location of the bookmark Select the Edit gt Bookmarks command to open the Bookmarks dialog box m Cli
108. e the dialog box To Enable All Profile Points Select Profiler gt Profile Points The Break Probe Profile Points dialog box appears with the Profile Points tab selected Click Enable All Click OK to close the dialog box To Disable All Profile Points Select Profiler gt Profile Points The Break Probe Profile Points dialog box appears with the Profile Points tab selected Click Disable All Click OK to close the dialog box Hardware Profile Points 11 3 Hardware Profile Points Hardware profile points operate the same way as regular profile points except they are implemented using hardware breakpoints instead of software breakpoints see Section 4 3 Hardware Breakpoints Hardware profile points are useful for profiling in read only memory or if you only want to profile every Nth time at a given location Note Target Processor Halts The target processor is temporarily halted when a hardware profile point is encountered Therefore the target application may not be able to meet real time constraints when using hardware profile points ne Note Hardware Profile Points Not Supported Hardware profile points are usually only available with JTAG based device drivers They cannot be implemented with a simulated DSP target SS SS ES ss EE Ss To Add a Hardware Profile Point 1 Select Profiler gt Profile Points The Break Probe Profile Points dialog box appears with the Profile Points tab selected 2 Inthe Profil
109. eal time constraints then your work is finished Divide the main loop of your algorithm by placing several more profile points in your main loop to divide the program into sections Each profile point measures the cycles required by the preceding section of the program Run your application to accumulate statistics Sort the list of profile points in the Profile Statistics window to find which section of code uses the most cycles Set more profile points to further subdivide that section Repeat steps 5 and 6 to get finer and finer profile resolution Rewrite the smallest section of code that is using the most cycles and go to step 1 Chapter 12 The General Extension Language GEL The General Extension Language GEL is an interpretive language similar to C that lets you create functions to extend Code Composer Studio s usefulness You create your GEL functions using the GEL grammar and then load them into Code Composer Studio With GEL you can access actual simulated target memory locations and add options to Code Composer Studio s GEL menu GEL is particularly useful for automated testing and user workspace customization You can call GEL functions from anywhere that you can enter an expression You can also add GEL functions to the Watch window so they execute at every breakpoint Topic Page 121C GEEGramma r ane E E e 12 2 12 2 GEL Function Definition 200 0000 cee nannan 12 3 GEL Function Parameters iret ie
110. ears with the Breakpoints tab selected 2 Inthe Breakpoint type field choose H W Break at location for instruction acquisition breakpoints or choose Break on lt bus gt lt Reaa Write R W gt at location for a memory access breakpoint 3 Enter the program or memory location where you want to set the breakpoint Use one of the following methods For an absolute address you can enter any valid C expression the name of a C function or a symbol name Enter a breakpoint location based on your C source file This is convenient when you do not know where the C instruction is in the executable The format for entering in a location based on the C source file is as follows fileName line lineNumber 4 Enter the number of times the location is hit before a breakpoint is generated in the Count field Set the count to 1 if you wish to break every time 5 Click Add to create a new breakpoint This causes a new breakpoint to be created and enabled 6 Click OK to close the dialog box Breakpoints and Probe Points 4 7 Probe Points 4 4 Probe Points Probe Points allow you to cause an update of a particular window or to read and write samples from a file that occur at a specific point in your algorithm This connects a signal probe to that point in your algorithm When the Probe Point is set you can enable or disable them just like breakpoints When a window is created by default it is updated at every breakpoint However yo
111. ed in the dialog box that is created for dialog function The General Extension Language GEL 12 3 GEL Function Definition Example 12 3 Descriptive Parameter Strings dialog Init filename File to be Loaded CPUname CPU Name initValue Initialization Value GEL_Load filename CPUname a initValue The dialog adds this function to the menu bar Strings are given for the parameter to provide a description on the parameter entry dialog box In the statement a initValue the letter a is not defined in the parameter list therefore it must be defined on the actual simulated target If it is not an error occurs when you call this function Note the call to the built in function GEL_Load this function requires a string identifying the file name for the first parameter and the CPU name The CPU name parameter is optional and is useful in setting up multiple processors You must pass a string for the first parameter An example of a valid call to this function is Init c mydir myfile out cpu_a 0 GEL Function Parameters 12 3 GEL Function Parameters You can pass arguments to a GEL function by defining parameters in the GEL function definition Unlike C function parameters the parameter type is not defined only the parameter name is required The parameter type is determined automatically from the argument passed GEL parameters can be any of the following m An actual or simulated DSP target symb
112. ed when compiling this file 3 Click OK to accept your selections File specific options are stored in the project file by recording only the differences between the project options and those set for the file Be especially careful when setting build options on a file There is no protection against changing options that must remain consistent at the project level The Project Environment 10 9 Building Your Progam 10 6 Building Your Progam 10 10 The following commands allow you to compile and or link your source files You may use the toolbar buttons instead of the menu commands E Compile File Select Project gt Compile File to compile only the current source file No linking is performed Incremental Build Select Project gt Build to build the current project This command compiles only the files that have changed since the last build Whether a file must be compiled is determined by comparing the time stamp of the source file to that of the object file If the source file s time stamp is greater than the corresponding object file s time stamp the file is recompiled To determine whether the output file must be re linked the time stamp of each object file is compared to that of the output file The output file is re linked if the object file s time stamp is greater Rebuild All Select Project gt Rebuild All to recompile all files in the current project and re link the output file amp Stop Build Select Pr
113. ee e renee eee 10 5 Setting Build Options 222052 see ae sase aE ne ee centers eles 10 6 Building Your Progam 0ccececeeeeneee eee eaees 10 1 Creating Opening and Closing Projects 10 1 Creating Opening and Closing Projects The information for each project is stored in a single project file mak Use the following procedures to create open and close a project file To Create a New Project 1 Select Project gt New If the project directory you wish to use is not visible in the Save New Project As dialog box browse to the correct directory Use this directory to store project files as well as the object files generated by the compiler and assembler It is a good idea to use a different directory for each new project This keeps the object files from different projects separate and makes it possible to assign different compiler assembler and linker options for each project In the File name field type the new project filename and click Save A new project file is created with an empty project list If an existing project is already open its compiler assembler and linker options are copied to the new project and the existing project is automatically closed If no project is open the new project inherits the default project options Code Composer Studio s title bar changes to display the name of the new project After creating a new project file add the filenames of your source code object li
114. eld Click Open Duplicating File Views Select Window gt New Window to get multiple views of the same file When more than one copy of a file appears the title bar displays filename lt n gt where n is a unique window number Any changes in a window are reflected in the other windows Saving Files The Save command saves a file using the name in the title bar To Save a File 1 Make the file active by clicking the Edit window Select File gt Save or use the Save File button on the Standard toolbar Save File If your file is unnamed the Save As dialog box appears In the File name box type the name you wish to use Navigate to the drive and directory you want to save the file in If you want to change the file extension type in another extension or select one in the Save as type field box Click Save File Manipulation To Change the File Name or File Extension Make the file active by clicking the Edit window Select File gt Save As The Save As dialog box appears In the File name box type the name you wish to use Navigate to the drive and directory you want to save the file in If you want to change the file extension type in another extension or select one in the Save as type field box Click Save To Save All Open Files Select File gt Save All 9 3 5 Printing Files The Print command enables you to print a source file To Print a File 1 Make the file active by clicking th
115. ename is added to the project list Because include files are automatically added to the project you must not add them yourself The search path used to find include files is based on the source file type The current directory is the path of the source file Relative paths are resolved with respect to the current directory Searches are performed in the following order For C Source Files 1 The current directory 2 The list of include paths in the compiler options i from left to right 3 The list of include paths specified by the C_DIR environment variable from left to right see Note below For Assembly Source Files 1 The current directory 2 The list of include paths in the assembler options i from left to right 3 The list of include paths specified by the A_DIR environment variable from left to right see Note below Note Environment variables The environment variables used may vary depending on the target processor for example TMS320C6x uses C6X_C_DIR and C6X_A_DIR in addition to the standard names C_DIR and A_DIR The exact variable names to use are defined by the code generation tools ee The project environment saves time by performing incremental dependency scans An incremental dependency scan includes only new files or files that have changed since the last dependency scan Changes to a file are detected by any difference in the date and time of a file between dependency scans This includes files that h
116. ers 2 4 CPU Registers The CPU and peripheral registers of the target processor can be viewed using the Register window The contents of registers can be edited using the Edit Registers dialog 2 4 1 Viewing Registers To view the contents of the CPU registers of the target processor select the command View gt CPU Registers gt CPU Register You can also display the CPU Register window by selecting the View Registers button on the Debug toolbar Register Window E From the Register window you can edit registers via the Edit Registers dialog 2 4 2 Editing Registers To Edit the Contents of a Register Select Edit gt Edit Register The Edit Registers dialog box appears OR From the Register window double click a register or right click in the window and select Edit Register from the context menu The Edit Registers dialog offers the following options Register Specify the register you want to edit by typing its name or by selecting a register from the drop down list Value This field contains the current value of the specified register displayed in hex You can enter another value in this field in hex with the prefix 0x or in decimal with no prefix You can also enter any valid C expression After modifying the value of a register click Close to apply your changes Click Close again to close the dialog box Note Simulator Peripheral Registers Not Supported The simulator does not include peripheral register s
117. ers to pass additional parameters including values that are defined on the DSP target to the DOS command Format specifications always begin with a percent sign and are read left to right When the first format specification if any is encountered the value of the first argument after format is converted and printed in dosCommand The second format specification causes the second argument to be converted and printed and so on If there are more arguments than there are format specifications the extra arguments are ignored The GEL_System GEL function is implemented using proprietary technology and can be used to extend the capabilities of Code Composer Studio You can use it to perform tasks such as compiling in the background and pipe the results to the output window of Code Composer Studio GEL_System dir GEL_System dir dat which is equivalent to GEL_System dir s dat GEL_System myfunc f d s targVar 3 ol If we assume that targVar is a variable defined on the DSP target and that its value is 3 14 then the final DOS command that will be executed will be gt gt myfunc 3 14 3 ol The General Extension Language GEL 12 35 Built In GEL Functions 12 36 Format Specification Fields A format specification has the following form type Unlike C the GEL format specification contains only the percent sign and a type character for example s The type character determines whether the ass
118. ertion point Delete insert copy Toggle column edit mode Move one character left Move one character right Move one word left Move one word right Move one line up Move one line down Move to the first indentation of cur rent line Move to the beginning of current line Move to the end of line Move to the beginning of the file Move to the end of file Delete one character to the left Delete one character to the right Delete selected text and copy to Clipboard Ctrl Shift F8 Left arrow Right arrow Ctrl left arrow Ctrl right arrow Up arrow Down arrow Home Home Home End Ctrl Home Ctrl End Backspace Delete Ctrl X Shift Delete The Integrated Editor 9 5 Keyboard Shortcuts Keyboard Action To Press Tabs Scroll text Select text Window management 9 6 Turn keyboard insert mode on or off Copy selected text to clipboard keeping it Copy selected text to clipboard deleting it Insert contents of clipboard Undo the last edit With multiple lines selected move lines one tab stop to the right With multiple lines selected move lines one tab stop to the left Scroll up one page at a time Scroll down one page at a time Select character to the left Select character to the right Select one word to the left Select one word to the right Select current line if insertion point is home Select line above if insertion point is home Select to end of the lin
119. erview of Features 9 2 Code Composer Studio offers the following edit capabilities Syntax highlighting Highlight language keywords comments strings and assembler directives in different colors Find and replace Search and replace text strings You can invoke these capabilities from the standard toolbar Context sensitive help in source file Search for help on a highlighted word This is useful in obtaining help on assembly instructions or GEL built in functions Multiple windows Open multiple files or multiple views of the same file Split windows Divide Edit windows within the Code Composer Studio environment c cmd asm h files This allows you to create multiple copies within a single active window To split a window horizontally click on the small bar at the top of the scroll bar and drag down To split a window vertically click on the small bar at the left of scroll bar and drag to the right In either case drag the partition to the size you want for the window copies Edit toolbar Fast access to advanced editor functions Right mouse button access Easy access to advanced editor functions Right click anywhere within an Edit window and select functions from the context menu Overview of Features 9 1 1 Standard Toolbar The Standard toolbar is automatically displayed when Code Composer Studio is started You can toggle it on or off by selecting View gt Standard Toolbar The following buttons are av
120. ete All Breakpoints Using the Breakpoint Dialog Box Select Debug gt Breakpoints The Break Probe Profile Points dialog box appears with the Breakpoints tab selected Click Delete All Click OK to close the dialog box To Delete All Breakpoints Using the Toolbar Click the Remove All Breakpoints button on the Project toolbar E Remove All Breakpoints Enabling and Disabling Breakpoints When a breakpoint is set it can be disabled or enabled Disabling a breakpoint provides a quick way of suspending its operation while retaining the location and type of the breakpoint To Enable a Breakpoint 1 2 3 4 Select Debug gt Breakpoints The Break Probe Profile Points dialog box appears with the Breakpoints tab selected Select the breakpoint you wish to enable from the Breakpoint window The checkbox beside the breakpoint is empty to indicate that it is currently disabled Click on the breakpoint checkbox This adds a check to the box indicating that the breakpoint is now enabled Click OK to close the dialog box To Disable a Breakpoint Select Debug gt Breakpoints The Break Probe Profile Points dialog box appears with the Breakpoints tab selected Select the breakpoint you wish to disable from the list The breakpoint checkbox is checked to indicate that it is currently enabled Click on the breakpoint checkbox This removes the check from the box indicating that the breakpoint is now disabled Click
121. etup COUCOU O O O Saving and Restoring Your Workspace Things that are Not Saved in the Workspace Current font Current color scheme Target memory program or processor state Edit and find replace floating tools Error and progress messages in the build window GEL output windows Scan dependency window Disassembly style options UOUVUUOUUU Note Font and Color Scheme Saved Your font and color scheme along with profiler options memory map and animate speed are automatically saved and restored between sessions in a file named cc_user dat J Note Initializing Target Processor You can initialize your target processor state using the GEL extension language see Section 3 6 Auto Executing GEL Functions L SN The Basics of Code Composer Studio 2 23 Saving and Restoring Your Workspace 2 15 1 Automatically Loading Your Workspace You can automatically load a particular workspace every time you start Code Composer Studio To do this you must name the workspace as the first command line parameter when starting the application This parameter must end in wks for Code Composer Studio to recognize it as a workspace file Otherwise Code Composer Studio will attempt to load it as a GEL file To Autoload a Workspace Windows 95 98 NT 1 In Windows Explorer select the Code Composer Studio executable 2 Right click on the executable and select Create Shortcut to create a shortcut to the executa
122. expressions from the Watch window GEL_WatchReset GEL_WatchAdd GEL_WatchDel The General Extension Language GEL 12 41 Built In GEL Functions Format Parameter Description Example See Also 12 42 Define Extended Memory Ranges C548 only GEL_XMDef Map RegAdadr Type Start Mask Map type of memory space for extended memory mapping Memory Type Page Parameter Program space 0 Data space 1 RegAdar location of mapper register 0x1E Type memory type of mapper register Memory Type Page Parameter Program space 0 Data space 1 Start beginning of mapped memory range use 0x8000 if OVLY is 1 Mask bit mask representing the size of the mapper register This function is used to define extended memory address ranges for the C548 C549 processors GEL_XMDef 0 0x1E 1 0x8000 0x7EF GEL_XMOn Note Simulator GEL_XMDef Not Supported This function is not supported for the simulator LS GEL_XMOn Format Parameter Description Example See Also Built In GEL Functions Enable Extended Memory Mapping C548 C549 only GEL_XMOn None This function is used to enable extended memory mapping for the C548 C549 processors GEL_XmOn GEL_XMDef Note Simulator GELXMOn Not Supported This function is not supported for the simulator The General Extension Language GEL 12 43 Appendix A Frequently Asked Questions The following provides
123. ferent formats The Quick Watch feature allows you to quickly add variables to the Watch window This chapter shows how these features operate for debugging Topic Page 8 1 Adding and Deleting Expressions in the Watch Window 8 2 Editing Variables in the Watch Window 8 3 Watch Window Display Formats 2000eeeeeees 8AP QuickiWatchsermprre crete ere re oper reer ten mentoge pe rer area 8 6 8 1 Adding and Deleting Expressions in the Watch Window 8 1 8 2 Adding and Deleting Expressions in the Watch Window To add an expression in the Watch window follow the steps below 1 Select View gt Watch Window OR Click the Watch Window button on the Debug toolbar Watch Window Bal 2 To add a new expression to the Watch window use any of the following methods E Select one of the four Watch window tabs for Windows 95 NT or the single Watch window for UNIX systems Press the Insert key on the keyboard This brings up the Watch Add Expression dialog box Type the expression you wish to examine in the Expression field and press OK E In the Watch window right click and select Insert New Expression from the context menu The Watch Add Expression dialog box appears In the Expression field type the expression you wish to examine and press OK M Double click on the variable in the source or Dis Assembly window right click and select Add to Watch Window from the context menu W
124. field sets the time frame displayed in the window It also sets the maximum wrap around length between two trigger points When no 0 crossing is detected and the interval between the current sample and the last trigger point is greater than the value in the Display Length field the signal in the data source is wrapped to the left trigger point on the screen 6 3 10 Minimum Interval Between Triggers This field sets the minimum sample interval between two consecutive trigger points If a O crossing is detected and the interval between this point and the last trigger point is the same as or more than the minimum interval the signal in the data source is wrapped to the beginning of the window frame The Graph Window 6 29 Eye Diagram However if a O crossing is detected and the interval between this point and the last trigger point is less than the minimum interval the signal is not wrapped The signal is plotted until either of the following conditions is met 1 The value in the Display Length field maximum wrap around length is reached The signal is wrapped to the left trigger point on the screen L O crossing and the minimum interval conditions are met The signal is wrapped according to the 0 crossing point 6 3 11 Pre Trigger in samples This option sets the number of samples that are displayed before the left trigger point It pans the left trigger point toward the left or right hand side of the screen This option is useful
125. following items as sub selections under the GEL menu My Functions gt InitT arget LoadMyProg When you choose the InitTarget command it is immediately executed To call GEL functions that require parameters to be passed use the dialog keyword The General Extension Language GEL 12 11 Adding GEL Functions to the GEL Menu Using Keywords 12 6 2 The dialog Keyword Use the dialog keyword to add a GEL function to the GEL menu and to create a dialog window for parameter entry When you select the function from the GEL menu a dialog window appears to prompt you for the parameter to enter The strings beside the parameters in the function declaration are for parameter descriptions in the dialog box The syntax of a dialog GEL function is as follows dialog funcName paramName 1 param1 definition paramName2 param2 definition statements paramName 1 6 Parameter variable name that is used inside the function param definition Parameter description that is printed on the dialog window beside the field You can pass up to six parameters to the added GEL function through the dialog window Example 12 7 Dialog Keyword shows how you can use the dialog keyword to add two menu items Example 12 7 Dialog Keyword 12 12 menuitem My Functions dialog InitTarget startAddress Starting Address EndAddress End Address statements dialog LoadMyProg statements This example adds the
126. for the selected processor Note Current System Configuration The Open menu contains the list of physical target boards DSPs and simulated DSPs that are defined in your current system configuration If the correct processor list does not appear under the Open menu make sure that you have correctly configured Code Composer Studio with the Code Composer Setup program Grouping Processors 3 3 Grouping Processors All commands in the Parallel Debug Manager are broadcast to all target processors in the current group Code Composer Studio allows you to define up to 32 different groups of processors Each processor may be included in one or more groups To view the list of groups select Group on the Parallel Debug Manager menu bar This lists all groups by name Select the group you wish to use The active group has a check beside the name as shown in the following figure Broadcast Command Edit FirstBoard Group Group2 Group3 Group4 Group5 Group6 Group To Edit a Group Select Group gt Edit from the Parallel Debug Manager The Groups dialog box appears GroupName tixds6x cpu_a tixdsBx cpub tixds6x epu_c FirstBoard Y Y Group Group2 Group3 Group4 Group5 Group6 Group za lt 222 lt lt i Remove OK Cancel Multiprocessing With Code Composer Studio 3 3 Grouping Processors 3 4 The Groups dialog box displays group names in the first column and processor names acr
127. g is encountered and the minimum interval between triggers condition is met 1 The display length is reached The 0 crossing level is established by the value in the Trigger Level field A 0 crossing is determined by comparing this with the value of each sample and noting the signal trend If it goes above the 0 crossing level the next sample that is equal to or below that level becomes the new O crossing point After this the trend of the signal is assumed to be below the O crossing level Similarly if the trend is below the level the next sample that is equal to or above the level becomes a new 0 crossing point Beyond this the signal trend is assumed to be above the 0 crossing level The trend is initially determined from the value of the first signal sample When a 0 crossing is detected it serves as a trigger point see Section 6 3 4 Trigger Source to wrap the data source signal around provided the value in the Minimum Interval Between Triggers field is met If no O0 crossing is detected the data source signal is wrapped according to the value in the Display Length field maximum wrap around length It is also the middle point of the Y axis range The Y axis is symmetrical about the value in this field A combination of the Trigger Level and the Maximum Y Value yields a minimum value for the Y axis Use the View gt Graph gt Eye command to view the Graph Property Dialog box Field names appear in the left column You can adjus
128. g the Command Line 0 0 ce tees 2 13 Refreshing WindoWS 0 0 eae 2 14 Viewing the Call Stack 00 000 cc eee 2 14 1 Observing Local Variables 000000 cece eee tees 2 15 Saving and Restoring Your Workspace 000 0c cece eee eee 2 15 1 Automatically Loading Your Workspace 2 15 2 The Default Workspace 0000 eee eee Multiprocessing With Code Composer Studio 00 ccc eee eee eee eee 3 1 The Parallel Debug Manager 0 0 c ccc ete eee eee 3 2 Opening an Individual Parent Window 0 0 c cent eens 3 3 Grouping Processors 0 eee tenet eens 3 4 Multiprocessor Broadcast Commands 0 00 e eee eee eee 3 5 Broadcasting GEL Commands 0 0c eect eee 3 6 Auto Executing GEL Functions 000 cee tees 3 7 Global Breakpoints 0 0 0c cee een teen eens Breakpoints and Probe Points 0 00 cece eee eee eee eee eee 4 1 BreakpointS bic ciee teas aoe Maa Pie ks pe eee als eae ee Po 4 1 1 Designer Notes Kernel Based Code Composer Studio Debugger 4 1 2 Adding and Deleting Breakpoints 0 0 00 cece ee ee 4 1 3 Enabling and Disabling Breakpoints 0000 cee eee eee 4 2 Conditional Breakpoints 0 00 c cece eee 4 3 Hardware BreakpointS 0 0 0 cee tees 4 4 Probe POINTS sjcc a c cu halen bets ba Gk ek Re Re ee eee Ae ee Ae ae 4 4 1 Adding and Deleting Probe Points 0000 c eee
129. ge the Probe Point to a conditional Probe Point to activate the probe only if the expression is evaluated to be true Enter the location at which you want to set the Probe Point by using either of the following methods If you used the Toggle Probe Point button this field is already filled with the appropriate value E For an absolute address you can enter any valid C expression the name of a C function or the name of an assembly language label m Enter a Probe Point location based on your C source file This is convenient when you do not know where the C instruction is in the executable The format for entering in a location based on the C source file is as follows fileName line lineNumber If you selected a conditional Probe Point in step 4 then you must enter the condition in the Expression field Connect the window or file to the Probe Point The Connect To drop down list contains all the files and windows that can be connected to the Probe Point From this list select the appropriate item Click Add to create the new Probe Point or click Replace to modify the existing Probe Point 4 4 3 Enabling and Disabling Probe Points Once a Probe Point is set it can be enabled or disabled Disabling a Probe Point provides a quick way of suspending its operation temporarily while retaining the location and type of the Probe Point Note Windows Do Not Update Windows connected to Probe Points that are disabled are not updated aT TY
130. gns 0 to the target symbol The General Extension Language GEL 12 5 GEL Function Parameters GEL parameters can be numerical values or strings such as 1 3 1415 0x100 c filename etc For numerical parameters GEL allows you to pass any valid C expression The expression is evaluated before it is passed to the GEL function If the final value contains a period or the exponent sign for example 1 2 or 1 34e4 it is assumed to be of type real otherwise it is assumed to be an integer You can call the initialize GEL function with either of the following formats Initialize targetSymbol c mydir myfile out 10 Initialize targetSymbol c filename out 1 2 In the first call parameter b is assumed to be an integer value The second call determines the input to be of type real If the target variable targVar is of type int then parameter b is truncated during the assignment to targVar When you define a GEL function using parameter symbols passing it an argument is optional This is because the parameter values are initialized to 0 for numerical values and to a null string otherwise If no parameters are passed the function assumes the default values for the parameters This means you can also call the previous function as follows Initialize Initialize targSymbol c myfile out The first call assigns targVar to 0 However an error is encountered when it tries to execute the statement GEL_Load filename With
131. h R G and B component of each pixel is 8 bits wide and has values ranging from 0 to 255 The following additional fields are created in the Graph Property Dialog box E Start Address R Source E Start Address G Source E Start Address B Source If your actual simulated target consists of multiple pages such as program data and I O you can specify pages using the Data Page options From the list select either Prog Data or I O This indicates whether the page of variable memory location graphically displayed is the program data or I O page Note Simulator I O Memory Page Not Supported The simulator for C54x DSPs does not support the I O memory page 6 4 5 6 4 6 6 4 7 6 4 8 Image Lines Per Display This option specifies the height of the entire image in pixels This value and the value in the Pixels Per Line field determine the image size When the graph is updated the entire image is fetched from the actual simulated target board and displayed Pixels Per Line This option specifies the width of the entire image in pixels This value and the value in the Lines Per Display field determine the entire image size When the graph is updated the entire image is fetched from the actual simulated target board and displayed Byte Packing to Fill 32 Bits This option specifies the packing format of data on the actual simulated target board If you select No the data stream of type byte is not packed and eac
132. h data value on the actual simulated target is of type byte If you select Yes the data stream of type byte is packed so that every four bytes is grouped as a packet The packet is a data value on the actual simulated target of type 32 bit unsigned integer The lowest byte of the data value is the first byte in the packet Selecting the Yes option for this field causes an additional field to appear in the Graph Property Dialog box m Image Row 4 Byte Aligned If you select Yes for this option each image row on the actual simulated target board is 4 byte aligned If you select No each image row on the actual simulated target board is not 4 byte aligned A data value may contain samples of the data for the end of one row and the head of next row Image Origin This field specifies the origin of the image on the graph window You may select among the following options Bottom Left Top Left Top Right and Bottom Right The Graph Window 6 37 Image 6 4 9 Uniform Quantization to 256 Colors This option is available only when the original image is not a 256 color image If you select Yes the image is uniformly quantized to a 256 color image A quantized image has 8 levels for red and green and 4 levels for blue The original red green and blue values are mapped to one of these levels Selecting Yes causes an additional field to appear in the Graph Property Dialog box 1 Error Diffusion If you select Yes this option diffuses the er
133. h to modify its read write attributes You can do this by defining a new memory map with the same start address and length and clicking Add The debugger overwrites the existing attributes with the new ones The Memory Map 7 3 Defining the Memory Map 7 4 To Delete an Existing Memory Map Range You can also delete an existing memory map range You can change the Attributes field to None No Memory Protected This means you can neither read nor write to this memory location You can also delete a memory map range as follows 1 Select Option gt Memory Map The Memory Map dialog box appears 2 Inthe Memory Map List box select the memory map range you wish to delete 3 Click Delete When you attempt to read from a memory location that is protected by the memory map the Code Composer Studio debugger substitutes a protected value instead of attempting to read from the target The default value at start up is 0 therefore all invalid memory locations display the value 0 You can change the default value by entering in your own value in the Protected Value input field of the Memory Map dialog box You can substitute values like OXDEAD to clearly indicate that a read attempt to invalid memory location has been made Using GEL to Define Your Memory Map 7 3 Using GEL to Define Your Memory Map When you first invoke Code Composer Studio the memory map is turned off You can access any memory location the memory map does not inte
134. hat no other hardware on your PC is using this I O setting If you are running Windows 95 you can check for conflicts by selecting START gt SETTINGS gt CONTROL PANEL gt SYSTEM and choosing the Device Manager tab this will outline a layout of your system and will indicate if any conflicts exist between your target board any other hardware on the system Code Composer Setup Configuration a The device driver that you set when running the Code Composer Setup utility may be incorrect Make sure that this driver is appropriate for your DSP target configuration b Your Multiprocessing configuration has not been set up correctly Please refer to the Code Composer Setup online help for details on correctly configuring your Code Composer Multiprocessing System c The Code Composer Setup utility may not reside in the same directory as your Code Composer Studio executable program Please make sure that the setup program is in the same directory as the executable Installation Loading Code Composer Studio DSP Target Setup a b Make sure that your DSP is not in a Hold or Reset state and is correctly powered up Target processor pin is active The target processor must be ready for the debugger to execute If there is a hardware problem on the ready line then if possible put the processor into Microcomputer mode reset the system and try bringing up the debugger again In Microcomputer mode all memory accesse
135. he Dis Assembly window and select an appropriate command from the Debug or Profiler menus or click the appropriate button on the Project toolbar Breakpoints may be quickly set by double clicking on the line of interest These set points are indicated by a colored background on the line The color depends on what type of point is set For example if a breakpoint and a Probe Point are set on the same line a purple and blue background appears on that line Changing Color Highlights You can change the default display colors for the current PC and debugging points breakpoints profile points Probe Points by selecting Option gt Colors Setting Dis Assembly Style Options Code Composer Studio offers several options for changing the way you view information in the Dis Assembly window The Dis Assembly Style Options dialog box allows you to input specific viewing options for your debugging session For instance you may select hex or decimal as the addressing radix Using the Dis Assembly Window To Set Dis Assembly Style Options 1 Select the command Option gt Dis Assembly Style OR Right click in the Dis Assembly window From the context menu select Properties gt Dis Assembly 2 Enter your choices in the Dis Assembly Style Options dialog box 3 Click OK The contents of the Dis Assembly window are immediately updated with the new style 2 2 6 Viewing Mixed C Source and Assembly Code In addition to viewing disassembled instructio
136. he block of memory to be copied 3 Enter the Destination information Address The address to which the block of memory will be copied 4 Click OK to perform the copy All the input fields are C expression input fields Filling Memory Locations 2 10 Filling Memory Locations To Fill a Block of Memory with a Specified Value 1 Select Edit gt Memory gt Fill 2 Inthe Setup Filling Memory dialog box enter the following information Address The start address of the block of memory to be filled Length The length of the block of memory to be filled Fill Pattern The pattern to use in filling the block of memory 3 Click OK to perform the fill All locations starting from the start address to start address length 1 are filled with the fill pattern entered in the Fill Pattern field All the input fields are C expression input fields 2 11 Editing Variables To Edit a Variable 1 Select Edit gt Edit Variable 2 Inthe Edit Variable dialog box enter the following information Variable The name of the variable to be edited Value The new value 3 Click OK to perform the edit The Edit Variable dialog box is also used when editing expressions in the Watch window see Section 8 2 Editing Variables in the Watch Window All the input fields are C expression input fields For Tl fixed point processors if your actual simulated target consists of multiple pages you can specify the specific page with the symbo
137. he file entirely in C or display the assembly files at the same time In C source mode see Section 2 2 6 Viewing Mixed C Source and Assembly Code this command steps over an entire C instruction otherwise it steps over a single assembly instruction However to protect the processor s pipeline several instructions following a delayed branch or call may be considered part of the same statement In this case the step over command may execute more than one instruction at a time P i Step Out If you are inside a subroutine you can select the step out command to complete execution of the subroutine The execution stops after the current function returns to the calling function You can step out by either clicking the button on the Debug toolbar or by selecting Debug gt StepOut In C source mode the calling function is determined from the standard runtime C stack using the local frame pointer otherwise the return address to the calling function is assumed to be the value on the top of the stack If your assembly routine uses the stack to store other information the step out command does not function properly i Run to Cursor You can use the run to cursor feature to run the loaded program until it encounters the Dis Assembly window cursor position You can run to cursor by selecting Debug gt Run to Cursor Single Stepping 2 6 1 Multiple Stepping Operations To Invoke a Stepping Command Multiple Times 1 Select the command Debug g
138. he keyboard If the expression is expanded all subexpressions are removed from the Watch window For Tl fixed point processors if your actual simulated target consists of multiple pages you can specify the specific page with the symbol After you type the symbol enter one of the terms prog data or io This specifies whether the page is a program data or I O page as shown in the following example int 0x1l000 prog int 0x1000 data 8 1 1 Expanding and Collapsing Watch Variables Variables that contain more than one element such as arrays structures or pointers are displayed with either a or sign preceding them The symbol indicates that the variable contains elements and can be expanded The symbol indicates that the variable is fully expanded and can be collapsed To Expand or Collapse a Variable 1 Select the variable you wish to expand by using the mouse or by using the up down arrow keys 2 When the variable is current you can toggle its expansion state by pressing the Enter key Using the Watch Window 8 3 Editing Variables in the Watch Window 8 2 8 4 Editing Variables in the Watch Window You can modify the Watch window expression and its value as follows 1 2 Select the tab for the Watch window you wish to use In the window select the variable you wish to edit by clicking on it with the mouse or by using the up down arrow keys Double click on the variable to obtain the Edit
139. his dialog allows you to specify various characteristics of the Memory window Enter the desired characteristics in the Memory Window Options dialog box see Section 2 3 1 Setting Memory Window Options 3 Click OK The Memory window appears To modify any of the characteristics of the active Memory window right click in the Memory window and select Properties from the context menu The Memory Window Options dialog box appears To edit the contents of a memory location double click the appropriate address in the Memory window or select Edit gt Memory gt Edit The Edit Memory dialog box appears see Section 2 3 2 Editing a Memory Location 2 3 1 Setting Memory Window Options Using the Memory Window The Memory Window Options dialog box allows you to specify various characteristics of the Memory window The Memory Window Options dialog offers the following options Address Q Value Format Use IEEE Float Page Enter the starting address of the memory location you want to view You can display integers using a Q value This value is used to represent integer values as more precise binary values A decimal point is inserted in the binary value its offset from the least significant bit LSB is determined by the Q value as follows New_integer_value integer 2 value A Q value of xx indicates a signed 2s complement integer whose decimal point is displaced xx places from the least significant bit LSB Fr
140. ialog box browse to the file containing your GEL functions 4 Either double click on the filename or click on the filename and then click Open To Unload a GEL File 1 If the Project View window is not visible select View gt Project 2 Click on the sign next to the GEL Files folder to view the individual GEL files 3 Right click on the GEL file you want to remove 4 Select Remove from the context menu Adding GEL Functions to the GEL Menu Using Keywords 12 6 Adding GEL Functions to the GEL Menu Using Keywords You can add GEL functions that you access frequently to the GEL menu To do this use the menuitem keyword to create a new drop down list of menu items under the GEL menu on the menu bar You can then use the keywords hotmenu dialog or slider to add new menu items in the most recent drop down list When you select the user defined menu item under the GEL menu a dialog box or slider object appears 12 6 1 The hotmenu Keyword Use the hotmenu keyword to add a GEL function to the GEL menu that is executed immediately when selected The syntax is as follows hotmenu funcName statements This keyword is used for GEL functions that have no parameters to be passed as in Example 12 6 Hotmenu Keyword Example 12 6 Hotmenu Keyword menuitem My Functions hotmenu InitTarget waitState 0x11 hotmenu LoadMyProg GEL_Load c mydir myfile out This example adds the
141. ides on the actual simulated target board It contains the data that you are interested in When a graph is updated the acquisition buffer is read from the actual simulated target board and the display buffer is updated The display buffer resides in the host memory so it keeps a history of the data The graph is generated from the data in the display buffer When you enter your parameters and press OK the graph window receives an acquisition buffer of DSP data of the length you entered in the Acquisition Buffer Size field This begins at the location in the Start Address field in the DSP data memory space A display buffer of size Display Data Size is allocated within the host memory with all its values initialized to 0 If you enable the Left Shifted Data Display field the entire display buffer is left shifted by the value in the Acquisition Buffer Size field with the values of the DSP acquisition buffer shifted in from the right end The values of the display buffer are overwritten by the DSP acquisition buffer Time Frequency Left shifted data display is useful when you process a signal serially Although the samples are only available one at a time left shifted data display lets you view a history of the samples When the associated Probe Point is reached see Section 4 4 Probe Points a block of DSP data is read and the display is updated The following sections describe input fields in the Graph Property Dialog box 6 1 2 Displa
142. ing a single graph An index increment of 2 for instance corresponds to a sample offset value of 2 which in turn graphically displays every other sample in the acquisition buffer You can therefore specify multiple data sources for display by entering the corresponding offset value in this field This option provides a general specification for interleaved sources E FFT Framesize Specifies the number of samples used in each FFT calculation Note Acquisition Buffer a Different Size The acquisition buffer can be a different size than the FFT frame size L J E FFT Order Specifies the FFT size 2 FFT order E FFT Windowing Function You may select among the following windowing functions Rectangle Bartlett Blackman Hanning Hamming These are performed on the data before the FFT calculation is performed Time Frequency m FFT Magnitude and Phase Consists of a magnitude and phase portion displayed in the same graph display window When you select the FFT Magnitude and Phase option the following additional options appear in the Graph Property Dialog box E Frequency Display Unit Specifies the unit of measure for the frequency axis of the graph Select among the values Hz Hertz kHz kiloHertz and MHz megaHertz E Signal Type Specifies the type of signal source to produce a particular graph Two options are available for the Signal Type property Real corresponding to a single source display as in the case of
143. interleaved or not This field is present if the Signal Type field is set to Complex Toggling this display option allows a single buffer input to represent two sources Setting this option to Yes implies a 2 source input buffer where the odd samples represent the first source and even samples represent the second Setting this option to Yes creates the following additional field in the Graph Property Dialog box I Start Address Starting location on the actual simulated target board of the acquisition buffer containing the data to be graphed When the graph is updated the acquisition buffer starting at this location is fetched from the actual simulated target board This acquisition buffer then updates the display buffer which is graphed You can enter any valid C expression in the Start Address field This expression is recalculated every time samples are read from the actual simulated target This means that if you enter a symbol in this field and the symbol later changes value you do not have to reenter this parameter The Graph Window 6 7 Time Frequency 6 8 Setting Interleaved Data Sources to No creates the following additional fields I Start Address real data I Start Address imaginary data I Index Increment Specifies the sample index increment for the data graph A specification in this field is equivalent to a sample offset for noninterleaved sources This permits you to extract signal data from multiple sources us
144. ints Probe Points and Profile Points from the Dis Assembly Window 0 0 e eee tenes 2 2 4 Changing Color Highlights 0 2 00 cece eee 2 2 5 Setting Dis Assembly Style Options 0 000 e eee eee 2 2 6 Viewing Mixed C Source and Assembly Code onana nananana aana Using the Memory Window 000 c ee eee eae 2 3 1 Setting Memory Window Options 0 00 000 c eee eee eee 2 3 2 Editing a Memory Location aaua aaae 2 3 3 C Expression Input Fields 0 20000 cece eee CPU RGOISIETS o 05 844 pe dee de reee eave e a anc de ebee dota seer ass 2 4 1 Viewing RegisterS 2 20 00 eee eee 2 4 2 Editing Registers 0 0 cc eee eens Loading a COFF File isis cus ai cvs seimat iiaii ai ee be E heed Manse 2 5 1 Loading Symbol Information Only 0 000 cece eee 2 5 2 Reloading a COFF File 0000 c eects 2 5 3 Setting Program Load Options 0000s Single Stepping k ma eisa iai al a aa eed ede a eda ee healed valle hal Wt i 2 6 1 Multiple Stepping Operations 0 0 0 cee ee Run Halt Animate Run Free 2 0 cc ee ee eee 2 7 1 Setting Animation Speed 0000 e eet Resetting Your Target Processor 0 00 cece eee Copying Data Values 2 00 c cette tne Filling Memory Locations 0 0 c eet eee Contents vi 2 14 Editing Variables assena erena re setae awa AARRE ee Ree eek ee whee wore 2 12 Editin
145. io supports concurrent debugging sessions on multiple processors emulator only object file A file that has been assembled or linked and contains machine language object code object library An archive library made up of individual object files options Command parameters that allow you to request additional or specific functions when you invoke a software tool Glossary B 3 Glossary B 4 Probe Point Defines when a window will be updated during program execution When a Probe Point is connected to a window the window is updated only when the Probe Point is reached The window is not updated when a breakpoint is encountered After the window is updated program execution resumes profile point Similar to a breakpoint but instead of halting execution profile points collect statistics on events that have occurred since the previous profile point was encountered project A framework for managing the development of your application programs project environment An integrated collection of tools that speed the development of your application programs Your application program is developed as a project within the Code Composer Studio environment All information pertaining to a project is stored in a project file project file A single file that stores information for a particular project i e the source files object files object libraries software tool options dependencies etc needed to build an application progra
146. ion 12 33 GEL_Run GEL function pek GEL_RunF GEL function 12 34 GEL_SymbolLoad GEL function _ 12 34 GEL_System ee cen 12 3 GEL_WatchAdd GEL function GEL_WatchDel GEL function GEL_XMDef GEL function GEL_XMOn GEL function General Extension Language accessing the output window adding GEL functions to the menu bar 12 11 autoexecuting upon startup built in GEL functions calling a function defining functions A loading unloading unctions 12 10 statements comments _ 12 8 if else 12 7 preprocessing statements 12 9 return while using using keywords 12 11 viewing expression queue 12 18 global breakpoints GoTo source line 9 T3 Graph Title e 6 13 6 20 6 26 6 34 Graph window Constellation Fes am Constellation options Acquisition Buffer Size Axes Display Constellation Points Cursor Mode Display Type DSP Data Type Graph Title Grid Style Index Increment Interleaved Data Sources Maximum X Value Maximum Y Value Index 3 Index Graph window Constellation options continued Minimum X Value Minimum Y Value Q Value Status Bar Display Symbol Size Eye diagram using oad Eye diagram options Acquisition Buffer Size Axes Display Cursor Mode Display Length Display Type DSP Data Type 6 24 D Graph Title Grid Style Index Increment 6 28 Maximum Y Value Minimum Interval Between Triggers Persistence Size Pre Trigger Q Value
147. iple data sources for display by entering the corresponding offset value in this field This option provides a general specification for interleaved sources Time Frequency m FFT Magnitude Performs an FFT on the data in the display buffer and plots a magnitude versus frequency graph The FFT routine uses the FFT frame size rounded up to the nearest power of 2 to determine the minimum number of samples When you select the FFT Magnitude display data type the following additional items appear in the Graph Property Dialog box E Frequency Display Unit Specifies the unit of measure for the frequency axis of the graph Select among the values Hz Hertz kHz kiloHertz and MHz megaHertz E Signal Type Specifies the type of signal source to produce a particular graph Two options are available for the Signal Type property Real corresponding to a single source display as in the case of a single time display and Complex corresponding to two signal sources When you select Complex the Graph Property Dialog box displays the Interleaved Data Source option E Interleaved Data Sources Specifies whether the signal sources are interleaved or not Toggling this display option allows a single buffer input to represent two sources Setting this option to Yes implies a 2 source input buffer where the odd samples represent the first source and even samples represent the second Setting this option to Yes creates the following additional field
148. is moved one position pagelncrement An integer constant specifying the increment added to the value each time the slider is moved by one page paramName Parameter definition that is used inside the function The General Extension Language GEL 12 13 Adding GEL Functions to the GEL Menu Using Keywords Example 12 8 Slider Keyword uses the slide keyword to add a volume control slider Example 12 8 Slider Keyword menuitem My Functions slider VolumeControl 0 10 1 1 volume initialize the target variable with the parameter passed by the slider object targVarVolume volume 12 14 Accessing the Output Window 12 7 Accessing the Output Window Several GEL built in functions are available to print results to an output window of Code Composer Studio These commands can Create unlimited number of output windows Create scrolling or fixed windows Pipe output to any window Print multicolor output Change highlight text Print formatted strings from the actual simulated target C O OC O O Commands that allow you to perform these tasks are GEL_OpenWindow Opens an output window GEL_CloseWindow Closes an existing output window GEL_TargetTextOut Outputs formatted target string GEL_TextOut Prints text to output window The General Extension Language GEL 12 15 Autoexecuting GEL Functions Upon Startup 12 8 12 16 Autoexecuting GEL Functions Upon Startup GEL functions allow you to
149. is true nonzero statement is executed and expression is reevaluated This cycle continues until expression becomes false 0 at which point execution resumes after the statement The statement can be a single statement or several in braces as shown in Example 12 5 While Statement Example 12 5 While Statement while a Count dataspace a 0 a 12 4 4 GEL Comments GEL supports standard C comments within a file GEL comments are delimited by the characters and and may span several lines Calling GEL Functions and Statements 12 4 5 GEL Preprocessing Statements GEL supports the standard define preprocessing keyword This is the only preprocessing keywords currently available A control line such as the following causes the preprocessor to replace subsequent instances of the identifier with the given sequences of tokens define identifier token sequence Leading and trailing white spaces around the token sequence are discarded A control line such as the following where there is no space between the first identifier and the open parenthesis is a macro definition with parameters given by the identifier list define identifier identifier list token sequence When a macro has been defined using the define keyword you may use it anywhere in that file as well as in any other files that are loaded subsequently into Code Composer Studio The General Extension Language GEL 12 9 Loading Unloading
150. ither Prog Data or I O This indicates whether the page of variable memory location graphically displayed is the program data or I O page Note Simulator I O Memory Page Not Supported The simulator for C54x DSPs does not support the I O memory page Acquisition Buffer Size This is the size of the acquisition buffer you are using on your actual simulated target board For example if you are processing samples one ata time enter a 1 in this field Make sure that you connect your display to the correct location in your program See Section 4 4 2 Connecting Probe Points for more details When a graph is updated the acquisition buffer is read from the actual simulated target board and updates the display buffer The display buffer is graphed You can enter any valid C expression for the Acquisition Buffer Size field This expression is recalculated every time samples are read from the actual simulated target Therefore if you enter a symbol in this field and the symbol later changes values you do not have to reenter this parameter The Graph Window 6 21 Constellation Diagram 6 2 7 Index Increment This field allows you to specify the sample index increment for the data graph A specification in this field is equivalent to a sample offset for noninterleaved sources This permits you to extract signal data from multiple sources using a single graph An index increment of 2 for instance corresponds to a sample offse
151. l After you type the symbol enter one of the keywords prog data or io The keyword specifies whether the page is a program data or I O page as shown in the following examples 0x1l000 prog 0 0x1l000 data myVar 0x2000 io 0 The Basics of Code Composer Studio 2 19 Editing the Command Line 2 12 Editing the 2 20 Command Line The Command Line dialog provides a convenient way of entering expressions or executing GEL functions You can execute any of the built in GEL functions or you can execute your own GEL functions that have been loaded see Section 12 5 Loading Unloading GEL Functions To Execute Commands 1 Select Edit gt Edit Command 2 Inthe Command Line dialog box enter an expression or GEL function in the Command field 3 Click OK to execute the command You can also enter and execute built in GEL expressions or user defined GEL functions via the GEL toolbar To access this toolbar select View gt GEL Toolbar The scrollable list in the GEL toolbar contains a history of the most recently executed GEL functions To execute a previously used command select the command and click the button Execute a The following examples display commands that can be entered in the GEL toolbar or the Command Line dialog Modify variables by entering expressions PC c_int00 Load programs with built in GEL functions GEL_Load c myprog out Run your own GEL functions MyFunc Refreshing Windo
152. l data source signal values are measured If you select Yes to enable this option whenever the trigger source crosses the 0 line the data source signal wraps to the beginning of the window frame This causes the eye shape in the signal representation When you enable the Trigger Source field the following additional options appear in the Graph Property Dialog box Oo Interleaved Data Sources Specifies whether the signal sources are interleaved or not Toggling this display option allows a single buffer input to represent two sources Setting this option to Yes implies a 2 source input buffer where the odd samples represent the data source and even samples represent the trigger source Setting this option to Yes creates the following additional field in the Graph Property Dialog box Start Address Starting location on the actual simulated target board of the acquisition buffer containing the data to be graphed When the graph is updated the acquisition buffer starting at this location is fetched from the actual simulated target board This acquisition buffer then updates the display buffer which is graphed You can enter any valid C expression in the Start Address field This expression is recalculated every time samples are read from the actual simulated target This means that if you enter a symbol in this field and the symbol later changes value you do not have to reenter this parameter Setting Interleaved Data Sources to No crea
153. l rebuild these files To Exclude a File From Dependency Scanning An exclusion file exclude dat is used to prevent scans for dependencies on certain files In its initial state exclude dat contains a list of system include files that are unlikely to change You can edit this file to exclude scans of other files such as your header files that never change or to include scans of system files that you need to alter Setting Build Options 10 5 Setting Build Options Use the following procedures to set the compiler assembler and linker options that are used when building your program Define a set of project level options that apply to all files in the project Then optimize your program by defining file specific options for individual source code files To Set Project Level Options Options set at the project level affect all project files 1 Select Project gt Options OR Right click on the project name in the Project View window and select Options from the context menu 2 In the Build Options dialog box select the appropriate tab Compiler Assembler or Linker 3 Select the options to be used when building your program 4 Click OK to accept your selections To Set File Specific Options Options set for a specific file override the project level settings 1 Right click on the name of the source file in the Project View window and select File Specific Options from the context menu 2 Select the options to be us
154. ld 10 10 Index Increment graph option 6 224 6 28 input fields C expression input output installing Code Composer Studio 1 3 Interleaved Data Sources graph option 6 20 K keyboard shortcuts customizing Left Shifted Data Display graph option Lines Per Display graph option linker options setting loading COFF file loading data file_ 5 7 loading kernel 8 loading symbol information 2 12 loading workspace local variables Locked Step 3 5 Locked Step Out Locked Step Over 8 5 Magnitude Display Scale graph option fio 0 1 managing programs Maximum X Value graph option Maximum Y Value graph option 6 23 memory copying_ 2 18 filling 2 19 memory map accessing define using L 7 5 defined B 3 defining m Memory window setting display formats setting window options 2 using memory window editing menus context sensitive Minimum Interval Between Triggers graph option Minimum X Value graph option Minimum Y Value graph option 6 23 mixed C source and assembly code 2 5 multiple operations single stepping 2 15 multiple processors broadcast commands GEL commands Index multiple processors continued grouping opening parent windows synchronizing 3 2 multiprocessing 3 1 auto executing functions broadcasting GEL commands _ 8 6 broadcasting synchronous commands global breakpoints grouping processors O object file object library B 3
155. ld determines the ordering of the data within the acquisition buffer You can toggle between the following options Left to Right where the first sample in the acquisition buffer is considered the newest or most recently arriving and Right to Left where the first sample in the acquisition buffer is considered the oldest 6 1 12 Left Shifted Data Display This option controls how the acquisition buffer is merged into the display buffer You can select either Yes to enable the option or No to disable it When a graph is updated the acquisition buffer is fetched from the actual simulated target board and merged into the display buffer If you enable Left Shifted Data Display the entire display buffer is left shifted with the values of the actual simulated target board acquisition buffer shifted in from the right end Note that at start up all values in the display buffer are initialized to 0 If the Left Shifted Data Display option is not enabled then the values of the display buffer are overwritten by the actual simulated target board acquisition buffer The Left Shifted Data Display option is useful when you are processing a signal in serial fashion Although the samples are only available one at a time the Left Shifted Data Display option lets you view a history of the samples When a Probe Point associated with the window is reached see Section 4 4 2 Connecting Probe Points for details a block of actual simulated target board data i
156. linker stage can t find the obj files What am I doing wrong If the command line invoking the compiler assembler linker tools is greater than 80 characters in length this situation occurs To alleviate the problem remove the include directories from the Build Options Compiler dialog box and use the environment variables such as C_OPTIONS to define the Compiler options For more information see 9 Frequently Asked Questions A 7 General Debugging A 3 General Debugging A 8 1 When I set a breakpoint at a valid C line in my Edit window I get an error message when I begin executing my program Unable to move breakpoint to a valid line at source line lt filename gt at line xxx It has been disabled It may be possible that a You have not loaded the program onto the target The Code Composer Studio debugger needs you to load the program onto your target to get all the symbol information This symbol information tells Code Composer Studio the exact target address for each C source line b No valid assembly line exists for the specified source line NOTE If you are having trouble setting breakpoints the best way to figure out what is wrong is to turn the Mixed C Ass option on this is under the VIEW menu This display will show you all the C lines as well as the associated instructions If you do not see any assembly lines in your file then no symbol information exists for this C file A 4 Editor
157. m or library Register window Enables you to view and edit the contents of CPU or peripheral registers Glossary section A relocatable block of code or data that will ultimately occupy contiguous space in the target memory map simulator A software development system that simulates target processor operation single stepping The program is executed statement by statement allowing you to see the effects of each statement source file A file that contains C or assembly language code that will be compiled or assembled to form an object file symbol A string of alphanumeric characters representing an address or a value symbol table A portion of a COFF object file that contains information about the symbols that are defined and used by the file symbolic information Symbols and strings of alphanumeric characters that represent addresses or values on the target target system The system on which the object code you have developed is executed variable A symbol representing a quantity that can assume any of a set of values Watch window Enables you to view and edit variables and expressions workspace Your Code Composer Studio working environment A workspace can be saved Previously saved workspaces can be reloaded Glossary B 5 A_DIR environment varia ABORT any expressions Acquisition Buffer Size graph option active window ple 10 7 12 18 aez animation TE EL functions Autoscale graph option
158. mple of a Code Composer Studio data file 800 1 10 Oo OO O O 0 O OAO OO O F xx MMMM MM KM MM KM KX OV 5 Tel 000 000 000 000 000 000 000 000 000 000 000 000 000 Note Header Information Override Header values specify only the default address and length When you use the File gt Data gt Load command to load a file into memory the Code Composer Studio debugger gives you a chance to override these values When using the Code Composer Studio data file format with file I O capabilities any information you enter in the File I O dialog box Address and Length automatically overrides the Code Composer Studio data file header information You do not need to set the header information for each file as long as the header includes the following value 1651 1 0 0 0 Loading a Data File 5 2 Loading a Data File A data file can be loaded into the target board at any valid address The data file can be either a COFF object file or a Code Composer Studio data file To Load a Data File 1 2 3 4 Select File gt Data gt Load The Load Data dialog box appears If the data file is not visible in the window navigate to the file you wish to load Select the file name and then click Open The Loading File into Memory dialog box appears In the Loading File into Memory dialog specify the Address where you want the data to be loaded and the Length of the data Click OK All the inpu
159. mposer Studio debugger may attempt to access nonexistent memory On power up the memory map is turned off by default GEL_MapOff GEL_MapAdd GEL_MapOn GEL_MapDelete GEL_MapReset Enable Memory Mapping GEL_MapOn None This function enables memory mapping The Code Composer Studio debugger does not attempt to read from a map segment that is not readable or attempt to write to a map segment that is not writeable When mapping is first turned on the entire memory range is assumed to have no reading or writing capabilities You must add memory sections using the GEL_MapAdd function to allow the debugger to access valid sections On power up memory mapping is turned off by default GEL_MapOn GEL_MapAdd GEL_MapOff GEL_MapDelete GEL_MapReset Memory Map Reset GEL_MemoryReset None This function resets the memory map by making all memory nonreadable and nonwriteable MapReset GEL_MapAdd GEL_MapOff GEL_MapOn GEL_MapDelete Built In GEL Functions GEL_MemoryFill Fill a Block of Memory Format Parameters Description Example See Also GEL_MemoryFill Startaddress Page Length Pattern Startaddress required first address in the block Page required identifies the type of memory to fill Memory Type Page Parameter Program memory 0 Data memory 1 I O space 2 For processors that do not have more than one type of memory use 0 for this parameter For simulated DSP targets the I O space par
160. n in the Start Address field in the DSP data memory space A display buffer equal to the value in the Persistence Size field is allocated within the host memory with all its values initialized to 0 When the graph is updated the entire display buffer is left shifted by the value in the Acquisition Buffer Size field The values of Acquisition Buffer are shifted in from the right end This is useful when you are processing a signal in serial fashion Although the samples are only available one at a time this lets you view a history of the samples When the associated Probe Point is reached see Section 4 4 Probe Points a block of DSP data is read and the display is updated The following sections describe input fields in the Graph Property Dialog box Display Type Graph Title The Display Type option in the Graph Property Dialog box contains several options in the drop down menu in the right column The Eye Diagram option appears by default when you use the command View gt Graph gt Eye Diagram Other options for this field are associated with time frequency see Section 6 1 Time Frequency constellation see Section 6 2 Constellation Diagram or image graphs see Section 6 4 Image You can identify each graph that you create with a unique title This helps to differentiate results when there are many windows open 6 3 4 Trigger Source Eye Diagram A trigger source is an ideal representation of a signal against which the actua
161. ng options you have selected in the Code Composer Studio Build Options dialog box Therefore it is highly recommended that you remove the environment variables to avoid any conflicts Frequently Asked Questions A 5 DSP Project Management System A 6 8 How do include multiple include files of different pathnames as part of my project To include multiple files as part of your project s include collection of files such as header files for instance do the following By following these three steps all of the include files associated with your project whose pathnames are not necessarily equivalent to those of the source file will be included as part of your project a select Project gt Options b select the Compiler tab c in the Include Search Path dialog box enter the complete pathnames of the include files separated by semicolons When I launch the project build process see the following error message inside the Build window when the compiler is invoked Can t run cl6x too many arguments There exists an 80 character limit on the number of characters that any command line used to invoke the TI code generation tools can contain Therefore the number of characters inside the Code Composer Studio Build Options dialog box must be limited to 80 In most cases at the compiler stage the number of characters on the command line is usually taken up by specifications of the paths to th
162. ns in the Dis Assembly window the Code Composer Studio debugger enables you to view your C source code interleaved with disassembled code To View Mixed C Source and Assembly Code After loading a program onto your target or simulator 1 Select View gt Mixed Source ASM A check mark identifies when this option is selected 2 Select Debug gt Go Main The debugger starts executing the program and stops execution at main The associated C source file is automatically displayed in an Edit window See Section 2 8 Resetting Your Target Processor for further information Notice that the disassembled instructions for each C statement appear within the source code Just as in the Dis Assembly window the location of the PC is highlighted in yellow You can choose to view the C source file with or without assembly code To change your selection toggle View gt Mixed Source ASM or right click in the Edit window to open the context menu and select Mixed Mode or Source Mode depending on your current selection The Basics of Code Composer Studio 2 5 Using the Memory Window 2 3 2 6 Using the Memory Window The Code Composer Studio debugger allows you to view the contents of memory at a specific location To View the Contents of Memory 1 Select View gt Memory OR Click the View Memory button on the Debug toolbar Memory Window E 2 Before the Memory window is displayed the Memory Window Options dialog box appears T
163. nteger 8 bit signed integer 8 bit unsigned integer C O OC O C O O You can use a signed integer in combination with the Q Value to interpret fixed point values This field contains a nonzero Q Value which are fractional representations of integer values The data on the actual simulated target is interpreted using the Q Value They are formed by inserting a decimal space in the binary representation of an integer resulting in greater precision The Q Value indicates amount of the displacement according to the formula New_integer_value 2Q Value A Q Value of xx indicates a signed 2s complement integer whose decimal point is displaced xx places from the least significant bit LSB 6 1 10 Sampling Rate Hz This field contains the sampling frequency for acquisition buffer samples such as for analog to digital conversion The sampling rate is used to calculate the time and frequency values displayed on the graph For a time domain graph this field calculates the values for the time axis The axis is labeled from 0 to Display Data Size 1 Sampling Rate For a frequency domain graph FFT Magnitude Complex FFT FFT Magnitude and Phase this field contains the number of samples rounded down to the nearest power of 2 used for the FFT frequency analysis The graph displays the frequency contents of the signal in the range from 0 to Sampling Rate 2 The Graph Window 6 15 Time Frequency 6 1 11 Plot Data From This fie
164. nteger in combination with the Q Value to interpret fixed point values 6 2 10 Q Value Constellation Diagram This field contains a nonzero Q Value which are fractional representations of integer values The data on the actual simulated target is interpreted using the Q Value They are formed by inserting a decimal space in the binary representation of an integer resulting in greater precision The Q Value indicates amount of the displacement according to the formula New_integer_value 9Q Value A Q Value of xx indicates a signed 2s complement integer whose decimal point is displaced xx places from the least significant bit LSB 6 2 11 Minimum X Value This value sets the minimum value of the X axis displayed on the graph 6 2 12 Maximum X Value This value sets the maximum value of the X axis displayed on the graph 6 2 13 Minimum Y Value This value sets the minimum value of the Y axis displayed on the graph 6 2 14 Maximum Y Value 6 2 15 Symbol Size This value sets the maximum value of the Y axis displayed on the graph This property provides a way to set the display size of each symbol Each constellation is displayed as an X symbol The following options are associated with this display property Dot Displays each point as a dot instead of an X symbol Small Medium Large Extra Large C O O O O 6 2 16 Axes Display This option turns the X and Y axes in the graph window on and off Selecting On ena
165. o set the type of files that appear in the File name field Note Do not specify header include files Do not try to manually add header include files h to the project These files are automatically added when the source files are scanned for dependencies as part of the build process iMai 3 Click Open to add the specified file to your project The Project View is automatically updated when a file is added to the project To Remove a File From the Project 1 If the Project View is not visible select View gt Project 2 Expand the Project list as needed 3 Right click on the filename to remove 4 From the context menu select Remove from Project The Project Environment 10 5 Adding Files to the Project 10 3 1 File Extensions Files are identified by their file extension The following table lists the assumptions made based on the file extension Extension Assumptions or c C source file May be compiled and linked a or s Assembly source file May be assembled and linked O or lib Object or Library file May only be linked cmd Linker command file May only be linked See the Code Generation Tools online help for more information on the linker command file other Unrecognizable file Unrecognized files are not added to the project Only one linker command file can be specified for a project Otherwise there is no limit on the number of files that can be added to a project All files
166. ociated argument is interpreted as a string or number as detailed below Character Type Output Format d int Signed decimal integer u int Unsigned decimal integer x int Hexadecimal format Signed value having the form j gauble Jdddd dddd Signed value having the form double d dddd e sign ddd Characters printed up to the first null character The s string string passed to this format type must be a constant string declared on the host Built In GEL Functions e JERE AON Display Target Formatted String Format Parameters GEL_TargetTextOut startAddress Page maxLength format windowName textColor lineNumber append ToEnd changeHighlight startAddress required first address of the block containing the preformatted string Page optional identifies the type of memory Memory Type Page Parameter Program memory 0 Data memory 1 I O space 2 For processors that do not have more than one type of memory use 0 for this parameter The default value for the page number is 0 For simulated DSP targets the I O space parameter is not supported maxLength optional maximum length of the block if the block is longer than 400 bytes The formatted string on the target should be a null terminated string However if a null is not encountered only 400 or maxLength bytes whichever is larger of the string will be printed format optional indicates whether the text is in packed or unpacked format on the ta
167. ode Composer Studio notice that the Build window shows the code generation tools being invoked However no syntactical errors are encountered at the compiler stage and no executable out files are built Invoking the compiler assembler linker from the DOS shell generates the executable without any problems This problem is symptomatic of an incompatibility between the TI 16 bit code generation tools and the 32 bit Code Composer Studio application Adding the following line to your WIN INI file should resolve the issue Code Composer Studio BackgroundCompile SAFE 4 DSP Project Management System When invoke a BUILD or COMPILE from within Code Composer Studio the Build window is displayed yet it is empty No compiler assembler or linker is invoked and the window just remains empty This problem also arises when there is insufficient conventional memory available For more information please see 1 When invoke a BUILD or a COMPILE from within the Code Composer Studio environment obtain a bad command or filename error when the TI tools are invoked in the Build window The path set to point to the TI tools in your autoexec bat file Windows 95 or your System Environment Variables Windows NT must be set to the correct directory of the Tl code generation tools Please make sure this is the case Every time I invoke the linker receive the following error message entry point symbol _c_int100 undefined
168. of file transactions For a file input a progress bar indicates the percentage of samples that has been read from the file and written to the target For a file output a number indicates the number of samples that have currently been written to the file 5 1 2 Data File Formats The commands File gt Data gt Load File gt Data gt Store and File gt File I O all use the file formats COFF and Code Composer Studio data file COFF Binary file that uses Common Object File Format COFF This is the most compact way of storing large blocks of data from the PC Code Composer Studio data file Text file that uses one line of header information and stores the data as one sample per line The data can be in any of the following formats Hexadecimal Integer Long Float C O O O Using the File Input Output Capabilities 5 5 File Input Output 5 6 The header information for data files uses the following syntax where items in italics are variables MagicNumber Format Starting Address PageNum Length MagicNumber Fixed at 1651 Format A number from 1 to 4 indicating the format of the samples in the file This number represents a data format hexadecimal integer long or float StartingAddress The starting address of the block that was saved PageNum The page number the block was taken from Length The number of samples in the block All header values are assumed to be Tl style hexadecimal values The following is an exa
169. oject gt Stop Build to abort the build process The build process stops only after the current file has finished compiling Chapter 11 Profiling Code Execution Code Composer Studio allows you to collect execution statistics about specific areas in your code This is called profiling and it gives you immediate feedback on your application s performance and lets you optimize your code You can determine for instance how much CPU time algorithms use You can also profile other processor events such as the number of branches subroutine calls or interrupts taken Topic Page fil iiProtile Clockepeeeice AA ter ter terse eet ener eaten race 11 2 11 2 Profile Points re neea roe a esse tee a a 1 6 11 3 Hardware Profile Points 0 c eee eee eee eee 11 9 11 4 Viewing Statistics 00 0 cece cece cece eee eee eeaes 11 5 Divide And Conquer Using Profile Points 055 Profile Clock 11 1 Profile Clock The profile clock counts processor instruction cycles or other events during run and single step operations when profiling The profile clock is accessible as a variable named CLK and through the Clock window The CLK variable can be viewed in the Watch window and modified in the Edit Variable dialog box CLK is also available to user defined GEL functions Instruction cycles are measured differently depending on which device driver you are using For device drivers that communicate through the JTAG scan
170. ol value if a target symbol is passed 1 A numerical constant if any expression or constant value is passed 1 A string constant if a string constant is passed The argument that is passed at execution time determines the values the parameter takes on The following is a GEL function definition Initialize a filename b targVar b a 0 a DSP symbol must be passed for parameter a GEL_Load filename a string constant must be passed for filename return b b The following is an example of a correct call to the previous GEL function Initialize targetSymbol c myfile out 23 5 1 22 When the function is executed parameter a is determined to be the DSP symbol targetSymbol parameter filename is determined to be the string constant c myfile out and parameter b is calculated to be the constant value 116 22 These values are used in the function in place of the parameters If a DSP symbol was not passed for parameter a you get a run time error when executing the second statement a 0 For example if you passed a constant value of 20 the second statement is equivalent to 20 0 which is not a valid assignment statement Even if a valid DSP symbol is passed for the first parameter you must ensure that the symbol information is loaded into the Code Composer Studio debugger when you execute the GEL function If the symbol targetSymbol is defined the above call to this function assi
171. om the drop down list select the format of the memory display Select this option if you want the display to use the IEEE floating point format From the drop down list select the type of page Program Data or I O Enable Reference Buffer Select this checkbox to save a snapshot of a specified area of memory that can be used for later comparison For example suppose you select Enable Reference Buffer and specify an address range of 0x0000 0x002F The contents of memory for the specified range are saved in host memory Every time you halt the target hit a breakpoint refresh memory etc the debugger compares the contents of the Reference Buffer with the current contents of memory Any changes are displayed in red as you scroll through this memory space in the Memory window The Basics of Code Composer Studio 2 7 Using the Memory Window 2 8 Start Address Enter the starting address of the memory locations you want to save in the Reference Buffer This field only becomes active when Enable Reference Buffer is selected End Address Enter the ending address of the memory locations you want to save in the Reference Buffer This field only becomes active when Enable Reference Buffer is selected Update Reference Buffer Automatically Select this checkbox to automatically overwrite the contents of the Reference Buffer with the current contents of memory at the specified range of addresses If this checkbox is not selected
172. omposer Studio 1 With Code Composer Studio running load the desired GEL functions and save the entire environment as a workspace by selecting File gt Workspace gt Save Workspace See Section 12 5 Loading Unloading GEL Functions 2 Setup Code Composer Studio to automatically load this workspace on startup see Section 2 15 1 Automatically Loading Your Workspace If you are operating in a multiprocessor environment see Section 3 6 Auto Executing GEL Functions The Basics of Code Composer Studio 2 25 Chapter 3 Multiprocessing With Code Composer Studio Code Composer Studio can support concurrent debugging sessions of multiple processors The Parallel Debug Manager is used to broadcast commands to all processors and to select them individually Before you can use the Parallel Debug Manager you must configure the multiprocessing environment using the Code Composer Setup program Once this configuration is set up and Code Composer Studio is invoked the Parallel Debug Manager menu bar appears on your screen Note Simulator Multiprocessing Not Supported The simulator does not support multiple DSP systems You must use the emulator version of the Code Composer Studio debugger along with a multi DSP target board Topic Page 3 1 The Parallel Debug Manager 00 ees cece eee e eee B 43 3 2 Opening an Individual Parent Window B 43 3 3 Grouping Processors 00ccc cece eee e cenc
173. online help using opening projects 10 2 options setting setting file Specific options 10 9 setting project level options 10 9 output window accessing from GEL pages operator 2 19 Parallel Debug Manager autoexecuting GEL functions 3 broadcast commands broadcast GEL commands grouping processors opening parent windows pasting text Persistence Size graph option Pixels Per Line graph option Plot Data From graph option Pre Trigger graph option printing files 9 11 Probe Points 4 8 adding deleting conditional Probe Points connecting_ 4 9 defined enabling disabling 4 10 hardware tracing memory access 4 13 probe points defined 4 processor pipeline l ine al 3 Index 5 Index profile clock accurac profile points defined B 4 deleting 11 6 enable disable strategies using profiler viewing statistics 11 10 profiling improving accuracy _ 11 4 setup profile clock 17 3 using profile clock 11 2 profiling code execution 11 1 program management 10 7 project adding files 10 5 build commands build options _ 10 9 closing creating j environment 10 1 file dependencies opening 10 2 removing file 10 5 scanning dependencies 10 7 viewing project file B 4 project level options setting o a project manager using Project View window 10 3 Q QuickWatch using Q Value graph option rebuild all redo refreshing windows 2 21
174. oolbar I his Mark To Marks text inclusively to the matching parenthesis when you place the cursor before a parenthesis or brace Mark Next Searches for the next opening parenthesis or brace and if found marks the text to the closing parenthesis or brace You can look deeper into nested blocks by pressing the button again I ne Find Match Moves the cursor to the matching parenthesis or brace t l Find Next Open Moves the cursor to the next open parenthesis or brace B Outdent Marked Text Moves the selected block of text one tab stop to the left Indent Marked Text Moves the selected block of text one tab stop to the right A Edit Toggle Bookmark Creates or removes a bookmark from the current line in the active document Edit Next Bookmark Finds the next bookmark in the active document l Edit Previous Bookmark Finds the previous bookmark in the active document a Edit Bookmarks Opens the Bookmark Properties dialog box You can also access the Edit toolbar by right clicking and selecting Tools gt Edit Toolbar 9 2 Keyboard Shortcuts Table 9 1 Default Keyboard Shortcuts Keyboard Shortcuts A quick way to access editor features as well as others is to use keyboard shortcuts Keyboard Action To Press Manage bookmark Launch bookmark dialog box Alt F2 Toggle bookmark Ctrl F2 Toggle bookmark and edit it Ctrl Alt F2 Go to next bookmark in file F2 Edit column Move ins
175. oss the top Each entry in the table is either Y yes or N no When these entries are Y the processor for that column is included in the group in the same row Only processors that are included in the current group receive broadcast messages Group names can be edited directly and must be unique By default a group named FirstBoard is created that includes all processors This group can be modified but you cannot delete it This ensures that there is always at least one group available To Create a New Group In the Groups dialog box click New Code Composer Studio generates a new group with a unique name Initially none of the processors are included in the new group To Include a Processor in a Group 1 Find the column corresponding to the processor you wish to include 2 Find the row corresponding to the group where you want to include the processor 3 Click the cell where the column and row intersect When a Y appears the processor is included in the group To Delete a Group 1 Using the mouse or the arrow keys highlight the group name 2 Choose Remove Multiprocessor Broadcast Commands 3 4 Multiprocessor Broadcast Commands All commands in the Parallel Debug Manager are broadcast to all target processors in the current group see Section 3 3 Grouping Processors f the DSP device driver supports synchronous operation each of the following commands is synchronized to start at the same time on each processor
176. path instruction cycles are counted using the on chip analysis capabilities of the processors Other device drivers may require the use of other types of timers To manage these resources you must enable and disable the profile clock The simulator uses the simulated on chip analysis interface of a DSP to gather profiling data When the clock is enabled Code Composer Studio takes over the necessary resources to implement instruction cycle counting When it is disabled the resources are available to you See Section 11 1 2 Profile Clock Accuracy for more information on how cycles are counted You can use these functions as follows To Enable Disable the Profile Clock Select Profiler gt Enable Clock A check mark is displayed beside this menu item when the clock is enabled and is not present when the clock is disabled To View the Profile Clock Select Profiler gt View Clock The Clock window appears and displays the value of the CLK variable To Reset the Profile Clock Edit the CLK variable and set it to 0 or double click on the contents of the Clock window 11 1 1 Profile Clock Profile Clock Setup To change the profile clock setup select Profiler Clock Setup from the menu This opens the Clock Setup dialog box Clock Setup x Count CPU Cycles gt p Reset Option Manual Instruction Cycle Time ns 40 C Auto Pipeline Adjustments cycle fo 4 i Cancel Help In the Instruction Cycle Time field
177. pipeline however if the instruction fetch does not have zero wait states extra wait states are counted Setting the Pipeline Adjustment field with an appropriate number is not enough to compensate for all the measurement errors especially the errors due to missed pipeline conflicts As a result the more times you step or run the program the less accurate the profile clock is Similarly the more breakpoints Probe Points and profile points that are encountered the less accurate the clock is Profile Clock To Obtain Accurate Instruction Cycle Counts Use the following steps to obtain an accurate cycle count between two points A and B in your program Set a breakpoint at point C that is at least four instructions past point B in the program flow Set a breakpoint at point A and run to that breakpoint Reset the clock and remove the breakpoint at point A Run to the breakpoint at point C and record the value of the CLK variable which represents the cycle count between points A and C Repeat steps 2 through 4 using point B instead of point A Make sure your program is in the same state as it was for measuring the cycles between point A and point C Subtract the cycle count between points B and point C from the cycle count between point A and point C This eliminates the measurement errors introduced by stopping the processor at point C Profiling Code Execution 11 5 Profile Points 11 2 Profile Points Profile Points a
178. put Output Capabilities 5 3 File Input Output 5 4 Wrap Around Mode Under the File Input tab you can select the Wrap Around checkbox You can use wrap around mode to loop a file so that when the end of the file is reached access starts from the top This feature is useful when you want to generate a periodic signal from a file If wrap around mode is not selected and the end of file is reached you are prompted with a message indicating the end of file condition and the program is halted File Input Output 5 1 1 File I O Controls When you enter data in the File I O dialog box and click OK control windows appear that allow you to monitor and control the progress of the file I O activity C2 Sineddat Pile ES gt cw ie The following are features of the control windows 1 Play button Resumes file I O transactions after a pause m Stop button Halts all transfer of data from to the file regardless of whether a Probe Point was hit or not This button can be used to temporarily halt file I O transfers 11 Rewind to Beginning button Resets the file For file input the next samples are read from the top of the file For file output all existing samples are deleted and the new samples are written to the top of the file 1 Fast Forward button Simulates a Probe Point hit When you click this button the same I O occurs as when the target hits a Probe Point m File l O progress field Shows the progress
179. r Left Shift Display Have this option selected b Connect the Graph window to a Probe Point When you are using the left shift display option it is recommended that you attach the graph to a Probe Point so that the Graph window does not update when you don t want it to The graphical display will now graph the values of the variable Appendix B Glossary active window The window that is currently selected for editing moving resizing closing etc Animate The program executes until a breakpoint is encountered When a breakpoint is encountered execution halts and the debugger updates all windows that are not connected to any Probe Point s Program execution resumes until the next breakpoint animation speed Defines the minimum time between breakpoints When executing a program using the animate command execution will not resume until the minimum time has expired since the previous breakpoint autoload Load files automatically on startup bookmark Marks a key location within a source file breakpoint Defines a point at which program execution will be halted While execution is stopped you can analyze the state of your program byte A sequence of eight adjacent bits operated upon as a unit B 1 Glossary B 2 Call Stack window Displays the series of function calls that led to the current location in the program that you are debugging Common Object File Format COFF A binary object file format tha
180. r gt Profile Points The Break Probe Profile Points dialog box appears with the Profile Points tab selected 2 Click Delete All 3 Click OK to close the dialog box 11 2 1 Enabling and Disabling Profile Points Once a profile point is set it can be disabled or enabled Disabling a profile point provides a quick way of suspending its operation temporarily while retaining the location and type and accumulated statistics of the profile point To Enable a Profile Point 1 Select Profiler gt Profile Points The Break Probe Profile Points dialog box appears with the Profile Points tab selected 2 In the Profile Point window select the profile point you wish to enable from the list The profile point checkbox is empty if the point is currently disabled 3 Click on the profile point checkbox The checkbox now contains a checkmark indicating that the profile point is enabled 4 Click OK to close the dialog box Profiling Code Execution 11 7 Profile Points To Disable a Profile Point 1 2 3 4 Select Profiler gt Profile Points The Break Probe Profile Points dialog box appears with the Profile Points tab selected In the Profile Point window select the profile point you wish to disable from the list The profile point checkbox contains a checkmark if the point is currently enabled Click on the profile point checkbox The checkbox is now empty indicating that the profile point is disabled Click OK to clos
181. r test out cpu_b GEL_SymbolLoad The General Extension Language GEL 12 23 Built In GEL Functions GEL_MapAdd Add to the Memory Map Format Parameters Description Example See Also 12 24 GEL_MapAdd Aaddress Page Length Readable Writeable Address required starting address of a range in memory This parameter can be an absolute address any C expression the name of a C function or an assembly language label Page required identifies the type of memory to fill Memory Type Page Parameter Program memory 0 Data memory 1 I O space 2 For processors which do not have more than one type of memory use 0 for this parameter For simulated DSP targets I O Space parameter is not supported Length required defines the length of the range This parameter can be any C expression Readable required defines whether the memory range is readable 0 Not readable 1 Readable Writeable required defines whether the memory range is writeable 0 Not writeable 1 Writeable This function adds read write permission for a range of target memory to the memory map If the range overlaps an existing entry the attributes of the new range take precedence in the memory map GEL_MapAdd 0x1000 0 0x300 1 1 GEL_MapDelete GEL_MapOn GEL_MapOff GEL_MapReset Built In GEL Functions GEL_MapDelete Delete from the Memory Map Format Parameters Description Example See Also GEL_M
182. r ert eter 12 5 12 4 Calling GEL Functions and Statements 2 7 12 5 Loading Unloading GEL Functions 12 6 Adding GEL Functions to the GEL Menu Using Keywords 12 11 12 7 Accessing the Output Window 00 cece eee eee es 12 8 Autoexecuting GEL Functions Upon Startup 12 16 12 9 Viewing the Expression Queue 00 12 10 Built In GEL Functions 0 0 000cceececeueseecnnas 12 1 GEL Grammar 12 1 GEL Grammar GEL is a subset of the C programming language You cannot declare host variables however all variables must be defined in your DSP program and exist on the actual simulated target The only identifiers that are not defined on the target are GEL functions and their parameters When a variable is evaluated the Code Composer Studio debugger gets the necessary information from the target The COFF file with the symbol information must already be loaded GEL supports the following types of statements Function definitions Function parameters Calling GEL functions Return statements lf else statements While statements GEL comments Preprocessing statements C O OC O C O O Example 12 1 A Basic Gel Function shows how a GEL function is defined Once a function is loaded you can execute the function anytime by calling it with the correct parameters Calls such as MyFunc 100 0 or MyFunc 200 are both valid Example 12 1 A Basic Gel Func
183. re special breakpoints that capture profiling information at specific locations in the program Each profile point counts the number of times the profile point was hit and keeps statistics on the number of cycles or other events that have elapsed since the previous profile point was hit Unlike breakpoints profile points resume execution after accumulating their statistics Once a profile point is set it can be enabled or disabled The profile clock must be enabled for it to maintain statistics on the instruction cycles or other events When the profile clock is disabled profile points are able to count the number of occurrences of each profile point but they cannot generate other statistics To Add a Profile Point You can create profile points by placing the cursor on the line in the source file or Dis Assembly window where you want the profile point to be and clicking the Profile Point button on the Project toolbar Profile Point To Delete an Existing Profile Point 1 Select Profiler gt Profile Points The Break Probe Profile Points dialog box appears with the Profile Points tab selected 2 Select a profile point in the Profile Point window 3 Click Delete 4 Click OK to close the dialog box Profile Points To Delete All Profile Points From the Project toolbar click the Remove All Profile Points button Remove All Profile Points You can also delete all profile points using menu commands 1 Select Profile
184. ree From the Commands window select the command you wish to customize You can view its current keyboard shortcut s in the Assigned Keys window To assign a new key sequence for invoking the selected command click the Add button The Assign Shortcut dialog box appears In this dialog box enter the new key sequence and then press OK To remove a particular key sequence for a command select the key sequence in the Assigned Keys window and click the Remove button With the Save As option you can save a keyboard configuration in a file This button brings up the Save As dialog box where you can navigate to the location where you want to save your configuration Use the browse button to navigate to and load a previously saved configuration file You can immediately switch to brief editor shortcut keys by clicking the BRIEF Keys button File Manipulation 9 3 File Manipulation The following sections describe operations you can perform on your source files 9 3 1 Creating a New File Use the following procedures to create a new source file Creating a source file does not affect existing source files 1 6 Select File gt New This opens a new Edit window You can also use the New File button on the Standard toolbar New File fa Type your source code in the new window Notice that an asterisk appears next to the file name in the Edit window s title bar indicating that the source file has been modified
185. rfere If you invoke Code Composer Studio with an optional GEL file name specified as a parameter Code Composer Studio automatically loads this GEL file If you also have a GEL function named as StartUp it is executed You can specify your map functions in this file to automatically specify your memory mapping requirements for your environment You can use the following GEL functions to define your memory map GEL_MapAdd Memory map add GEL_MapDelete Memory map delete GEL_MapOn Enable memory map GEL_MapOff Disable memory map GEL_MapReset Reset memory map The GEL_MapAdd function defines a valid memory range and identifies the read write characteristics of the memory range The following is a sample of a GEL file that can be used to define two blocks of length OxF000 that are both readable and writeable StartUp GEL_MapOn GEL_MapReset GEL_MapAdd 0 0 OxF000 1 1 GEL_MapAdd 0 1 OxF000 1 1 When you have set up your memory map you can use the Option gt Memory Map command to view it For more information on implementing these built in GEL memory manipulation functions please refer to Chapter 12 The General Extension Language GEL The Memory Map 7 5 Chapter 8 Using the Watch Window The Watch window allows you to examine and edit variables and C expressions In the Watch window you can expand and collapse complex expressions You can also evaluate terms and display results in dif
186. rget 0 ASCII character bytes 1 Packed ASCII character using big endian format the first character is in the most significant byte of the target 2 Packed ASCII character using little endian format the first character is in the least significant byte of the target windowName optional name of the window where you want the output to go If the window is not opened it is created using the default parameters of the GEL_OpenWindow GEL function see GEL_OpenWindow on page 30 textColor optional printed color of the text 0 Black text 1 Blue text 2 Red text lineNumber optional for a nonscrolling window line number of the window where the printing should start The General Extension Language GEL 12 37 Built In GEL Functions Description Example See Also 12 38 appendToEnd optional flag used only if you are printing to a nonscrolling window If this flag is set to 1 the text is appended to the existing line Otherwise the existing line is erased and the new line is placed in the output window changeHighlight optional flag used only if you are printing to a nonscrolling window and replacing a specific line If this flag is enabled the new text is compared to the old text If a change is encountered the new text is highlighted This function is used to print a formatted string to an output window of Code Composer Studio The string must already exist on the target and must be n
187. rl Shift F8 While pressing the Alt key move the cursor to the column you wish to select and click and drag to select a column area You can also select a column by pressing the shift key as you move the cursor with the arrow keys You can cut copy paste and delete the selected columns as desired see Section 9 3 6 Cutting Copying and Pasting Text File Manipulation 9 3 9 Undo Redo Actions Select the Edit gt Undo and Edit gt Redo commands to reverse the last editing action in the active window To Undo Select Edit gt Undo You can also use the keyboard shortcut Ctrl Z or the Undo button on the Standard toolbar Undo z To Redo Select Edit gt Redo You can also use the keyboard shortcut Ctrl A or the Redo button on the Standard toolbar Redo Ta 9 3 10 Tabbing Multiple Lines To change the indent of a group of lines select the entire section and press the Tab key on the keyboard to indent or Shift Tab to outdent You can also use the Outdent Marked Text and Indent Marked Text buttons on the Edit toolbar Outdent Marked Text B Indent Marked Text E 9 3 11 Go To Source Line You can quickly go to a specific line or bookmark in a source file using the Go To command To Go To a Specific Line or Bookmark 1 Select Edit gt Go To The Go To dialog box appears OR Right click within the Edit window and select Go To from the context menu 2 Specify the line or bookmark you want to view
188. roject GEL_ProjectBuild None This function builds the current project GEL_ProjectBuild GEL_ProjectLoad GEL_ProjectRebuildAll The General Extension Language GEL 12 31 Built In GEL Functions ad ce 101d more 10 Format Parameter Description Example See Also Loads the Project GEL_ProjectLoad fileName fileName required project file to load This function loads a specified project file GEL_ProjectLoad d mydir myproject mak GEL_ProjectBuild GEL_ProjectRebuildAll e a e GNOU Completely Rebuild Current Project Format Parameters Description Example See Also GEL _Reset Format Parameters Description Example See Also 12 32 GEL_ProjectRebuildAll None This function completely rebuilds the current project GEL_ProjectRebuildAll GEL_ProjectBuild GEL_ProjectLoad Reset Target System GEL_Reset None The Reset function resets the target system and reloads the monitor Note that this is a software reset GEL_Reset GEL_Restart GEL_Run GEL_Halt GEL_Restart Format Parameters Description Example See Also Format Parameter Description Example See Also Built In GEL Functions Reset PC to Program Entry Point GEL_Restart None The GEL_Restart function resets the program to its entry point This assumes that a program with symbol information has been loaded into the target GEL_Reset GEL_Reset GEL
189. rom 6 16 Q Value 6 15 Sampling zE 6 15 Start Address 6 13 Status Bar Display toggle breakpoints 4 21 Probe Points tracing memory access Trigger Level graph option 6 31 Trigger Source graph option 6 27 troubleshooting FAQ JA tutorial 1 4 Index U undo Uniform Quantization to 256 Colors graph option 6 38 variables B 5 viewing mixed source and assembly code viewing projects 10 3 viewing registers W Watch window adding deleting expressions defined display formats B 5 editing variables expanding collapsing variables QuickWatch windows Dis Assembly_ 2 3 dockable Graph Memory window parent windows for multiple processors Project View w_ 10 3 refresh loading restore Index 7
190. ror introduced by quantization to give a smoother color If you select No the quantization error is not adjusted If you select No for Uniform Quantization to 256 Colors the image is not quantized and displayed in RGB color space Note that if the display hardware cannot display more than 256 colors this option is forced to Yes 6 4 10 Status Bar Display This option turns the status bar display at the bottom of the graph window on and off Selecting On enables the display and Off disables it 6 4 11 Cursor Mode This field sets the cursor s appearance and function in the graph You may choose among the following options LY No Cursor 4 Data Cursor Appears on the graph screen with the cursor coordinates in the graph status bar T Zoom Cursor Allows you to enlarge areas of the graph Place the cursor on one corner of the area hold the left mouse button down and draw a rectangle around the area of interest 6 38 The Memory Map The memory map tells the Code Composer Studio debugger which areas of memory it can and cannot access Typically the map matches the memory definition in your linker command file For information about the memory directive and setting up a linker command file see the Code Generation Tools online help Topic 7 1 Accessing Memory Maps 7 2 Defining the Memory Map 7 3 Using GEL to Define Your Memory Map 7 1 Accessing Memory Maps 7 1 Accessing Memory Maps 7 2 When you enable
191. rresponding offset value in this field This option provides a general specification for interleaved sources If you enable the Interleaved Data Sources option see Section 6 1 2 Display Type the Index Increment option is disabled 6 3 8 6 3 9 Eye Diagram Persistence Size This is the size of the display buffer that you use The contents of the display buffer are graphed on your screen The display buffer resides on the host so a history of your signal can be displayed even though it no longer exists on the actual simulated target board The Persistence Size field contains the number of samples in history that the graph displays Usually the persistence size is greater than or equal to the value in the Acquisition Buffer Size field If the Persistence Size field is greater than the Acquisition Buffer Size field the acquisition buffer data is left shifted into the display buffer Graph displays are cumulative and as a result the graph window may display more samples than the specified persistence size You can flush out older data from the display buffer with incoming samples that are in excess of the specified Persistence Size by right clicking the mouse on the graph window and selecting Refresh This sets the persistence size to the display buffer length You can use any valid C expression for the Persistence Size field This expression is calculated when you click OK in the Graph Property Dialog box Display Length This
192. s 4 5 Conditional Probe Points Every conditional Probe Point has its own conditional expression When the processor reaches the location of the conditional Probe Point it evaluates the expression If the result of the expression is false the processor resumes execution as if it did not encounter a Probe Point If the expression is true it performs as if a standard Probe Point were hit see Section 4 4 Probe Points You can also connect GEL General Extension Language files that you define to meet conditions that must be satisfied for the particular Probe Point to be enabled To enter the GEL file name 1 Select Debug gt Probe Points The Break Probe Profile Points dialog box appears with the Probe Points tab selected 2 From the Probe type drop down list select Probe at Location if expression is TRUE Only when this selection is made will the Expression field become active allowing you to enter the GEL file name 3 Enter the GEL file name in the Expression field This ensures that the Probe Point is only enabled if your condition is met For more information on GEL files and their implementation see Chapter 12 The General Extension Language GEL 4 12 Hardware Probe Points 4 6 Hardware Probe Points Hardware Probe Points operate the same as regular Probe Points except they are implemented using hardware breakpoints instead of software breakpoints see Section 4 3 Hardware Breakpoints Hardware Probe
193. s If you do not supply an address then GEL_Go becomes equivalent to the GEL_Run GEL function It may occur that your code never reaches the address that you have specified in this case the GEL function is never completed To abort such an expression select View gt Expression List to view all the expressions that are being evaluated Select the GEL_Go expression and click Abort GEL_Go GEL_Go main GEL_Run GEL_Halt Format Parameters Description Example See Also GEL _Load Format Parameters Description Example See Also Built In GEL Functions Stop Execution GEL_Halt None This function halts the target program if it is executing GEL_Halt GEL Go GEL_Run GEL RunF Load a data file GEL_Load fileName cpuName fileName required in quotes object file to be loaded cpuName optional in quotes name of the CPU on which to load the file useful in a multiprocessor environment This function loads both an object file and its associated symbol table into memory If the file is not in the current directory of Code Composer Studio provide a full path name within the string Note that a double backslash escape sequence is required to ensure you get a backslash into the fileName parameter The cpuName parameter must match the CPU name as configured in the Code Composer Studio multiprocessor setup In a single processor system you do not need to fill this field GEL_Load c workdi
194. s read and the display is updated If you left shift the data into the display make sure that the graph window is only updated when the actual simulated target board data is valid 6 1 13 Display Peak and Hold 6 16 This option allows you to view the peak values of successive graphs You can select either On to enable the option or Off to disable it If you enable the Display Peak and Hold option a history of peaks attained through successive data acquisitions updates is maintained When a new buffer is acquired a new FFT calculation is performed and if a particular sample magnitude in this new calculation falls above a peak value of the previous sample graphically displayed the new graph is adjusted to contain that peak If the sample attains a value smaller than the peak the graph s current peak value is maintained 6 1 14 Autoscale 6 1 15 6 1 16 6 1 17 6 1 18 Time Frequency If you disable the Display Peak and Hold option no adjustments are made to maintain the sample graphical peak values The displayed FFT magnitude reflects only calculations on the current frame buffer This option allows the maximum value of the Y axis to be determined automatically You can select either On to enable the option or Off to disable it If you enable Autoscale the graph uses the maximum value in the display buffer to set the Y axis range and graphs all values accordingly If you disable Autoscale an additional field appears in th
195. s should be on chip and the ready signal should have no effect Check your device user s guide for details The processor hold pin is active Same issue as b The JTAG signal may not be clear enough In order to provide high quality signals between the emulator and the target processor please check that the unbuffered distance between the emulator header and the processor is less than 6 inches If this distance is in excess of 6 inches the emulation signals should be buffered The processor does not have a clock out Processor must be receiving and generating the proper clocks Check your clock in circuit and clock mode The EMUO0 1 pins must be high The value of the EMUO0 1 pins and reset can be used to turn off device pins and or invoke device test modes The user should have these pins pulled high through a resistor in his her target system Is Code Composer Studio Year 2000 compliant There are no Year 2000 issues pertaining to the operation of the Code Composer Studio software For information on Code Composer Studio and Year 2000 conformity please contact the Texas Instruments Year 2000 Program Office at Texas Instruments Year 2000 Program Office 6500 Chase Oaks Blvd M S 8418 Plano TX 75023 Attn Customer Communications Or see the following web site http www ti com corp docs year2000 Or see the TI product matrix at http www ti com corp docs year2000 dspsds htm Frequently Asked Questions A 3 D
196. se Code Composer Studio shortens your learning time and provides information on many fundamental procedures To access the Code Composer Studio Tutorial perform the following steps 1 Start Code Composer Studio by double clicking on the CCStudio icon located on the desktop 2 From the Code Composer Studio Help menu select Tutorial gt Code Composer Studio Tutorial Using Online Help To obtain help on any aspect of Code Composer Studio select Help gt General Help From the Code Composer Studio General Help Contents and Index you can browse or search for information on any tool feature or functionality of the Code Composer Studio product Od a T 0 The Basics of Code Composer Studio This chapter contains an introduction to the basic concepts and features of Code Composer Studio These concepts are essential to almost any debugging session Topic Page 2 1 Using Code Composer Studio Windows and Toolbars 2 2 2 2 Using the Dis Assembly Window 0 20ceeeeeeeeers 2 3 2 3 Using the Memory Window 00ceeceeceeeeeaeeees 2 6 2 4 CPU Registers 22 5 lt ccenc enr ea ee em sages eae gt cer ec ens 11 2 57 Loading a CORP Filen a ea orc ones ea ence 26r Single Stepping mmr eerie rere ee ier terre erent 2 7 Run Halt Animate Run Free 0 ce cee e eee eee 2 16 2 8 Resetting Your Target Processor ssssssssssrsnsenrnn 2 9 Copying Data Values cnc ne srr mennene aknen 2
197. specify information on the file set a Probe Point by placing your cursor at the point where you want to set the Probe Point Click the Toggle Probe Point button on the Project toolbar Leave the Probe Point unconnected The Probe Point tells the Code Composer Studio debugger when you want to start streaming data from to the file That is once the execution of the code reaches this point the Code Composer Studio debugger updates or reads from the file that is connected to the Probe Point When it is finished execution continues Toggle Probe Point ie 2 Select File gt File I O A File I O dialog box appears The File I O dialog prompts you for specific information Choose either the File Input or the File Output tab 3 6 File Input Output Click Add File under either the File Input or the File Output tab The File Input dialog box appears Navigate to the folder that contains the file you wish to use LY Highlight the file name in the main window of the dialog the name appears in the File name field The data file can be either a COFF object file or a Code Composer Studio data file see Section 5 1 2 Data File Formats 1 Click Open The file name appears in the File I O dialog box You can repeat this procedure to select additional file for either File Input or File Output When you insert a file in the File I O dialog box it is not connected to a Probe Point Notice that the Probepoint field shows the words
198. ss nothing happens The address can be an absolute address any C expression the name of aC function or the name of an assembly language label GEL_BreakPtDel 0x2000 GEL_BreakPtDel TargetLabel 100 GEL_BreakPtAdd GEL_BreakPtReset Clear all Breakpoints GEL_BreakPtReset None This function clears all software breakpoints GEL_BreakPtReset GEL_BreakPtAdd GEL_BreakPtDel Close an Output Window GEL_CloseWindow windowName windowName required in quotes name of window to be closed This function closes an existing output window where windowName specifies the name of the window to be closed This parameter must be the same as the parameter given to the GEL_OpenWindow function GEL_CloseWindow My Window GEL_CloseWindow Macro Output GEL_OpenWindow GEL_TargetTextOut GEL_TextOut The General Extension Language GEL 12 21 Built In GEL Functions GEL_Exit Format Parameters Description Example See Also Format Parameter Description Example See Also 12 22 Close the Active Control Window GEL_Exit None This function closes the active control window For a single processor system it closes Code Composer Studio completely GEL_Exit GEL_CloseWindow Run to Specified Address GEL_Go address address optional stop address The GEL_Go function executes code up to a specific point in the program The address parameter is treated as a program memory addres
199. t Alternatively click Replace All to replace all occurrences of the selected text Finding and Replacing Text 9 4 4 Finding Text in Multiple Files The Edit gt Find in Files command enables you to search multiple text files for a specific text string or regular expression To Find a Text String or Regular Expression 1 Select Edit gt Find in Files You can also use the Find in Files button on the Standard toolbar Find in Files Eg 2 Inthe Find in Files dialog box provide the following information Find What Enter a text string or a regular expression Use the drop down list to select from a list of previous search strings Files of Type Select the file type you want to search Select from a drop down list of common file types or enter text specifying a file type In Folder Select the primary folder that you want to search Enter text specifying a drive and folder or use the Browse button to select a folder Look in subfolders Search subfolders of the specified primary folder Match case Search for text that matches the capitalization of the text string Match Whole word only Match only occurrences of the text string that are not preceded or followed by an alphanumeric character or an underscore _ Look In Project Files Search within a particular project 3 Click Find to begin the search An Output window displays the results of the search For each match the Output window displays the fully q
200. t Center or Right radio buttons in the Justification field to change the display of data Select either the Cycle Time or Frequency radio buttons in the Units field to change the unit of measure for the Profile Statistics window Units of measure can either be cycle counts time seconds or frequency Hertz You can configure the instruction cycle time in the Clock Setup dialog box see Section 11 1 1 Profile Clock Setup Cycle times are converted to frequency by taking the reciprocal Units of frequency may be useful for example in determining if your program can handle a given sampling frequency Cycle counts are converted to time by multiplying the cycle count by the instruction cycle time Profiling Code Execution 11 11 Divide And Conquer Using Profile Points 11 5 11 12 Divide And Conquer Using Profile Points This section describes a procedure for optimizing your program for CPU consumption using profile points This procedure is suitable for both assembly and C language programs 1 2 Compile your C program with full optimization enabled Setup input files and Probe Points to simulate your algorithm without making changes to the source code You must simulate your algorithm because profile points slow down your program s execution Set a profile point in the main loop of your algorithm Run your application to generate profile statistics on the execution of your entire program If your program already meets r
201. t promotes modular programming by supporting the concept of sections All COFF sections are independently relocatable in memory space you can place any section into any allocated block of target memory Dis Assembly window Displays disassembled instructions and symbolic information needed for debugging disassembly Assembly language code formed from the reverse assembly of the contents of target memory dockable windows Many windows in Code Composer Studio are dockable You can move and align a dockable window to any portion of the Code Composer Studio main window Disabling the Allow Docking property lets you remove the window from the general Code Composer Studio parent window and place it anywhere on the desktop emulator A hardware development system that emulates target processor operation entry point A point in target memory where execution begins Glossary General Extension Language GEL An interpretive language that enables you to write functions to configure your Code Composer Studio environment and access the target processor Graph window Enables you to analyze data that is produced by your application programs Memory window Displays the contents of target memory starting at a specified address memory map A map of target system memory space which is partitioned into functional blocks The memory map tells the debugger which areas of memory can and cannot be accessed multiprocessing Code Composer Stud
202. t Multiple Operations 2 Inthe Multiple Operations dialog box select a stepping command from the drop down list 3 Specify the number of times the command is to be invoked 4 Click OK Repeat this procedure to invoke the same or another stepping command multiple times The Basics of Code Composer Studio 2 15 Run Halt Animate Run Free 2 7 2 16 Run Halt Animate Run Free 2 Run You can execute your program from the current PC location by clicking the button on the Debug toolbar or by selecting Debug gt Run Execution continues until a breakpoint is encountered Ey Halt You can stop execution of your program by clicking the button on the Debug toolbar or by selecting Debug gt Halt Ed Animate You can animate your program by clicking the button on the Debug toolbar or by selecting Debug gt Animate The program runs until it encounters a breakpoint It updates the windows that are not connected to any Probe Points and resumes execution To halt animation select Debug gt Halt You can control the speed of animation by selecting Option gt Animate Speed Run Free This command disables all breakpoints including Probe Points and profile points before executing your program starting from the current PC location Select the command Debug gt Run Free Any operation that accesses the target processor while in free run restores breakpoints Use the Debug gt Halt command to stop execution If you are emulating using
203. t fields are C expression input fields 5 3 Storing a Data File Memory values from the target board can be stored in a data file which can be either a COFF object file or a Code Composer Studio data file To Store Data to a File 1 2 3 4 Select File gt Data gt Store The Store Data dialog box appears Specify a data file name and then click Save The Storing Memory into File dialog box appears In the Storing Memory into File dialog specify the starting Address and the Length of the data you want to store Click OK All the input fields are C expression input fields Using the File Input Output Capabilities 5 7 Chapter 6 The Graph Window Code Composer Studio incorporates an advanced signal analysis interface that enables developers to monitor signal data critically and thoroughly The new features are useful in developing applications for communications wireless image processing as well as general DSP applications This chapter describes how you can use the graphing capabilities of Code Composer Studio to view signals on your actual simulated target system Topic Page 6 1 Time Frequency se srsrnnsernesnen anesan 6 2 Constellation Diagram aa eee eee ees 6 19 OS IVE IWIEC EUs secescscvceaesoscnouneepo uu socuoDecoUeduES 6 25 OS Mage serras reran anann EREE AREER EE E 6 33 6 1 Time Frequency 6 1 Time Frequency The graph menu contains many options that allow you to be flexible
204. t the values as needed in the right column then click OK The graph window appears with the properties you have set You can change any of these parameters from the graph window by right clicking the mouse selecting Properties and adjusting the parameters as needed You can also update the graph at any point in your program See Section 4 4 2 Connecting Probe Points for more details All input fields are C expression input fields An expression containing a symbol name can be used for all fields requiring numerical inputs such as the start address and acquisition buffer size For more information see Section 2 3 3 1 Using Symbols within Expressions The Graph Window 6 25 Eye Diagram 6 3 1 6 3 2 6 3 3 6 26 How the Eye Diagram Works There are two buffers associated with the graph window the acquisition buffer and the display buffer The acquisition buffer resides on the actual simulated target board It contains the data that you are interested in When a graph is updated the acquisition buffer is read from the actual simulated target board and updates the display buffer The display buffer resides in the host memory so it keeps a history of the data The graph is generated from the data in the display buffer When you have entered all your option choices and press OK the graph window is updated It receives the acquisition buffer of DSP data of the length in the Acquisition Buffer Size field This starts at the locatio
205. t value of 2 which in turn graphically displays every other sample in the acquisition buffer You can therefore specify multiple data sources for display by entering the corresponding offset value in this field This option provides a general specification for interleaved sources If you enable the Interleaved Data Sources option see Section 6 1 2 Display Type the Index Increment option is disabled 6 2 8 Constellation Points This is the size of the display buffer that is graphed on your screen The display buffer resides on the host so a history of your signal can be displayed even though it no longer exists on the actual simulated target board Constellation points are the maximum number of samples that the graph displays Usually the Constellation Points field is greater than or equal to the Acquisition Buffer Size field If Constellation Points is greater than the Acquisition Buffer Size the acquisition buffer data is left shifted into the display buffer You can enter any valid C expression for the Constellation Points field This expression is calculated when you click OK in the Graph Property Dialog box 6 2 9 DSP Data Type 6 22 This field allows you to select among the following data types 32 bit signed integer 32 big unsigned integer 32 bit floating point 32 bit IEEE floating point 16 bit signed integer 16 bit unsigned integer 8 bit signed integer 8 big unsigned integer COOC O C O O You can use signed i
206. tement GEL supports the standard C return statement within a function The general form is return expression A function does not need to return a value a return statement with no expression causes control but no useful value to be returned to the caller The same thing happens when the end of a function is reached without encountering a return statement The calling function can ignore a value returned by a function Unlike C GEL function definitions do not specify their return type The return type is determined during run time 12 4 2 GEL If Else Statement GEL supports the standard C if else statement The general form is if expression statement else statement2 Only one of the two statements associated with an if else statement is executed If the expression is true statement is executed if not statement2 is executed Each statement can be a single statement or several statements in braces as shown in Example 12 4 f Else Statement The General Extension Language GEL 12 7 Calling GEL Functions and Statements Example 12 4 If Else Statement if a 25 b 30 iE ol b 720 a 30 c 30 else d 20 12 4 3 GEL While Statement The GEL while statement is similar to the standard C while statement but the GEL version does not support embedded continue or break statements The general form is while expression statement In this statement the expression is evaluated If it
207. tes the following additional fields Start Address Data Source Start Address Trigger Source Index Increment Specifies the sample index increment for the data graph A specification in this field is equivalent to a sample offset for noninterleaved sources This permits you to extract signal data from multiple sources using a single graph An index increment of 2 for instance corresponds to a sample offset value of 2 which in turn graphically displays every other sample in the acquisition buffer You can therefore specify multiple data sources for display by entering the corresponding offset value in this field This option provides a general specification for interleaved sources If you select No for Trigger Source whenever the data source crosses the 0 line it triggers the signal to wrap to the beginning of the window frame This causes the eye shape in the signal representation The Graph Window 6 27 Eye Diagram 6 3 5 6 3 6 6 3 7 6 28 Data Page If your actual simulated target consists of multiple pages such as program data and I O you can specify pages using the Data Page options From the list select either Prog Data or I O This indicates whether the page of variable memory location graphically displayed is the program data or I O page Note Simulator I O Memory Page Not Supported The simulator for C54x DSPs does not support the I O memory page ESSEE ee S Acquisition Buffer Size This is
208. the Display Type field and the status of the Interleaved Data Sources field there may be either one or two starting addresses required in this field See Section 6 1 2 Display Type for more information The Graph Window 6 13 Time Frequency 6 1 6 Acquisition Buffer Size This is the size of the acquisition buffer you are using on your actual simulated target board For example if you are processing samples one ata time enter a 1 in this field Enable the Left Shifted Data Display field and connect the display to the correct location in your program See Section 4 4 2 Connecting Probe Points for more details If your program processes an entire frame at one time more than one sample and you are only interested in that frame enter the same value in the Acquisition Buffer Size and the Display Data Size fields Then turn off the Left Shifted Data Display option When a graph is updated the acquisition buffer is read from the actual simulated target board and updates the display buffer The display buffer is graphed You can enter any valid C expression for the Acquisition Buffer Size field This expression is recalculated every time samples are read from the actual simulated target Therefore if you enter a symbol in this field and the symbol later changes values you do not have to reenter this parameter 6 1 7 Display Data Size 6 14 This is the size of the display buffer that you use The contents of the display buffer
209. the program The breakpoint dialog box allows you to set more complex breakpoints such as conditional breakpoints or hardware breakpoints 1 Put the cursor in the line where you want to set the breakpoint You can set a breakpoint in either a Dis Assembly window or an Edit window containing C source code 2 Click the Toggle Breakpoint button on the Project toolbar The line is highlighted Toggle Breakpoint m To Remove a Breakpoint Using the Toolbar 1 Put the cursor in the line containing the breakpoint 2 Click the Toggle Breakpoint button on the Project toolbar To Change an Existing Breakpoint 1 Select Debug gt Breakpoints The Break Probe Profile Points dialog box appears with the Breakpoints tab selected 2 Select a breakpoint in the Breakpoint window The selected breakpoint is highlighted and the Breakpoint Type Location and Expression fields are updated to match the selected breakpoint 3 Edit the breakpoint Type Location and or Expression fields as required 4 Click Replace to change the currently selected breakpoint 5 Click OK to close the dialog box To Delete an Existing Breakpoint 1 Select Debug gt Breakpoints The Break Probe Profile Points dialog box appears with the Breakpoints tab selected 2 Select a breakpoint in the Breakpoint window 3 Click Delete to delete the breakpoint 4 Click OK to close the dialog box Breakpoints and Probe Points 4 3 Breakpoints 4 1 3 4 4 To Del
210. tion MyFunc parameterl parameter2 if parameterl parameter2 a parameterl else while c b parameter2 co The symbols a b and c are assumed to be DSP target variables GEL Function Definition 12 2 GEL Function Definition GEL functions are defined as follows where items in italics are variables funcName parameter parameter2 parameter6 statements funcName GEL function parameters Valid GEL parameters statements Valid GEL statements GEL functions are defined in text files with a gel extension A GEL file can contain many GEL function definitions GEL functions do not identify any return type or need any header information to define the types of parameters they require This information is obtained automatically from the data value As with standard C a GEL function definition cannot be embedded within another GEL function definition In Example 12 2 Square Function we are squaring the value the user passes to the function Example 12 2 Square Function square a return a a If you add a call to this function in the Watch window it looks like this square 1 2 1 44 square 5 25 Since a is a GEL parameter you do not have to define it in the DSP target You can follow each parameter with an optional string that describes the use of the parameter as shown in Example 12 3 Descriptive Parameter Strings This description is us
211. tion is made will the Expression field become active allowing you to enter the GEL file name 3 Enter your GEL file name in the Expression field This ensures that the breakpoint is only enabled if your condition is met For more information on GEL files and their implementation see Chapter 12 The General Extension Language GEL Note Target Processor Halts The target processor halts while the expression is evaluated by the host This means that the target application may not be able to meet real time constraints with conditional breakpoints set Hardware Breakpoints 4 3 Hardware Breakpoints Hardware breakpoints differ from software breakpoints in that they do not modify the target program Hardware breakpoints are useful for setting breakpoints in ROM memory or breaking on memory accesses instead of instruction acquisitions A breakpoint can be set for a particular memory read memory write or memory read or write Memory access breakpoints are not shown in the Edit or Memory windows Note Simulator Hardware Breakpoints Not Supported Hardware breakpoints cannot be implemented on a simulated DSP target eS Sf Hardware breakpoints can also have a count which determines the number of times a location is encountered before a breakpoint is generated If the count is1 a breakpoint is generated every time To Add a Hardware Breakpoint 1 Select Debug gt Breakpoints The Break Probe Profile Points dialog box app
212. u can change this so the window is updated only when the program reaches the connected Probe Point When the window is updated execution of the program is continued Along with Code Composer Studio s file I O capabilities you can use Probe Points to connect streams of data to a particular point in the DSP code When the Probe Point is reached in the algorithm data is streamed from a specific memory area to file or from the file to memory See Section 5 1 File Input Output for information Note Target Processor Halts on Probe Point The target processor is temporarily halted by the host processor when a Probe Point is encountered Therefore the target application may not be able to meet real time constraints when using Probe Points LS 4 4 1 Adding and Deleting Probe Points 4 8 To Add a Probe Point You can create Probe Points by placing the cursor on the line in a source file or Dis Assembly window and clicking the Probe Point button on the Project toolbar Probe Points must be connected to a window or file see Section 4 4 2 Connecting Probe Points Selecting Debug gt Probe Points allows you to set more complex Probe Points such as conditional or hardware Probe Points Toggle Probe Point fs 4 4 2 Probe Points To Delete an Existing Probe Point Select Debug gt Probe Points The Break Probe Profile Points dialog box appears with the Probe Points tab selected Select a Probe Point in the Probe Point window
213. ualified filename followed by the line number and the text of the line containing the match Double clicking a match in the Output window opens the specified file in an Edit window The cursor in the Edit window is located at the beginning of the line containing the match To close the Output window right click within the window to display the context menu and select Hide To display the output from the last multiple file search during your current session select View gt Output and then choose the Find in Files tab in the Output window The Integrated Editor 9 17 Setting Editor Properties 9 5 Setting Editor Properties Code Composer Studio allows you to customize editor options which you use frequently To Set Editor Properties 1 Select Option gt Editor The Editor Properties dialog box appears 2 The Editor Properties dialog offers the following options Tab Stops Type the number of tab stops you want in the Tab Stops box The default is four tabs Open files as read only Check the Open files as read only checkbox to prevent unintentional modifications to open windows Toggling this option off allows you to make modifications to any open files Save before running tools If you check the Save before running tools checkbox you are prompted to save your files with a Save Changes dialog box This occurs when a project build is invoked after any changes to any of the project files currently open Recent Files Select th
214. ull terminated GEL_TargetTextOut 0x800 GEL_TargetTextOut 0x1000 0 400 1 My Window 1 GEL_CloseWindow GEL_OpenWindow GEL_TextOut Built In GEL Functions GEL_TextOut Print Text to an Output Window Format Parameters GEL_TextOut Text windowName textColor lineNumber appendToEnd parm1 parm2 parm4 Text required formatted text including format specifiers that is to be printed The number for format specifier must match the number of additional parameters parm1 parm4 that are encountered windowName optional name of the window where you want the output to go If the window is not opened it will be created using the default parameters of the GEL_OpenWindow GEL function see GEL_OpenWindow on page 30 textColor optional printed color of the text 0 Black text 1 Blue text 2 Red text lineNumber optional if the window is a nonscrolling window this parameter specifies the line number of the window at which the printing should start appendToEnd optional flag used only if you are printing to a nonscrolling window If this flag is set to1 the text is actually appended to the existing line Otherwise the existing line is erased and the new line is placed in the output window param1 param4 optional additional parameters that are substituted in text when a format specifier is encountered These parameters allow the user to pass values from the target or values passe
215. unctions 3 6 Auto Executing GEL Functions GEL functions allow you to configure the development environment according to your needs For example you can configure a control window for a specific CPU to initialize the wait states for the memory system each time the window opens Or you can set up a number of tasks you want performed each time you open the control window Instead of loading your GEL file using the File gt Load GEL command each time and then executing the GEL function you can use the Open gt CPU command to pass a GEL file name to each control window each time you open it This informs the control window to scan in and load the specified GEL file You may execute the function as well Do this by naming one of your GEL functions in the specified file StartUp When a GEL file is loaded into Code Composer Studio the file is searched for a function defined as StartUp If the function is found it is automatically executed To Autoload and Execute a GEL File When You Open a Control Window 1 In the Parallel Debug Manager menu select Options gt Startup to open the StartUp Files dialog box This dialog box lists all the CPUs and provides a field where you can specify the GEL file for each CPU 2 In this field add the name of the GEL file that contains your GEL functions For example cpu_a myfile gel Now each time you open the control window for cpu_a the GEL file myfile gel is automatically scanned and loaded into Code
216. upport The Basics of Code Composer Studio 2 11 Loading a COFF File 2 5 Loading a COFF File To load a valid COFF file onto your actual simulated target board select File gt Load Program In the Load Program dialog box select the desired file and click Open This command loads the data as well as the symbol information from the COFF file 2 5 1 Loading Symbol Information Only To load symbol information only select File gt Load Symbol In the Load Symbol Info dialog box select the desired file and click Open This functionality is useful in a debugging environment where the debugger cannot or need not load the object code such as when the code is in ROM This command clears the existing symbol table before loading the new one but does not modify memory or set the program entry point 2 5 2 Reloading a COFF File 2 12 To reload a valid COFF file onto your actual simulated target board select File gt Reload Program Before reloading the program a check is performed to see if the file has been changed since the last load If the file has changed both the program and its symbol information are reloaded If no change is detected only the program is reloaded its associated symbol table is not reloaded This command is useful for reloading a program when target memory has been corrupted Loading a COFF File 2 5 3 Setting Program Load Options To open the Program Load Options dialog box select Options gt Progr
217. variables dependencies search path processor specific ho expanding variables Watch window expression viewing Eye diagram options Acquisition Buffer r Size Axes Display Graph Title Grid Style Index Increment 6 28 Maximum Y Value Minimum Interval Between Triggers Persistence Size Pre Trigger 6 30 Eye diagram_options continued Q Value Sampling Rate Status Bar Display Time Display Unit Trigger Level Trigger Source 6 27 F file opening 9 10 printing 19 17 saving 9 10 file extensions defined file I O controls file T options setting filing memas T cations 2 19 Find Replace Properties AE finding and replacing text finding text eae ET fonts changing p 14 format data file Frequently Asked Questions functions GEL 12 3 G GEL commands broadcasting GEL functions auto executing GEL_BreakPtAdd GEL function GEL_BreakPtDel GEL function GEL_Exit GEL function GEL_Go GEL function GEL_Halt GEL function GEL_Load GEL function GEL_MapOff GEL function GEL_MapOn GEL function GEL_MapReset GEL function GEL_MemoryFill GEL function GEL_MemoryLoad GEL function Index GEL_MemorySave GEL function GEL_OpenWindow GEL function GEL_PatchAssembly GEL function GEL_ProjectBuild GEL function GEL_ProjectLoad GEL function GEL ProjectRebuildAlll GEL unco h GEL Reset GEL function 12 32 GEL_Restart GEL funct
218. ws 2 13 Refreshing Windows All windows usually show the current status of the target board However if you connect a window to a Probe Point the window may not contain the latest information see Chapter 4 Breakpoints and Probe Points To update a window select Window gt Refresh This command updates the active window with the current target data 2 14 Viewing the Call Stack You can use the Call Stack window to examine the series of function calls that led to the current location in the program that you are debugging To display the call stack select View gt Call Stack or click the View Stack button on the Debug toolbar View Stack To display the source code for a calling function in a list double click on the desired function An Edit window containing the source code appears with the cursor set to the current line within the desired function When you select a function in the Call Stack window you can also observe local variables that are within the scope of the function The call stack only works with C programs Calling functions are determined by walking through the linked list of frame pointers on the runtime stack Your program must have a stack section and a main function otherwise the call stack displays the message C source is not available 2 14 1 Observing Local Variables You can observe local variables automatic variables of a function that is not currently running but resides in the call stack Use the
219. xecutable command line see Section 2 15 Saving and Restoring Your Workspace The same procedure applies to a multiprocessor situation see Section 3 6 Auto Executing GEL Functions Frequently Asked Questions A 11 Graph Window A 7 Graph Window 1 Can prevent graphs from updating at least when am stepping through code Yes What you have to do is connect the graph to a Probe Point If a graph is not connected to any Probe Point which is the case when you first open a graph window it is updated each time you single step or run to a breakpoint However if you connect it to a Probe Point it will only be updated when the execution of the code reaches the Probe Point would like to trace the values of a variable in the Graph window Is this feature supported in Code Composer Studio Yes The Graph window is flexible enough to allow you to trace values of a variable These are the steps you should follow a Open a Graph window with the following parameters Starting Address If your variable of interest is ErrorPower then enter amp ErrorPower for this location The most common mistake here is when the user does not enter the amp before the variable Note that any valid C expression can be entered in this field and the result should give you the address of the variable that you are interested in Buffer Size Enter 1 Display Size Enter the number of samples you want the history fo
220. y Type The Display Type option in the Graph Property Dialog box contains several options in the drop down menu in the right column Some options for this field are associated with constellation Section 6 2 Constellation Diagram eye Section 6 3 Eye Diagram or image graphs Section 6 4 Image Selecting some graph options causes additional fields to appear in the Graph Property Dialog box m Single Time Plots the data in the display buffer on a magnitude versus time graph with no preprocessing A single time trace of a signal is displayed on the graph When you enable this option the following fields appear in the Graph Property Dialog Box E Time Display Unit Specifies the unit of measure for the time axis of the graph Select among the values s Second ms millisecond us microsecond and sample displays the values on the time axis in terms of the display buffer index E Start Address Starting location on the actual simulated target board of the acquisition buffer containing the data to be graphed When the graph is updated the acquisition buffer starting at this location is fetched from the actual simulated target board The acquisition buffer then updates the display buffer which is graphed You can enter any valid C expression in the Start Address field This expression is recalculated every time samples are read from the actual simulated target This means that if you enter a symbol in this field and the symbol l
221. you can enter the time to execute one instruction This information is used to convert cycle counts to time or frequency for displaying profiler statistics Select the event to profile in the drop down list of the Count field Depending on your device driver CPU cycles may be the only list option However some device drivers make use of the on chip analysis capabilities for profiling other events These may include the number of interrupts the number of subroutine or interrupt returns the number of branches the number of subroutine calls etc For example if you select branches the CLK variable counts the number of branches taken instead of counting CPU cycles Note Simulator Profile Events The simulator only displays the CPU Cycles parameter in the Count field since it does not profile other DSP events via its interface with a simulated DSP target L E You can use the Reset Option parameter to determine how the CLK variable is accumulated If you select the Manual radio button the CLK variable accumulates instruction cycle counts without resetting the clock This is similar to TI simulator operation If you select the Auto radio button the CLK variable is automatically reset set to 0 before running or stepping the target processor Therefore the CLK variable only displays the cycles since the last run or step This is similar to TI emulator operation Profiling Code Execution 11 3 Profile Clock You can use
Download Pdf Manuals
Related Search
Related Contents
User manual-48405(0827) User`s manual Operating instructions Vacuum cleaner S 5001 SF COMPOSITES sa 539 rue Hélène Boucher Espace Commercial BlueWalker 10120174 uninterruptible power supply (UPS) RNAscope® VS Reagent Kit (BROWN) User Manual Samsung Galaxy Mega Užívateľská príručka Wayne-Dalton Z-WAVE HA14WD User's Manual REFRIGERATOR - Appliance Factory Parts Weider D137 User's Manual Copyright © All rights reserved.
Failed to retrieve file