matlab 与ccsv5连接总结 - 图文

发布时间 : 星期四 文章matlab 与ccsv5连接总结 - 图文更新完毕开始阅读

需要软件:前期是要安装VS2010或者VS2008或者VC6、CCS5.5或者CCS6、Matlab2012以上版本。并配置好Maltab的编译器路径(mex -setup)

前提假设CCS5安装路径如下:

CCS Installation: D:\\TI\\ccsv5 CCSV5安装路径

Code geeneration Tools: D:\\TI\\ccsv5\\tools\\compiler\\c2000 ,编译器的路径 如果其它路径,则需要在下边的应用中相应的路径中更改路径。

【1】 Matlab VS CCSV5

【1】 在matlab 中键入xmakefilesetup ,并设置如下图

图1 gmake设置

【2】 首先将display operational configuration only的勾选去掉,然后在configuration的

下拉中选择ticcs_c2000_ccsv5,如果没有,则点击右上角的New,然后分别在Make Utiliy、Complier、Linker、Archiver、Prebuild、Postbuild、Execute填入一下内容

Make Utiliy:

Make Utility : D:\\PROGRA~1\\MATLAB\\\\R2013a\\bin\\win32\\gmake (这个路径是Matlab的编译路径) Arguments : -f \[|||MW_XMK_ACTIVE_BUILD_ACTION_REF|||] Complier :

Complier: D:/ti/ccsv5/tools/compiler/c2000_6.2.0/bin/cl2000 Arguments :-I\-fr\Linker

Linker: D:/ti/ccsv5/tools/compiler/c2000_6.2.0/bin/cl2000

Arguments : -o [|||MW_XMK_GENERATED_TARGET_REF|||] Archiver

Archievr: D:/ti/ccsv5/tools/compiler/c2000_6.2.0/bin/ar2000 Arguments: -r [|||MW_XMK_GENERATED_TARGET_REF|||]

Prebuild :

不填,空着 Postbuild

不填,空着

Execute 执行编译

Execute Tool: D:\\ti\\ccsv5\\ccs_base\\scripting\\bin\\dss.bat

Arguments :\\ \接着点击保存即可。,这时将会在C:\\Documents and Settings\\Administrator\\我的文档\\MATLAB\\ 路径下产生这样一个文件名字 ticcs_c2000_ccsv5_clone.m

此文件的内容如下:(如果不想按上边一步一步配置xmakefiletool,可以将ticcs_c2000_ccsv5_clone.m这个文件拷贝到,(C:\\Documents and Settings\\Administrator\\我的文档\\MATLAB\\ )路径下,然后根据自己一些软件的安装位置,修改其中的路径,下面我用绿色标出有可能需要更改的地方。

% NOTE: DO NOT REMOVE THIS LINE XMAKEFILE_TOOL_CHAIN_CONFIGURATION function toolChainConfiguration = ticcs_c2000_ccsv5_clone() %TICCS_C2000_CCSV5_CLONE Defines a tool chain configuration. %

% Copyright 2015 The MathWorks, Inc. % % General

toolChainConfiguration.Configuration = 'ticcs_c2000_ccsv5_clone'; toolChainConfiguration.Version = '2.0';

toolChainConfiguration.Description = 'TI CCS v5 C2000 Tool Chain Configuration';

toolChainConfiguration.Operational = true;

toolChainConfiguration.InstallPath = 'D:\\ti\\ccsv5\\'; % ccsv5安装路径 toolChainConfiguration.CustomValidator = ''; toolChainConfiguration.Decorator =

'linkfoundation.xmakefile.decorator.c2000CCEv5Decorator'; % Make

toolChainConfiguration.MakePath =

'D:\\PROGRA~1\\MATLAB\\\\R2013a\\bin\\win32\\gmake'; %matlab 的gmake安装路径 toolChainConfiguration.MakeFlags = '-f \[|||MW_XMK_ACTIVE_BUILD_ACTION_REF|||]'; toolChainConfiguration.MakeInclude = ''; % Compiler

toolChainConfiguration.CompilerPath =

'D:/ti/ccsv5/tools/compiler/c2000_6.2.0/bin/cl2000'; ccsv5编译器安装路径

toolChainConfiguration.CompilerFlags =

'-I\-fr\;

toolChainConfiguration.SourceExtensions = '.c,.asm,.abs,.sa'; toolChainConfiguration.HeaderExtensions = '.h'; toolChainConfiguration.ObjectExtension = '.obj'; % Linker

联系合同范文客服:xxxxx#qq.com(#替换为@)