MATLAB Link for Code Composer Studio Development Tools | ![]() ![]() |
Introducing the Tutorial for Using RTDX
Digital signal processing development efforts begin with an idea for processing data; an application area, such as audio or wireless communications or multimedia computing; and a platform or hardware to host the signal processing. Usually these processing efforts involve applying strategies like signal filtering, compression, and transformation to change data content; or isolate features in data; or transfer data from one form to another or one place to another.
In all cases, developers create algorithms that they need to accomplish the desired result. Once they have the algorithms, developers use models and DSP processor development tools to test their algorithms, to determine whether the processing achieves the goal, and whether the processing works on the proposed platform. The MATLAB Link for Code Composer Studio and the links for RTDX and CCS IDE ease the job of taking algorithms from the model realm to the real world of the target digital signal processor on which the algorithm will run.
RTDX and links for CCS IDE provide a communications pathway to manipulate data and processing programs on your target digital signal processor. RTDX offers real-time data exchange in two directions between MATLAB and your target process. Data you send to the target has little effect on the running process and plotting the data you retrieve from the target lets you see how your algorithms are performing in real time.
To introduce the techniques and tools available in the MATLAB Link for Code Composer Studio for using RTDX, the following procedures use many of the methods in the link software to configure the target processor, open and enable channels, send data to the target, and clean up after you finish your testing. Among the functions covered are:
ccsdsp
--create links to CCS IDE and RTDX.
cd
--change your CCS IDE working directory from MATLAB.
open
--load program files in CCS IDE.
run
--run processes on the target processor.
close
--close the RTDX links between MATLAB and your target.
configure
--determine how many channel buffers to use and set the size of each buffer.
disable
--disable the RTDX links before you close them.
display
and disp
--return the results of functions get
and set
. When you omit the closing semicolon (;) on a function, disp
provides the default display for the results of the operation.
enable
--enable open channels so you can use them to send and retrieve data from your target.
isenabled
--determine whether channels are enabled for RTDX communications.
isreadable
--determine whether MATLAB can read the specified memory location.
iswritable
--determine whether MATLAB can write to the target.
msgcount
--find out how many messages are waiting in a channel queue.
open
--open channels in RTDX.
readmat
--read data matrices from the target into MATLAB as an array.
readmsg
--read one or more messages from a channel.
writemsg
--write messages to the target over a channel.
This tutorial provides the following procedure to show you how to use many of the functions in the links. By doing the steps listed, you can work through many of the operations yourself. As a bonus, the tutorial follows the general task flow for developing digital signal processing programs through testing with the links for RTDX.
Four tasks comprise this tutorial:
Within this set of tasks, numbers 1, 2, and 4 are considered fundamental to all development projects. Whenever you work with MATLAB and links for RTDX, you perform the functions and tasks outlined and presented in this tutorial. Where the differences lie is in Task 3. Task 3 is the most important for using the MATLAB Link for Code Composer Studio to develop your processing system.
In this tutorial you use an executable program named tutorial_6xevm.out
as your application. When you use the RTDX and CCS IDE links to develop applications, replace tutorial_6xevm.out
in Task 3 with the filename and path to your digital signal processing application.
You can view the tutorial M-file used here by clicking rtdxtutorial
. To run this tutorial in MATLAB, click run rtdxtutorial
.
One more note about this tutorial. Throughout the code we use the dot notation (direct property referencing) to access functions and link properties. For example, we use
to open and configure ichan
for write mode. You could use an equivalent syntax instead that does not use direct property referencing.
if you created an alias rx
to the RTDX portion of cc
, as follows
![]() | Tutorial 2-2--Using Links for RTDX | Creating the Links | ![]() |