MATLAB Link for Code Composer Studio Development Tools    
goto

Position the program counter to the specified location in the project code

Syntax

Description

goto(cc) places a breakpoint at the entry point to the main function, then restarts the target and waits for the running application to stop at the breakpoint. When successful, goto positions the target program counter (PC) to the beginning of main. With the PC positioned to main, the target can initialize the static variables.

goto(cc,'functionname') positions a breakpoint at the entry point for functionname, then runs the program on the target until it reaches the breakpoint, in the project specified by cc. Because CCS automatically adds a breakpoint at main, position the PC at main before you use this syntax. If you have other breakpoints between the start of main and the starting point for functionname, goto may return with the location of a breakpoint that is not the beginning of functionname. To avoid this, disable all breakpoints before you run goto. Specify functionname as a string. Note that goto returns when it encounters

goto(ff) postions the PC to the beginning of the function accessed by ff. Using goto in this syntax prepares the function to be executed but does not place any information in the registers associated with the function. Before you use this form of goto, you must pass the necessary values for the function input arguments into the appropriate registers. You must do this whether the function has input parameters or not.

In the following list, you see the registers and memory locations that are affected by preparing to run the function. Since you can only use up to 10 input arguments for a function, only 10 arguments appear in the list.

Argument
Register
For Long Arguments
Description
value1
A4
A5:A4
First input value to function
value2
B4
B5:B4
Second input value to function
value3
A6
A7:A6
Third input value to function
value4
B6
B7:B6
Fourth input value to function
value5
A8
A9:A8
Fifth input value to function
value6
B8
B9:B8
Sixth input value to function
value7
A10
A11:A10
Seventh input value to function
value8
B10
B11:B10
Eighth input value to function
value9
A12
A13:A12
Ninth input value to function
value10
B12
B13:B12
Tenth input value to function
Pointer to returned structure
A3
N/A
Pointer
Return Address Register
B3
N/A
Address of register
Returned Argument
A4
A5:A4
Returned argument
Data Page Pointer (DP)
B14
N/A

Frame Pointer (FP)
A15
N/A

Stack Pointer (SP)
B15
N/A

goto(ff,'input1',value1,...,'inputn',valuen) positions the PC to the beginning of the function accessed by ff, and sets the function input arguments input1 through inputn to the values value1 through valuen, as provided in the command. The order of the input names and values is not important; it does not need to match the order of the input arguments in the function prototype or declaration.

See Also

delete, execute, insert, run


  getmember halt