⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 build.m

📁 这是一个关于MATLAB的函数
💻 M
字号:
function dummy = build(cc,optime,timeout)
%BUILD Build a Code Composer Studio(tm) project
%   BUILD(CC,TIMEOUT) does an incremental build of the target code. 
%   This will recompile any source files that have been modified, but
%   if the source file has not changed (as indicated by the date), the
%   compilation step will be skipped.  Next, the object files are linked 
%   to create a program file. 
%
%   BUILD(CC,'all',TIMEOUT) does a complete rebuild of the target code. 
%   This option forces a re-compilation of all source files.  Then
%   a link is performed to create a program file. 
%
%   TIMEOUT defines an upper limit (in seconds) on the period this 
%   routine will wait for completion of the specified action.  
%   If this period is exceeded, the routine will immediately return
%   with a timeout error. In general, this method will cause the
%   processor to initiate a restart, even when a timeout is reached
%   The timeout simply indicates the confirmation was not received 
%   before the timeout period expired.
%
%   BUILD(CC,'all') and BUILD(CC) - Same as above, except the default 
%   timeout from the CC object is applied.
%
%   See also ISRUNNING, OPEN.

% Copyright 2002 The MathWorks, Inc.
% $Revision: 1.7 $ $Date: 2002/03/20 18:48:51 $

error(nargchk(1,3,nargin));
if ~ishandle(cc),
    error('First Parameter must be a CCSDSP Handle.');
end
if nargin == 1 | (nargin == 2 & isnumeric(optime)),  % Build
    action = 20;
    if nargin == 1,
        timeout = [];
    else
        timeout = optime;
    end
elseif nargin == 2 | nargin == 3,  % Build all (maybe)
    if ischar(optime) & strcmpi('all',optime)
        action = 21;
        if nargin == 2,
            timeout = [];
        end
    else
        error('The only supported build option is ''all''');
    end
end
% Parse timeout
if( nargin >= 2) & (~isempty(timeout)),
    if ~isnumeric(timeout) | length(timeout) ~= 1,
        error('TIMEOUT parameter must be a single numeric value.');
    end
    dtimeout = double(timeout);
else
    dtimeout = double(get(cc,'timeout'));
end
if( dtimeout < 0)
    error(['Negative TIMEOUT value "' num2str(dtimeout) '" not permitted.']);
end

ccsmexswitchyard([action,cc.boardnum,cc.procnum,dtimeout,cc.eventwaitms]);

% [EOF] build.m

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -