NOTICE: The Processors Wiki will End-of-Life on January 15, 2021. It is recommended to download any files or other content you may need that are hosted on processors.wiki.ti.com. The site is now set to read only.

GSG:Creating projects v5

From Texas Instruments Wiki
Jump to: navigation, search

Creating Projects


Introduction[edit]

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

The TI Resource Explorer[edit]

The TI Resource Explorer is a new feature of CCSv5 that contains several links and resources to ease the project development.
The welcome package shows several links and a short Getting Started clip. Each link has a small help that is activated when the mouse pointer is placed over the link.
Note: if controlSUITE, MSP430Ware, etc. is previously installed in your system, their examples will be shown at the link Examples.

Creating a project[edit]

1. At the welcome screen, simply click on the link New Project and the wizard will appear:

Note: In the future, the same wizard can be accessed at the menu File --> New --> CCS Project
Fig. 1: Project wizard


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).
Tutorial: name the project Sinewave.

3. Output type: the setting Executable builds a complete executable program. The other option is Static Library, which is a collection of functions to be used by other projects.
Tutorial: leave the setting Executable.

4. In the Device Section:

a) Select the architecture to be used in Family: drop-down menu.
Note: if the project is for Cortex devices (Stellaris, Hercules, Concerto), select ARM.
Note: if the project is for SoC devices (DaVinci, OMAP), select either ARM or C6000 depending on the core used.
b)Variant: Choose the device to be used, based on the device family. Some families like C6000 have generic devices, while others like MSP430 are very specific. The first drop-down box is a general filter, while the second drop-down box is the device selector itself.
Note: for CCSv5.2, all the devices have specific configurations.
Note: if the device variant chosen is specific, the project wizard will enable the option Connection. This allows selecting which emulator, board or simulator will be used to debug the project.

Tutorial: set Family: to C6000 and Variant to Generic C674x Device. If using CCSv5.2, select Variant to TMS320C6748 [TMS320C67XX]

5. The Project Templates and examples section contains the standard C and assembly projects, as well as several templates to create projects that use DSP/BIOS, SYSBIOS, IPC, etc. or some pre-configured basic examples.
Note: additional reading about project templates can be found at:

http://processors.wiki.ti.com/index.php/Project_Templates_in_CCS

Tutorial: select Empty Project and click Finish to complete the wizard.

6. The project created will be displayed in the Project Explorer view and a file <main.c> will be displayed in the main view. Note: To create additional source/header files for your project, right-click on the project name in the Project Explorer view and select New. Several options will appear. 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). The Template window allows you to select a pre-defined content. Click Finish.

Fig. 2: New source file


7. To add existing source files to the project, go to Project --> Add Files.... A Browser pane will open to allow selecting the source files.

Once the file is selected, the box below will be shown, allowing you to either Add (copy) or Link (create a shortcut) to the file.
Fig. 3: Add or Link existing source files


Tip: The option Create link locations relative to: is used to create portable projects. Always plan to use it when linking files to the project. Further details can be found at:

http://processors.wiki.ti.com/index.php/Portable_Projects

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

http://processors.wiki.ti.com/index.php/File:Example_code.zip


Note: CCS ships with several linker command files (the <c6748.cmd> file above) that are required to properly build the project. All versions of CCSv5 install them for the MSP430, Stellaris and F28x. CCSv5.2 and newer install them for all C5000, C6000, DaVinci, Sitara and OMAP devices (thus not requiring to include the <c6748.cmd> file above). If for some reason your device does not show in the project wizard, check the page below:

http://processors.wiki.ti.com/index.php/Linker_CMD_Files_for_CCS


8. Because the file <sinewave_int.c> already contains a main() function, remove the existing <main.c> file created with the project. In the Project Explorer view, right-click on the file and select Delete.

Fig. 4: Final project structure


Building the project[edit]

Once the project is created and all the files are included or created, it is necessary to build it.
1. Highlight the project Sinewave in the Project Explorer view, so it becomes active. Then go to menu Project --> Build Project.

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 (optional)[edit]

To configure the build settings, right-click on the project in the Project Explorer view and select Build Options.... 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 the same option.


What's next?[edit]

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



E2e.jpg {{
  1. switchcategory:MultiCore=
  • For technical support on MultiCore devices, please post your questions in the C6000 MultiCore Forum
  • For questions related to the BIOS MultiCore SDK (MCSDK), please use the BIOS Forum

Please post only comments related to the article GSG:Creating projects v5 here.

Keystone=
  • For technical support on MultiCore devices, please post your questions in the C6000 MultiCore Forum
  • For questions related to the BIOS MultiCore SDK (MCSDK), please use the BIOS Forum

Please post only comments related to the article GSG:Creating projects v5 here.

C2000=For technical support on the C2000 please post your questions on The C2000 Forum. Please post only comments about the article GSG:Creating projects v5 here. DaVinci=For technical support on DaVincoplease post your questions on The DaVinci Forum. Please post only comments about the article GSG:Creating projects v5 here. MSP430=For technical support on MSP430 please post your questions on The MSP430 Forum. Please post only comments about the article GSG:Creating projects v5 here. OMAP35x=For technical support on OMAP please post your questions on The OMAP Forum. Please post only comments about the article GSG:Creating projects v5 here. OMAPL1=For technical support on OMAP please post your questions on The OMAP Forum. Please post only comments about the article GSG:Creating projects v5 here. MAVRK=For technical support on MAVRK please post your questions on The MAVRK Toolbox Forum. Please post only comments about the article GSG:Creating projects v5 here. For technical support please post your questions at http://e2e.ti.com. Please post only comments about the article GSG:Creating projects v5 here.

}}

Hyperlink blue.png Links

Amplifiers & Linear
Audio
Broadband RF/IF & Digital Radio
Clocks & Timers
Data Converters

DLP & MEMS
High-Reliability
Interface
Logic
Power Management

Processors

Switches & Multiplexers
Temperature Sensors & Control ICs
Wireless Connectivity