CCS Add Path and Build Variables

From EdWiki

Add Path and Build Variables

The Path and Build variables are used for:

  • Path variable – when you ADD (link) a file to your project, you can specify a “relative to” path. The default is PROJECT_LOC which means that your linked resource (like a .lib file) will be linked relative to your project directory.
  • Build variable – used for items such as the search path for include files associated with a library – i.e. it is used when you build your project.

Variables can either have a PROJECT scope (that they only work for this project) or a WORKSPACE scope (that they work across all projects in the workspace).

In the next step, we need to add (link) a library file and then add a search path for include files. First, we’ll add these variables MANUALLY as PROJECT variables. Later, we will show you a quick and easy way to add these variables into your WORKSPACE so that any project in your workspace can use the variables.

Adding a Path Variable

Path and Linked Resource

To add a path variable, Right-click on your project and select Properties. Expand the Resource list in the upper left-hand corner as shown and click on Linked Resources:

You will see two tabs on the right side – Path Variables and Linked Resources:

In the Path Variables tab, notice that PROJECT_LOC is listed and will display as the default path variable for linked resources in your project. We want to add a New variable to specify exactly where you installed TivaWare.

New Path Variable

► Click New
► When the New Variable dialog appears, type TIVAWARE_INSTALL for the name.
► For the Location, click the Folder… button and navigate to your TivaWare installation. Click on the folder name and then click OK.
► Click OK.

You should see your new path variable listed in the Path Variables list.

Adding a Build Variable

Build Variable

Now let’s add a build variable that we will use in the include search path for the INCLUDE files associated with the TivaWare driver libraries.

Build Variable

► Click on Build and then the Variables tab:
► Click the Add button. When the Define a New Build Variable dialog appears, insert TIVAWARE_INSTALL into the Variables name box.

► Check the “Apply to all configurations” checkbox
► Change the Type to Directory and browse to your Tivaware installation folder.
► Click OK.
► Click OK again to save and close the Build Properties window.