Running CCS and Matlab
Running CCS and Matlab
I’m going to explain how to program a TI DSP kit using MATLAB Simulink on this guide and I’ll
use Texas Instruments C2000 family F28335 ‘Delfino’ Experimenter Kit as referance on steps.
Although you can program your DSP using assembly language or C/C++ since it is a microcontroller,
sometimes using simulink might be a better solution for your program. In simulink you can visually
design your system and follow your system inputs and outputs, also you can real time control your
system over simulink by creating your own GUI in MATLAB.
Part 2 : Installation
Requirements:
Note: CCS v3.3 is not distributed or supplied by Texas Instruments anymore, however you can ask for
a download link from ‘[email protected]’ if you have a licensed product. If you are using a
C2000 family product, you can download 32K limited version of ccs v3.3 from http://software-
dl.ti.com/dsps/dsps_registered_sw/sdo_ccstudio/CCSv3/Free/C2000_Code_Composer_Studio_v3.3.83.19_limited.zip . You must
download correct Flash Api version for your proccessor from TI website, Flash Api for F28335 can be
downloaded from here: http://www.ti.com/tool/sprc539
Code composer studio 4x and 5x versions are avaible on TI website but unfortunately
MATLAB supports only CCS v3.3 for now. MATLAB might have support CCS v4 or v5 with 2012a or
2012b release but you need ccs v3.3 until then.
Installing Code Composer Studio v3.3
!!!WARNING!!! You’ll need administrator rights to accomplish setup
Follow installation instructions if you have a CCS v3.3 CD with your product.
If you dont have a CD and downloaded 32K limited edition then;
Unzip archived files to a folder.
Right click on Setup.exe file and choose Run As Administrator
Follow the installing steps
You can choose typical or custom installation in install options, typcial install will do it but I
suggest to choose custom and make sure everything is selected.
You may encounter with warning messages during installation, just ignore them and continue
installation. Especially if you are Windows 7 or Vista user, you’ll see an error message at the
end of installation, it’s about XDS 560 emulator drivers, since I was working with XDS100 I
just ignored them and everything went well. If you are XDS 560 user, you can ignore them
again and reinstall xds560 drivers later.
Finish the installation.
Installing Device
Plug your device to your computer
Wait for Windows to install device drivers.
You’ll see your device under device manager window as follow
To check if your software is installed correctly and hardware connected right, you can try
your DSP kit through CCS v3.3
From ‘Debug’ menu, choose ‘connect’
CCS will connect to your device and stand by if everything is correct. You’ll see a screen like
following.
You can exit from program if there is no error.
If you have any problem at this point, please check previous steps again because you can’t
configure MATLAB unless CCS can identify and connect to your device.
Configuring MATLAB
Run MATLAB 2011a (or higher) 32Bit version. (Do not run 64 bit version, goto folder where
you installed 32bit MATLAB and run matlab.exe from there, or make a shortcut to desktop
for it)
Firstly you need to check if matlab can communicate with ccs and your device, follow the
steps to do that.
Type “ccsboardinfo “ and enter on matlab command window, matlab will show a list of
proccessors and boards connected to your computer.
Type “checkEnvSetup” and enter on matlab command window. This command will check
requarements for matlab and ccs communications and inform you if any extra software is
requared or missing.
Note: Matlab will ask you for Flash Api installation folder any time you run this command,
this doesn’t mean you installed it incorrectly, you just need to show the path. Be careful while
showing the folder, it is not main install directory of Flash Api, you need to show folder that
contains your proccessor’s name in Flash Api directory.
“checkEnvSetup” command is used with at least 2 parameters, first one is ccs version (ccs for
v3.3, ccsv4 for v4x.) second one is proccessor model, just type the proccessor model as
parameter. You can see my example on following figure.
Lastly type “ticcs” on matlab command window and enter. This will give you a information
table about state of your device.
If all steps above went without error and if you were able to see windows like on examples,
this means MATLAB and CCS setup and configuration is correct and you can use simulink and
make your models for your DSP kit.
Part 4 : Preparations For Creating Simulink Model
If all above steps are completed then you are ready to create your own simulink model for TI
DSP kit.
The first thing to work with a TI DSP, you need to define your DSP kit to model file.
It will ask you for preferances of your DSP Kit, define them.
You can also change them from workspace later
You can find specific devices that your controller contain in “Embedded Coder”/
“Embedded Targets” / “Proccessors” / “Your Proccessor”
Now you can prepare your simulink model and apply on your kit.