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.

Code Composer Studio v5 Users Guide

From Texas Instruments Wiki
Jump to: navigation, search


Return to the Sitara Linux Software Developer's Guide


Code Composer Studio v5.3 is currently provided with the Sitara Software Development Kit. It uses the Eclipse backend and includes the Remote System Explorer plug-in that provides tools to provide access to the remote target board.

Updated Toolchain

Starting with Sitara Linux SDK 6.0 the location of the toolchain has changed and for non ARM 9 devices a new Linaro based toolchain will be used. Details about the change in toolchain location can be found here. Also details about the switch to Linaro can be found here.

AM18x users are not affected by the switch to Linaro. Therefore, any references to the Linaro toolchain prefix "arm-linux-gnueabihf-" should be replaced with "arm-arago-linux-gnueabi-".

Locating the CCSv5 Installer

Using the SD Card Provided with the EVM

When the SD card provided in the box with the EVM is inserted into an SD card reader attached to a Linux system three partitions will be mounted. The third partition, labeled START_HERE, will contain the CCS installer along with the Sitara Linux SDK installer. The CCS installer is located inside of the CCS directory and there is a helper script called available to help call the installer.

Downloading from the Web

The CCS installer is available for download as a compressed tarball (tar.gz) file on the same page as the Sitara Linux SDK download. The installer can be located by browsing to and selecting the device being used. On the individual SDK download page you can find the CCS installer under the Optional Addons section. i.e.


Clicking this link will prompt you to fill out an export restriction form. After filling out the form you will be given a download button to download the file and you will receive an e-mail with the download link. Download the tarball and save it to your Linux host development system.

Starting the CCSv5 Installer

Using the Sitara Linux SDK Installer

The Sitara Linux SDK installer has the capability of launching the CCSv5 installer during the SDK installation. In order for the installer to launch the CCSv5 installer the CCS directory and script must be located in the same directory as the Sitara Linux SDK installer. When installing from the SD card found in the EVM box this directory and script are already located in the same directory as the Sitara Linux SDK installer. However, if you downloaded the CCS installer tarball from the website as mentioned above, then you will need to:

  1. Place the CCS tarball (the .tar.gz file) in the same directory as the Sitara Linux SDK installer
  2. Extract the CCS tarball using a command like:
    tar xzf CCS_<version>_Sitara_ARM.tar.gz
    Where <version> is the version string of the CCS installer

After the CCS installer files are located in the same directory as the Sitara Linux SDK installer you can execute the SDK installer to begin SDK installation. During the SDK installation you will see a scree similar to the one below. The option to Install Code Composer is enabled by default.


NOTE: If the Install Code Composer option is selected and the CCS install files are not located in the same directory as the Sitara Linux SDK installer you will be given a message that the installer could not be located and the SDK installation will continue as normal. To install CCS later you can follow the steps in the next section to bypass the Sitara Linux SDK installer.

From Linux Command Line

If you want to install CCSv5 apart from the Sitara Linux SDK installer, or if you decided not to install it as part of the SDK install and want to install it now, you can install CCS using the following commands:

  1. Open a Linux terminal and change directory to the location where the CCS files are located. This may be the START_HERE partition of the SD card, or the location where you downloaded the tarball file from the website.
  2. If the CCS files are still in a compressed tarball extract them using the command
    tar xzf CCS_<version>_Sitara_ARM.tar.gz
    Where <version> is the version string of the CCS installer
  3. Invoke the CCS installer using the script located in the START_HERE directory (copy the script to your current directory).
    ./ $PWD
    NOTE: You can also invoke the CCS installer using in the CCS directory using the commands:
    cd CCS
    ./ccs_setup*.bin --setupfile ccs_installini.xml

CCSv5 Installation Steps

NOTE: The "Limited 90-day period" language in the CCS installer license agreement applies only for the case of using high-speed JTAG emulators (does not apply to use of the XDS100v2 JTAG emulator or an on-board emulator). If a debug configuration is used that requires a high-speed JTAG emulator, you will be prompted to register your software for a fee. All use of CCSv5 (excluding use of high-speed JTAG emulators) is free and has no 90-day time limit.

When the CCSv5.3 installer runs you can greatly reduced the install time and installed disk space usage by taking the defaults as they appear in this CCS installer. The screen captures below show the default installation options and the recommended settings when installing CCSv5.

  1. The License Agreement screen will prompt you to accept the terms of the license agreement. Please read these terms and if you agree select I accept the terms of the license agreement. If not then please exit the installation.
  2. At the Choose Installation Location screen do NOT check Add TI plug-ins into an existing Eclipse install
  3. At the Processor Support screen make sure to select the AMxx Cortex-A and ARM9 processors option
  4. At the Select Components screen do NOT select TI ARM Compiler Tools. These tools are the TI compiler tools for ARM devices, whereas for Linux the Sitara Linux SDK uses the open source GCC compiler.
  5. At the Select Emulators screen make sure that JTAG Emulator Support is enabled but you do not need to select individual emulators unless you require support for that model of JTAG. To install those drivers later see the Installing Emulator Support section below.
  6. At the CCS Install Options screen verify that the options look correct and then select Next to begin installation.
  7. After the installation has completed click Finish

