DSPRelated.com
Forums

Error...Help!

Started by oghab21 April 20, 2006
Hi, I have a project built in CCS which involves MATLAB-DSK
interface. I have built the project successfully in CCS but when I
try to open and run the project in MATLAB (I have the .m file), it
gives me the following error:

Board Board Proc
Processor Processor
Num Name Num
Name Type
--- ---------------------------------- --- ----------------------
------------ --------------
0 C6713 DSK 0
CPU_1 TMS320C6x1x
??? Error using ==> ccs.ccsdsp.fileparamparser
Specified file does not exist on CCS or MATLAB path

Error in ==> rtdx_matlabFFT at 13
open(cc,'rtdx_matlabFFT.pjt'); %open project

Can anyone please help me to correct this error? I changed the
project's path and put it in work folder but it didn't help.
Thank you
++++++++++++++++++++++++++++++++++++
MATLAB Link for Code Composer Studio
++++++++++++++++++++++++++++++++++++
help ccsdsp % see list of commands with Matlab - CCS link

help ccshelp\write % find out more about individual command

To use ccs link, do these in matlab:

i) check your board configuration

>> [boardNum,procNum] = boardprocsel

ii) establish link to CCS

>> cc = ccsdsp('boardnum',boardNum,'procnum',procNum) % create link to DSP board
^^^^^^^^
property of matlab object 'cc' (like field in struct)

so, you set cc.boardnum = boardNum, ...

ccsdsp return an object (named 'cc' in this example), and you would need it
for subsequent operation.

>> visible(cc, 1) % show CCS

iii) open ccs project, download program

>> cd(cc, 'C:\MATLAB6p5\toolbox\ccslink\ccsdemos\ccstutorial')
% change ccs working directory
>> open(cc, 'C:\MATLAB6p5\toolbox\ccslink\ccsdemos\ccstutorial\ccstut_6x11.pjt')
% open ccs project
>> load(cc, 'ccstut_6x11.out', 30) % download program to DSP

(note that alternatively you can do these in CCS. But if matlab can do these, you can
automate the task with script)

iv) execute the code

>> insert(cc,'ccstut.c',64) % insert break point at file 'ccstut.c' line 64
>> delete(cc,'ccstut.c',64) % delete break point
>> run(cc,'run',30) % run your code
>> reload(cc) % reload program

v) read/write data between matlab and ccs

>> address(cc,'idat') % address of vaiable 'idat' in your DSP program.
% idat has to be global

>> t=read(cc, address(cc, 'idat'), 'int16', 4)
% read DSP program variable 'idat' into matlab
% type : int16 i.e. short
% count = 4
% place that in matlab variable 't'

then you can do anything you want in matlab to analyse 't' (i.e. 'h')

>> write(cc, address(cc, 'idat'), int16(t))
% you know what it is :-)

vi) to disconnect

>> clear cc