MATLAB Link for Code Composer Studio Development Tools | ![]() ![]() |
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:
break
' -- add a Breakpoint. It defines a point at which program execution stops.
break
'.
probe
' -- add a Probe Point that updates a CCS window during program execution. When CCS connects your probe point to a window, the window gets updated only when the executing program reaches the Probe Point.
profile
' -- add a point in an executing program at which CCS gathers statistics about events that occurred since encountering the previous profile point, or from the start of your program.
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.
cd (cc,'c:\ti\tutorial\sim62xx\volume1') % Default install; wd=cd(cc); wd = c:\ti\tutorial\sim62xx\volume1 open(cc,'volume.pjt'); build(cc, 30);
Now add a breakpoint and a probe point.
insert(cc,15424,'break') % Adds a breakpoint at symbol "main" insert(cc,'volume.c',47,'probe') % Adds a probe point on line 47
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
![]() | info | isenabled | ![]() |