MATLAB Link for Code Composer Studio Development Tools | ![]() ![]() |
With your processing model converted to an executable suitable for your desired target, you are ready to use the links to test and run your model on your processor. The MATLAB Link for Code Composer Studio and the links do not distinguish the source of the executable--whether you used the MATLAB Link for Code Composer Studio and Real-Time Workshop, CCS IDE, or some other development tool to program and compile your model to an executable does not affect the links. So long as your .out
file is acceptable to the target you select, the MATLAB Link for Code Composer Studio provides the links to the processor.
Before continuing with this tutorial, you must load a valid GEL file to configure the EMIF registers of your target and perform any required processor initialization steps. Default GEL files provided by Code Composer Studio are stored in ..\cc\gel
in the folder where you installed Code Composer Studio. Select File->Load_GEL in CCS IDE to load the default GEL file that matches your processor family, such as init6x0x.gel
for the C6x0x processor family, and your configuration.
Begin the process of getting your model onto the target by creating a link to CCS IDE. Start by clearing all existing handles and setting echo on so you see functions in the M-file execute as the program runs:
clear
all
has the side effect of removing debugging breakpoints and resetting persistent variables since function breakpoints and persistent variables are cleared whenever the M-file changes or is cleared. Breakpoints within your executable remain after clear
. Clearing the MATLAB workspace does not affect your executable.
boardnum
defines which board the new link accesses. In this example, boardnum
is 0. The MATLAB Link for Code Composer Studio connects the link to the first, and in this case only, processor on the board. To find the boardnum
and procnum
values for the boards and simulators on your system, use ccsboardinfo
. When you type
at the prompt, the MATLAB Link for Code Composer Studio returns a list like the following one that identifies the boards and processors in your computer.
Board |
Board |
Proc |
Processor |
Processor |
Num |
Name |
Num |
Name |
Type |
1 |
C6xxx Simulator (Texas Inst... |
0 |
CPU |
TMS320C6211 |
0 |
C6701 EVM (Texas Instruments) |
0 |
CPU_1 |
TMS320C6701 |
tgt_dir = fullfile(matlabroot,'toolbox','tiddk','tidemos','tutorial');
cd(cc,tgt_dir); % Or cc.cd(tgt_dir)
dir(cc); % Or cc.dir
open
is overloaded for the CCS IDE and RTDX links, this may seem a bit strange. In this syntax, open
loads your executable file onto the target processor identified by cc
. Later in this tutorial, you use open
with a different syntax to open channels in RTDX.
In the next section, you use the new link to open and enable communications between MATLAB and your target.
![]() | Introducing the Tutorial for Using RTDX | Configuring Communications Channels | ![]() |