| Embedded IDE Link™ CC | ![]() |
Note new(cc,objectname,'text') produces a warning and 'text' will not be accepted in a future version. |
new(cc,'objectname','type')
new(cc,'objectname')
new(cc,'objectname','type') creates and opens an empty object of type named objectname in the active project in CCS IDE. The new object can be a text file, a project, or a build configuration. String objectname specifies the name of the new object. When you create new text files or projects, objectname can include a full path description. When you save your new project or file, CCS IDE stores the file at the processor of the full path.
If you do not provide a full path for your file, new stores the file in the CCS IDE working directory when you save it. New files open as active windows in CCS IDE; they are not placed in the active project folders based on their file extension (compare to add).
New build configurations always become part of the active project in CCS IDE. Because build configurations always become part of a project, you only need to enter a name to distinguish your new configuration from existing configurations in the project, such as Debug and Release.
To specify the text file or project to create, objectname must be the full path name to the file, unless your file is in a directory on your MATLAB software path, or the file is in your CCS working directory. Also, when you create new text files or projects, you must include the file extension in objectname.
type accepts one of the strings or entries listed in the following table.
| type String | Description |
|---|---|
'text' | Create a new text file in the active project. |
'project' | Create a new project. |
'projext' | Create a new CCS external make project. Using this option indicates that your project uses and external makefile. Refer to your CCS documentation for more information about external projects. |
'projlib' | Create a new library project with the .lib file extension. Refer to your CCS documentation for more information about library projects. |
[] | Create a new project. The [] indicate that you are creating a .pjt file. |
'buildcfg' | Create a new build configuration in the active project. |
Use new to create the file types listed in the following table.
File Types and Extensions Supported by new and CCS IDE
| File Type to Create | type String Used | Supported Extensions |
|---|---|---|
C/C++ source files | 'text' | .c, .cpp, .cc, .ccx, .sa |
Assembly source files | 'text' | .a*, .s* (excluding .sa, refer to C/C++ source files) |
Object and Library files | 'text' | .o*, .lib |
Linker command file | 'text' | .cmd |
Project file | 'project' | .pjt |
Build configuration | 'buildcfg' | No extension |
Caution After you create an object in CCS IDE, save the file in CCS IDE. new does not automatically save the file. Failing to save the file can cause you to lose your changes when you close CCS IDE. |
new(cc,'objectname') creates a project in CCS IDE, making it the active project. When you omit the type option, new assumes you are creating a new project and appends the .pjt extension to objectname to create the project objectname.pjt. The .pjt extension is the only extension new recognizes.
When you need a new project, create a link to CCS IDE and use the link to make a new project in CCS IDE.
cc=ticcs; cc.visible(1) % Make CCS IDE visible on your desktop (optional). new(cc,'my_new_project.pjt','project');
New files of various types result from using new to create new active windows in CCS IDE. For instance, make a new ANSI C source file in CCS IDE with the following command:
new(cc,'new_source.c','text');
In CCS IDE you see your new file as the active window.
![]() | msgcount | open | ![]() |
| © 1984-2009- The MathWorks, Inc. - Site Help - Patents - Trademarks - Privacy Policy - Preventing Piracy - RSS |
| © 1984-2009- The MathWorks, Inc. - Site Help - Patents - Trademarks - Privacy Policy - Preventing Piracy - RSS |