add - Add files or new typedef to active project in CCS

Syntax

add(cc,'filename')
info = add(cc.type,'typedefname','datatype')

Description

Use add when you have an existing file to add to your active project in CCS. You can have more than one CCS IDE open at the same time, such as C5000™ and C6000™ IDE instances. cc identifies which CCS IDE instance gets the file, and it identifies your board or processor. Note that cc does not identify your project in CCS — it identifies only your hardware or simulator. add puts the file specified by filename in the active project in CCS. Files you add must exist and be one of the supported file types shown in the next table.

When you add files, CCS puts the files in the appropriate folder in the project, such as putting source files with the .c extension in the Source folder and adding .lib files to the Libraries folder. You cannot change the destination folder in your CCS project. Using add is identical to selecting Project > Add Files to Project in CCS IDE.

To specify the file to add, filename must be the full path name to the file, unless your file is in your CCS working directory or in a directory on your MATLAB® environment path. Embedded IDE Link™ CC searches for files first in your CCS IDE working directory, then in directories on your MATLAB path.

You can add the following file types to a project through add.

File Types and Extensions Supported by add and CCS IDE

File TypeExtensions SupportedCCS Project Folder

C/C++ source files

.c, .cpp, .cc, .ccx, .sa

Source

Assembly source files

.a*, .s* (excluding .sa, refer to C/C++ source files)

Source

Object and library files

.o*, .lib

Libraries

Linker command file

.cmd

Project Name

DSP/BIOS file

.cdb*

DSP/BIOS Config

Visual Linker Recipe

rcp

Replaces the .cmd file, or goes under Project Name

Use activate to change your active project in CCS IDE or switch to the CCS IDE and change the active directory within CCS.

info = add(cc.type,'typedefname','datatype') adds the new type definition typedefname to the type class in cc. Return value info contains the information about your custom data type. Your new data type typedefname has type datatype. As long as the cc object exists, the information about your new typedef exists as well. Including the left side argument is an option. Omitting the left side argument does not prevent add from making additions to the type objects.

Examples

Create a new project and to it add a source file and a build configuration. To do this task from MATLAB software, use new to make your project in CCS IDE, then use add to put the required files into your new project.

cc=ticcs

TICCS Object:
  API version      : 1.2
  Processor type   : TMS320C64127
  Processor name   : CPU_1
  Running?         : No
  Board number     : 0
  Processor number : 0
  Default timeout  : 10.00 secs

  RTDX channels    : 0

cc.visible(1) % Optional. Makes CCS IDE visible on your desktop.
new(cc,'myproject','project');

% Now add a C source file

add(cc,'c6711dsk_adc.c'); % Adds the source file for the ADC block.

In CCS IDE, c6711dsk_adc.c shows up in myproject, in the Source folder. Now add a new build configuration to myproject. After you add the new configuration, you can see it on the configurations list in CCS IDE, along with the usual Debug and Release configurations:

new(cc,'Testcfg','buildcfg')

Adding a new type definition to the type object is straightforward:

cc=ticcs;
info = add(cc.type, 'mynew typedef','int32');
info = 

      type: 'int32'
      size: 1
    uclass: 'numeric'

cc.type


Defined types : Void, Float, Double, Long, Int, Short, Char, mynewtypedef

See Also

activate, cd, open, remove

  


 © 1984-2008- The MathWorks, Inc.    -   Site Help   -   Patents   -   Trademarks   -   Privacy Policy   -   Preventing Piracy   -   RSS
 © 1984-2008- The MathWorks, Inc.    -   Site Help   -   Patents   -   Trademarks   -   Privacy Policy   -   Preventing Piracy   -   RSS