MATLAB Link for Code Composer Studio Development Tools | ![]() ![]() |
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.
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
![]() | getmember | halt | ![]() |