MATLAB Link for Code Composer Studio Development Tools    
new

Create and open a new text file, project, or build configuration in CCS IDE

Syntax

new(cc,'objectname')

Description

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 target 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. Since 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 pathname to the file, unless your file is in a directory on your MATLAB 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 four 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 idicates 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 following file types listed in the following table.

File Types and Extensions Supported by new and CCS IDE
File Type Created
Supported Extensions
type String Used
C/C++ source files
.c, .cpp, .cc, .ccx, .sa
'text'
Assembly source files
.a*, .s* (excluding .sa, refer to C/C++ source files)
'text'
Object and Library files
.o*, .lib
'text'
Linker command file
.cmd
'text'
Project file
.pjt
'project'
Build configuration
No extension
'buildcfg'

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.

Examples

When you need a new project, create a link to CCS IDE and use the link to make a new project in CCS IDE.

New files of various types result from using new to create new active windows in CCS IDE. For instance, make a new C source file in CCS IDE with the following command:

In CCS IDE you see your new file as the active window.

See Also

activate, close, save


  msgcount open