Installing Emulator Support

If during the CCSv5 installation, you selected to install drivers for the Blackhawk or Spectrum Digital JTAG emulators a script must be run with administrator privileges

to allow the Linux Host PC to recognize the JTAG emulator.  The script must be run as "sudo" with the following command:

sudo <CCSv5_INSTALL_PATH>/ccsv5/install_scripts/

where <CCSv5_INSTALL_PATH> is the path that was chosen when the CCSv5 installer was run.

Launching CCS

After the CCS installer has finished executing you should have an icon on your desktop call Code Composer Studio v5 like:


To launch CCS you should:

  1. Double-Click the CCS icon on the desktop. You will see the CCSv5 splash screen appear while CCS loads
  2. The next window will be the Workspace Launcher window which will ask you where you want to locate your CCSv5 workspace. You can take the default here or choose a custom directory.
  3. CCS will load the workspace and then launch to the default TI Resource Explorer screen
  4. Close the TI Resource Explorer screen. This screen is useful when making TI CCS projects which use TI tools. The Sitara Linux SDK uses open source tools with the standard Eclipse features and therefore does not use the TI Resource Explorer. You will be left in the Project Explorer default view.

Enabling CCS Capabilities

Each time CCSv5 is started using a new workspace, additional capabilities need to be enabled so that perspectives for those capabilities will be selectable in the Window -> Open Perspectives list.

After opening CCSv5 with a new workspace:

  1. Open the Window -> Preferences menu
  2. Go to the General -> Capabilities menu
  3. Select the RSE Project Capability
  4. Click Apply and then OK

This enables the perspectives in the Window -> Open Perspective -> Other menu as shown below and is needed to make the Remote System Explorer plug-ins selectable.

Note: The Qt C++ Perspective is not compatible with this version of Eclipse. Instead Qt projects are to be built using the Makefiles inside of the project as will be detailed in the later sections of this guide.



Importing Qt Projects

Since the Qt plugin does not work with the latest version of Qt the example projects have been modified to use a Makefile to handle the build step. You can use projects like the matrix-gui-browser project as a reference for how to configure a Qt project to build using a Makefile. The following steps detail the changes that should be made for an existing Qt project to use a Makefile to build.

Importing matrix browser project

  1. First import the Qt project using the File -> Import... menu
  2. Select the Qt -> Qt Project option
  3. Press the Next > button
  4. On the Import Qt Project screen click the Browse... button and locate the file within the <SDK INSTALL DIR>/example-applications/matrix-gui-browser-x.x directory
  5. Click OK
  6. You should now see the matrix_browser project listed as being selected for import into CCS
  7. Click Finish to import the matrix-gui-browser project
  8. You should now see the matrix_browser project in the Project view
  9. Now you will need to add the Qt version found in the SDK to CCS. This can be done using Window -> Preferences and selecting the Qt' menu item
  10. Select the Add... button
  11. In the Add new Qt version dialog fill in:
    Version Name: AMSDK Qt
    Bin Path: <SDK INSTALL DIR>/linux-devkit/sysroot/i686-arago-linux/usr/bin
    Include Path: <SDK INSTALL DIR>/linux-devkit/sysroot/armv<board specific value>-oe-linux-gnueabi/usr/include/qtopia
  12. Click Finish
  13. Click Apply
  14. When prompted that Qt versions have changed select Yes
  15. Click OK

Changing the Make Target

By default the debug target is compiled when you selected to rebuild the Qt projects due to the Qt version change above. You can build the release version by doing:

  1. Right Click matrix_browser project
  2. Select Make Targets -> Build...
  3. Highlight Qt Release Build and click the Build button
  4. You will find the matrix_browser executable built in the matrix_browser project.

Creating a New Make Target

You may want to create additional make targets for steps like the installation step. In this example we will make an install target that installs the release version of the matrix_browser executable.

  1. Right click matrix_browser project and select Make Targets -> Create...
  2. In the dialog box set:
    Target name: install
    Check Same as the target name for the Make Target
    un-check Use builder settings
    Change Build command: to make -f install
  3. Click OK

You can now build the install target using the steps in the Changing the Make Target section above.

Using a Makefile

In order for the above steps to work a Makefile was created in the matrix-gui-browser directory. This has some key points that are worth mentioning.

  • The Rules.make file is included from the top-level of the Sitara Linux SDK. This is to provide access to variables like DESTDIR for installing the built executable.
-include ../../Rules.make
  • There is a variable called ENV_SETUP that points to the environment-setup script in the linux-devkit directory. The qmake target, which is used by the release and debug targets will first source the environment-setup script to get access to qmake2 and configure the build to use the Qt version inside of the Sitara Linux SDK
qmake :   //qmake target depends on
     @ . ${ENV_SETUP}; \  //source the environment-setup script using a shell
     qmake2 CONFIG+=debug_and_release QMAKE_CXXFLAGS_DEBUG+=-D${PLATFORM_DEFINE} QMAKE_CXXFLAGS_RELEASE+=-D${PLATFORM_DEFINE}  //call qmake2 to make the project Makefiles

