GSG:Creating projects

From Texas Instruments Wiki
Jump to: navigation, search

Creating Projects


This section describes the general steps required to create a project in CCSv4. The sentences marked as Tutorial: help create an example program that explores the features of CCSv4.

Creating a project

Once the welcome screen is closed, then the workspace below is shown and a new project can be created.

1. Go to menu File --> New --> CCS Project

Fig. 1: Creating a new project

2. In the Project Name field, type the new project name. The Use default location option, enabled by default, will create the project in your workspace folder. Uncheck the option to select a new location (by using the Browse… button). Click Next.

Fig. 2: Give a name to the new project

Tutorial: name the project Sinewave and click Next.

3. Select the architecture to be used in the Project Type: drop-down menu. Click Next

Note: the exact device will be selected in step 5.
  • If the project is for Cortex devices (Stellaris or Hercules), select ARM
  • If the project is for SoC devices (DaVinci, OMAP), select either ARM or C6000 depending on the core used.
Optional. This screen also allows selecting or adding build configurations for the project. Debug and Release are enabled by default.
Fig. 3: Architecture selection

Tutorial: select C6000 and click Next.

4. Usually can be left blank, but if the project depends on other projects to be built first (like static library projects) select them here. Click Next.

Fig. 4: Defining project dependencies
Optional. The C/C++ Indexer tab configures the level of the indexer, a CCSv4 feature that creates a list of source-code information that enables auto-complete and go to definition features in the editor. The default option is Full C/C++ Indexer, which provides the most functionality.

Tutorial: simply click Next.

5. Most of the options in this next screen can be left as default. Depending on the version of your CCS, the screens and options may be different. They will be marked with 4.1.2 only if they refer to version 4.1.2 and older.

Depending on the selections, additional screens will be shown.

  • Device Variant: choose the device to be used, based on the device family specified in step 3. The device families C5000, C6000 and ARM (non-Stellaris) have generic devices, while MSP430, C2000 and Stellaris are very specific. The first drop-down box is a general filter, while the second drop-down box is the device selector itself.
  • Target content: enables support for BIOS real-time operating system. It will not be used in this part of the GSG, but skip to the GSG:Using_BIOS section to learn more about this option. 4.1.2 only
Fig. 5: Project options
Fig. 6: Project options in CCSv4.1.3 and newer

Tutorial: select Generic C674x Device and click Finish. 4.1.2 only

Tutorial: select Generic C674x Device and click Next.

Optional. The other options can be left with the default values.
  • Output type: leave the setting as Executable to build a complete program. The other option is Static Library, which is a collection of functions to be used by other projects.
  • Code Generation tools: leave the default setting, unless additional versions of the code generation tools are installed and a specific one should be used.
  • Output Format: typically this option is greyed out to legacy COFF. Currently only ARM family allows selecting also eabi (ELF).
  • Linker Command File: can be left blank - a linker command file can be added later. If a valid file is available this field is pre-populated. If the project uses BIOS, a linker command file will be added automatically.
  • Runtime Support Library: usually leave it in <automatic>, since the Code Generation Tools automatically selects the correct runtime library. If needed, a different runtime support library can be selected here.
  • Treat as an Assembly-only project: usually leave it unchecked. As the name says, check this box if there are no C-source code files in the project. This will also remove the runtime support library from the project. 4.1.2 only


6.1 In CCSv4.1.2 and older click on Finish to create the project. It will be displayed in the C/C++ Projects tab and ready to create or add source files.
6.2 In CCSv4.1.3 and newer click Next and the template screen below appears. After selecting an empty or pre-populated template, click Finish to create the project. It will be displayed in the C/C++ Projects tab and ready to create or add source files.
Fig. 7: Project template options in CCSv4.1.3 and newer
Note: additional reading about project templates can be found at:

Tutorial: Select Empty project and click Finish.

7. To create files for your project, right-click on the project name in the C/C++ Projects view and select New --> Source File. In the opened box type the name of the file with a valid extension for the type of the source code (.c, .C, .cpp, .c++, .asm, .s64, .s55, etc). Click Finish.

Optional: CCSv4 comes with a handy code template that can be used from the editor:
  • If using MSP430, type the letter "b" in the blank source file just created. Then simultaneously press <Ctrl>-<Spacebar> keys to add the Blink LED example code.
  • If using the other device families, type the letter "h" in the blank source file just created. Then simultaneously press <Ctrl>-<Spacebar> keys to add the Hello world! example code.
Code templates are templates of code that can be referenced using the “Content Assist” feature of the editor. Custom code templates can also be created. It is a quick way to get started with Code Composer Studio IDE.

8. To add existing source files to the project, right-click on the project name in the C/C++ Projects tab and select Add Files to Project to copy the source files to the project directory.

Another option is to select Link Files to Project to create a reference to the file, but leaving it in its original directory. This is necessary if the source code includes files in a very specific directory structure.

Tutorial: add the source code <sinewave_int.c> and the linker command file <C6748.cmd> located in the link below:

Building the project

Once the project is created and all the files are included or created, it is necessary to build it.

1. Simply go to menu Project --> Build Active Project.

The option Rebuild Active Project rebuilds all the source files and referenced projects. Can be a long process if it is a large project, though.
Note: if any build errors are encountered and no executable file is created, a error or warning message will appear in the console window at the bottom of the screen and a debug session will not be started.

Configuring Build Settings

To configure the build settings, right-click on the project in the C/C++ Projects view and select Build Properties…. There are several options for the compiler, assembler and linker.

Note: If you want to set the properties for a single source file in the project, simply right-click on it and select Properties.

What's next?

Now that you have finished creating your new project in Code Composer Studio v4, please continue on to the Project Debugging section of the CCSv4 Getting Started Guide.

CN GSG:Creating projects