insert - Add debug point to source file or address in CCS

Syntax

insert(cc,addr,'type')
insert(cc,addr,'type',timeout)
insert(cc,addr)
insert(cc,filename,line,'type')
insert(cc,filename,line,'type',timeout)
insert(cc,filename,line)

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 specified by type. Options for type include the following strings to define Breakpoints, Probe Points, and Profile points:

When you use it, insert operates in blocking mode, meaning that after you issue the insert command, you do not regain control in the MATLAB® environment until the insert breakpoint operation is completed successfully — you are blocked from further processing. insert waits for the period defined by either timeout or cc.timeout. If the insert operation does not get completed within the specified time period, insert returns an error and control.

When you use the line input argument to insert a breakpoint on a specified line, line must represent a valid line. If line does not specify a valid line, insert returns an error and does not insert the breakpoint.

Enter addr as a hexadecimal address, not as a ANSI® C function name, valid ANSI 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,'type',timeout)adds the optional input parameter timeout that determines how long Embedded IDE Link™ CC waits for a response to a request to insert a breakpoint. If the response is not received before the time-out period expires, the insertion process fails with a time-out error. Adding the timeout input argument is valid only when you are inserting a breakpoint. When you omit the timeout argument, insert uses the default value defined by cc.timeout

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. Do not include the path to the file. insert ignores the file path information if you add it to filename.type accepts one of three strings — break, probe, or profile — as defined previously. When the line or file you specified does not exist, Embedded IDE Link CC returns an error explaining that it could not insert the debug point.

insert(cc,filename,line,'type',timeout)adds the optional input parameter timeout that determines how long Embedded IDE Link CC waits for a response to a request to insert a breakpoint. If the response is not received before the time-out period expires, the insertion process fails with a time-out error. Adding the timeout input argument is valid only when you are inserting a breakpoint. When you omit the timeout

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 Embedded IDE Link CC 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 circles 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:

for k=1:length(s),disp(k),disp(s(k)),end

where structure s holds the symbols and addresses.

See Also

address, remove, run

  


 © 1984-2008- The MathWorks, Inc.    -   Site Help   -   Patents   -   Trademarks   -   Privacy Policy   -   Preventing Piracy   -   RSS
 © 1984-2008- The MathWorks, Inc.    -   Site Help   -   Patents   -   Trademarks   -   Privacy Policy   -   Preventing Piracy   -   RSS