Installing to the Target File System

Depending on your file system type you can use the methods below to install the matrix_browser executable. If the file system is NFS you should have first run the SDK Setup Script

  1. Create a Make Target using the steps in the Creating a New Make Target section above
  2. Browsing to the <SDK INSTALL DIR>/example-applications/matrix-gui-browser-x.x/ directory in a terminal and typing make -f install
  3. For all file system types you can also transfer the file using the drag-and-drop method of Remote System Explorer. See the Remote System Explorer section below for more details

Importing C/C++ Projects

Importing the Projects

The following instructions will help you to import the example C/C++ application projects into CCSv5. For instructions on importing Qt application see the Importing Qt Projects section above.

  1. From the main CCSv5 window, select File -> Import... menu item to open the import dialog
  2. Select the General -> Existing Projects into Workspace option
    Import C projects-1.png
  3. Click Next
  4. On the Import Projects page click Browse
  5. In the file browser window that is opened navigate to the <SDK INSTALL DIR>/example-applications directory and click OK
  6. The Projects: list will now be populated with the projects found.


  • NOTE: The matrix_browser, qtquickplayground, refresh_screen, and thermostatdemo projects should be un-checked since they are Qt projects and should be imported using the steps in the Importing Qt Projects section above.

    Your Sitara SDK installation probably contains other Qt projects which need to be unchecked when importing C/C++ projects.  You can tell which are the Qt

    projects. Qt projects have a .PRO project file.

   Select the projects you want to import. The following screen capture shows importing all of the example projects for an ARM-Cortex device, excluding the Qt projects.


  1. Click Finish to import all of the selected projects.
  2. You can now see all of the projects listed in the Project Explorer tab.

Building C/C++ Projects

  1. Right-Click on the project in the Project Explorer
  2. Select the build configuration you want to use
    • For Release builds: Build Configurations -> Set Active -> Release
    • For Debug builds: Build Configurations -> Set Active -> Debug
  3. Select Project -> Build Project to build the highlighted project
    • NOTE: You can use Project -> Build All to build all of the projects in the Project Explorer

Installing C/C++ Projects

There are several methods for copying the executable files to the target file system:

  1. Use the top-level Makefile in the SDK install directory. See the Top-Level Makefile section for details of using the top-level Makefile to install files to a target file system.
    • NOTE: The top-level Makefile uses the install commands in the component Makefiles and can be used as a reference for how to invoke the install commands.
  2. For all file system types you can also transfer the file using the drag-and-drop method of Remote System Explorer. See the Remote System Explorer section below for more details

Creating a New Project

This section will cover how to create a new cross-compile project to build a simple Hello World application for the target.

Configuring the Project

  1. From the main CCSv5 window, select File -> New -> Project... menu item
  2. in the Select a wizard window select the C/C++ -> C Project wizard
  3. Click Next
  4. In the C Project dialog set the following values:
    Project Name: helloworld
    Project type: Cross-Compile Project
  5. Click Next
  6. In the Command dialog set the following values:
    Tool command prefix: arm-linux-gnueabihf-. Note the the prefix ends with a "-". This is the prefix of the cross-compiler tools as will be seen when setting the Tool command path
    Tool command path: <SDK INSTALL DIR>/linux-devkit/sysroot/i686-arago-linux/usr/bin. Use the Browse.. button to browse to the Sitra Linux SDK installation directory and then to the linux-devkit/bin directory. You should see a list of tools such as gcc with the prefix you entered above.
  7. Click Next
  8. In the Select Configurations dialog you can take the default Debug and Release configurations or add/remove more if you want.
  9. Click Finish

Adding Sources to the Project

  1. After completing the steps above you should now have a helloworld project in your CCS Project Explorer window, but the project has no sources.
  2. From the main CCSv5 window select File -> New -> Source File menu item
  3. In the Source File dialog set the Source file: setting to helloworld.c
  4. Click Finish

Cross-Compiling the Sources

  1. After completing the steps above you will have a template helloworld.c file. Add your code to this file like the image below:
  2. Change the build configuration to Release by selecting Project -> Build Configurations -> Set Active -> Release
  3. Compile the helloworld project by selecting Project -> Build Project
  4. The resulting executable can be found in the Release directory
  5. You can now install the executable to the target file system using Remote System Explorer, NFS, or any other method you want.

Remote System Explorer

CCSv5 as installed with this SDK includes the Remote System Explorer (RSE) plug-in.  RSE provides drag-and-drop access to the target file system as well as remote shell and remote terminal views within CCS. Refer to How to Setup and Use Remote System Explorer to establish a connection to your target EVM and start using RSE.

Using GDB Server in CCSv5 for Linux Debugging

In order to debug Linux code using Code Composer Studio v5, you first need to configure the gdbserver on both the host and target (EVM) side.

Please refer to Running GDB Server on CCSv5 for more information.

Archived versions