📄 new.m
字号:
function dummy = new(cc,name,type)
%NEW Create a new project, text file or build configuration.
% NEW(CC,NAME,TYPE) will produce a new project,
% text file or build configuration in Code Composer Studio(tm) IDE.
% The NAME parameter is a string that designates the new entity.
% For text and project types, the NAME parameter is a filename
% and can include a full path designation. Conversely, a build
% configuration always resides within a project and therefore
% only needs a unique name to differentiate it from other build
% configurations within the same project. If Code Composer has
% multiple active projects, the new build configuration is
% generated within the active project. The TYPE parameter
% explicitly accepts a string to define which entity to create.
%
% TYPE - Supported options:
% 'project' - Code Composer executable project
% 'projlib' - Code Composer library project
% 'projext' - Code Composer external make project
% 'text' - Empty Text file in Code Composer
% 'buildcfg' - Build configuration in the active project
%
% NEW(CC,NAME) or
% NEW(CC,NAME,[]) if the NAME option has a file extension of '.pjt',
% this command creates an executable project file.
%
% For Example
% >cc = ccsdsp;
% >cc.new('myproj.pjt','project');
%
% See also ACTIVATE, CLOSE, SAVE.
% Copyright 2001-2002 The MathWorks, Inc.
% $Revision: 1.8 $ $Date: 2002/06/12 15:30:35 $
error(nargchk(2,3,nargin));
if ~ishandle(cc),
error('First Parameter must be a CCSDSP Handle');
end
if ~ischar(name),
error('NAME parameter should be a char array');
elseif isempty(name),
error('NAME parameter is empty');
end
if nargin == 3 & ~isempty(type),
if strcmpi(type,'buildcfg')
ccsmexswitchyard([38,cc.boardnum,cc.procnum,0,0],name,type);
else
if isempty(findstr(name,':')), % Windows only, Full path given?
name = fullfile(cc.cd,name);
end
ccsmexswitchyard([38,cc.boardnum,cc.procnum,0,0],name,type);
end
else % Check extension
[fpath,fname,fext] = fileparts(name);
if ~strcmpi(fext,'.pjt'),
error('The only automatic extension is ''.pjt'', please specify the TYPE');
end
if isempty(findstr(name,':')), % Windows only, Full path given?
name = fullfile(cc.cd,name);
end
ccsmexswitchyard([38,cc.boardnum,cc.procnum,0,0],name,'project');
end
% [EOF] new.m
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -