MATLAB Link for Code Composer Studio Development Tools    

Creating the Links

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:

  1. clear all; echo on;
  1. 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.

  1. Now construct the link to your target board and processor by typing
  1. 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

  1. To open and load the target file, change the path for MATLAB to be able to find the file.
  2. You have reset the directory path to find the tutorial file. Now open the file.
  1. Because 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