MATLAB Link for Code Composer Studio Development Tools | ![]() ![]() |
Details About the Link Properties
To use the links for CCS IDE and RTDX Interface you set values for:
boardnum
--The board with which the link communicates
procnum
--The processor on the board, if the board has multiple processors
timeout
--Global timeout value. (Optional. Default is 10 s.)
Details of the properties associated with links to CCS IDE and RTDX Interface appear in the following sections, listed in alphabetical order by property name.
Many of these properties are object linking and embedding (OLE) handles. The MATLAB COM server creates the handles when you create links for CCS IDE and RTDX. You can manipulate the OLE handles using get
, set
, and invoke
to work directly with the COM interface with which the handles interact.
Property appversion
contains a string that reports the version of the application program interface (API) for CCS IDE that you are using when you create a link. You cannot change this string. When you upgrade the API, or CCS IDE, the string changes to match. Use display
to see the apiversion
property value for a link. This example shows the appversion
value for link cc
.
display(cc) CCSDSP Object: API version : 1.0 Processor type : C67 Processor name : CPU Running? : No Board number : 0 Processor number : 0 Default timeout : 10.00 secs RTDX channels : 0
Note that the API version is not the same as the CCS IDE version.
Property boardnum
identifies the target board referenced by a link for CCS IDE. When you create a link, you use boardnum
to specify the board you are targeting. To get the value for boardnum
, use ccsboardinfo
or the CCS Setup utility from Texas Instruments. The CCS Setup utility assigns the number for each board installed on your system.
Property ccsappexe
contains the path to the CCS IDE executable file cc_app.exe
. When you use ccsdsp to create a link, MATLAB determines the path to the CCS IDE executable and stores the path in this property. This is a read-only property. You cannot set it.
Property numchannels
reports the number of open RTDX communications channels for an RTDX link. Each time you open a channel for a link, numchannels
increments by one. For new links numchannels
is zero until you open a channel for the link.
To see the value for numchannels create a link to CCS IDE. Then open a channel to RTDX. Use get
or display
to see the RTDX link properties.
cc=ccsdsp CCSDSP Object: API version : 1.0 Processor type : C67 Processor name : CPU Running? : No Board number : 0 Processor number : 0 Default timeout : 10.00 secs RTDX channels : 0 rx=cc.rtdx RTDX channels : 0 open(rx,'ichan','r','ochan','w'); get(cc.rtdx) ans = numChannels: 2 Rtdx: [1x1 COM ] RtdxChannel: {'' '' ''} procType: 103 timeout: 10
Property page
contains the default value CCS IDE uses when the user does not specify the page input argument in the syntax for a function that access memory.
Property procnum
identifies the processor referenced by a link for CCS IDE. When you create a link, you use procnum
to specify the processor you are targeting. The CCS Setup Utility assigns a number to each processor installed on each board. To determine the value of procnum
for a processor, use ccsboardinfo
or the CCS Setup utility from Texas Instruments.
To identify a processor, you need both the boardnum
and procnum
values. For boards with one processor, procnum
equals zero. CCS IDE numbers the processors on multiprocessor boards sequentially from 0 to the number of processors. For example, on a board with four processors, the processors are numbered 0, 1, 2, and 3.
Property rtdx
is a subclass of the ccsdsp
link and represents the RTDX portion of a link for CCS IDE. As shown in the example, rtdx
has properties of its own that you can set, such as timeout
, and that report various states of the link.
get(cc.rtdx) ans = version: 1 numChannels: 0 Rtdx: [1x1 COM ] RtdxChannel: {'' [] ''} procType: 103 timeout: 10
In addition, you can create an alias to the rtdx
portion of a link, as shown in this code example.
Now you can use rx
with the functions in the MATLAB Link for Code Composer Studio, such as get
or set
. If you have two open channels, the display looks like the following
when the processor is from the C62 family.
Property rtdxchannel
, along with numchannels
and proctype
, is a read-only property for the RTDX portion of a link for CCS IDE. To see the value of this property, use get
with the link. Neither set
nor invoke
work with rtdxchannel
.
rtdxchannel
is a cell array that contains the channel name, handle, and mode for each open channel for the link. For each open channel, rtdxchannel
contains three fields, as follows:
With four open channels, rtdxchannel
contains four channel elements and three fields for each channel element.
Property timeout
specifies how long CCS IDE waits for any process to finish. Two timeout
periods can exist--one global, one local. You set the global timeout
when you create a link for CCS IDE. The default global timeout
value 10 s. However, when you use functions to read or write data to CCS IDE or your target, you can set a local timeout
that overrides the global value. If you do not set a specific timeout
value in a read or write process syntax, the global timeout value applies to the operation. Refer to the help for the read and write functions for the syntax to set the local timeout
value for an operation.
Property version
reports the version number of your RTDX software. When you create a link, version
contains a string that reports the version of the RTDX application that you are using. You cannot change this string. When you upgrade the API, or CCS IDE, the string changes to match. Use display
to see the version
property value for a link. This example shows the appversion value for link rx
.
get(rx) % rx is an alias for cc.rtdx. ans = version: 1 numChannels: 0 Rtdx: [1x1 COM ] RtdxChannel: {'' [] ''} procType: 103 timeout: 10
![]() | Link Properties | Tutorial 2-1--Using Links and Embedded Objects | ![]() |