MATLAB Link for Code Composer Studio Development Tools    
insert

Add a debug point to a source file or address in Code Composer Studio

Description

insert(cc,addr,type) adds a debug point located at the memory address identified by addr for your target digital signal processor. The link cc identifies which target has the debug point to insert. CCS provides several types of debug points. Options for type include the following strings to define Breakpoints, Probe Points, and Profile points:

Enter addr as a hexadecimal address, not as a C function name, valid C expression, or a symbol name.

To learn more about the behavior of the various debugging points refer to your CCS documentation.

insert(cc,addr) is the same as the previous syntax except the type string defaults to 'break' for inserting a Breakpoint.

insert(cc,filename,line,'type') lets you specify the line where you are inserting the debug point. line, in decimal notation, specifies the line number in filename in CCS where you are adding the debug point. To identify the source file, filename contains the name of the file in CCS, entered as a string in single quotation marks. type accepts one of three strings -- break, probe, or profile -- as defined previously. When the line or file you specified does not exist, the MATLAB Link for Code Composer Studio returns an error explaining that it could not insert the debug point.

insert(cc,filename,line) defaults to type 'break' to insert a breakpoint.

Example

Open a project in CCS IDE, such as volume.pjt in the tutorial folder where you installed CCS IDE. Although you can do this from CCS IDE, use the MATLAB Link for Code Composer Studio functions to open the project and activate the appropriate source file where you add the breakpoint. Remember to load the program file volume.out so you can access symbols and their addresses.

Now add a breakpoint and a probe point.

Switch to CCS IDE and open volume.c. Note the blue diamond and red circle in the left margin of the volume.c listing. Red cirles indicate Breakpoints and blue diamonds indicate Probe Points.

Use symbol to return a structure listing the symbols and their addresses for the current program file. symbol returns a structure that contains all the symbols. To display all the symbols with addresses, use a loop construct like the following:

where structure s holds the symbols and addresses.

See Also

address, delete, run


  info isenabled