Please note as of Wednesday, August 15th, 2018 this wiki has been set to read only. If you are a TI Employee and require Edit ability please contact x0211426 from the company directory.

Include paths and options

From Texas Instruments Wiki
Jump to: navigation, search


Overview

Code Composer Studio v5 allows you to both link and directly incorporate files into your project. As Code Composer Studio must be able to find the files in order for a successful build, this topic goes through how to include what and where in the Code Composer Studio settings.

A continuation and more advanced discussion on this topic can also be found at this wiki site.

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

Linked Resources - Proper Include

If you wish to add a linked resource to your project these are the steps.  All paths (relative or absolute) to linked resources must be added as below.

Absolute Path

The first step is to right click on the Project and select "Add Files". 

You will then get a dialogue box where you should select "Link to files" and leave the tick box for a relative link unchecked as shown in the image below.


Linkabs.jpg


In this case you can also verify/fix or convert a relative linked resource to an absolute linked resource by going to Project->Properties->Resources->Linked Resources and using the Linked Resources Tab.   This is shown below.


Linkedresources.jpg



Relative Path

The first step is to right click on the Project and select "Add Files".

You will then get a dialogue box where you should select "Link to files" and also select the tick box for "create link locations relative to" and select the appropriate variable from the drop down menu.   This is show below.


Linked rel.jpg


Where do I find these variables to create a relative path?   These variables are called path variables.  You can create/manage and edit these by going to Project->Properties->Resources->Linked Resources and using the Path Variables Tab. This is shown below.


Pathvariables.jpg


Once again, these will then show up under the Linked Resources Tab as shown below.


Linkedresources.jpg




Build Variables - Proper Include

Build variables are variables that are used at build time and can include both variables containing a value as well as a path to an included (NOT linked) header file or code directory.

Build variables are properly added/managed/removed in a CCSv5 project under Project->Properties->CCS Build and then by selecting the Build Variables tab. This is shown below.


Buildvariables.jpg


Adding Resources (non-linked) - Proper Include

As well as linking to a resource in CCS, you are also able to add a resource directly into a project.

The first step to do this is to right click on the Project and select "Add Files".

You will then get a dialogue box where you should select "Copy files"   This is show below.


Addtoproj.jpg


Any resource outside of the project directory must be in an include path in CCS.   Include paths for such resources can be managed/added/removed by going to Project->Properties->CCS Build->XXX  Compiler->Include Options.   Here, as shown in an example below, paths to all included header files, source files must be included.  The inlculde path may contain, if any variables, build variables only.


Compilerinclude.jpg


Adding Libraries - Proper Include

There are times when a library (one example a .lib file) need to be included into your build/project.  

These libraries and the paths to these libraries are properly added in the following location under Project->Properties->CCS Build->XXX Linker->File Search Path as shown below


Linkerfilesearch.jpg


Referencing/Dependencies on other Projects

In some cases, it may be necessary or desirable to add a dependency to another project.   For example, many ControlSuite and StellarisWare examples will have a dependency on a type of library project for graphics or drivers etc.

Due to a current known issue, these dependencies must be added in two places.

One is under Project->Properties->CCS Build in the Dependencies tab as shown below


Dependencies.jpg


The second place these dependencies should be shown as follows.  Under Project->Properties on the bottom left select "Show advanced settings".   Then go to Project->Properties->Project References as shown below


Generalprojref.jpg



Companion Video

CCS Include Paths and Variables
video platform video management video solutions video player
This video shows and introduces how to properly setup, configure and use include paths and variables in CCSv5.