0% found this document useful (0 votes)
98 views

CCSv5 TipsAndTricks

This document provides tips and tricks for using Code Composer Studio (CCS). It discusses general CCS concepts like workspaces and views. It also covers projects, debugging, and embedded development tools. Tips include using multiple workspaces for different users or projects, periodically cleaning workspaces, and taking advantage of parallel builds for faster project compilation. The document also summarizes CCS editor features and how to configure the C/C++ indexer.

Uploaded by

David Barrera
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
98 views

CCSv5 TipsAndTricks

This document provides tips and tricks for using Code Composer Studio (CCS). It discusses general CCS concepts like workspaces and views. It also covers projects, debugging, and embedded development tools. Tips include using multiple workspaces for different users or projects, periodically cleaning workspaces, and taking advantage of parallel builds for faster project compilation. The document also summarizes CCS editor features and how to configure the C/C++ indexer.

Uploaded by

David Barrera
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 56

CCSv5 Tips & Tricks

Embedded Development Tools

Tips and Tricks


General

Workspaces
Resource Explorer
Windows and Views (basics)
Installing Eclipse Plug-ins

Projects

Working Sets
Project Builds
Editor Tips
Local History

Debugging

CCS APPS

Debug Configurations
Debugging Without a Project
Useful Debug Views

GENERAL

CCS APPS

Eclipse Concept: Workspaces


Main working folder for CCS
Contains information to manage all the projects defined to it
The default location of any new projects created

User preferences, custom perspectives, cached data for plug-ins, etc


are all stored in the workspace
Multiple workspaces can be maintained
Only one can be active within each CCS instance
The same workspace cannot be shared by multiple running instances of
CCS
It is not recommended to share workspaces amongst users

CCS APPS

Use Multiple Workspaces


Multiple Users: Keep separate workspaces for each user on a
shared machine
Custom preferences, layouts, etc will be maintained on a per user basis
Each user can be working on specific project(s) that would only be
applicable to a their workspace

Project Organization: Break up all your CCS projects into separate


workspaces for better maintenance
A workspace for each software release
A workspace for each module/feature of a release

Performance: The larger the contents of the workspace (number of


open projects), the greater the impact on performance of CCS

CCS APPS

(Occasionally) Clean Your Workspace


The workspace folder can get corrupted over time
Good idea to periodically clean your workspace for best CCS
(Eclipse) performance and stability
To clean workspace, either:
Delete the .metadata folder in workspace folder
Use a new workspace folder

Before cleaning, save current workspace settings so they can be


imported into the new workspace
Save settings: File->Export...->General->Preferences->To preference file
Import Settings: File->Import...->General->Preferences->From preference
file

Any projects will have to be re-imported after cleaning the workspace


CCS APPS

View: Resource Explorer


Easily access a broad
selection of software
packages including:

controlSUITE
MSP430ware
TivaWare
TI-RTOS

Guides you step by step


through using examples
Browse resources:
Documentation
Videos
CCS APPS

CCS Videos
CCS video portal allows for viewing videos which cover
Product demonstration
Product updates
Tutorials
Training
Available from the CCS menu
Help -> CCS Videos and
Tutorials

CCS APPS

Video content is streamed


from TI servers
Access latest video content
without having to update your
CCS install

Window Types
Editor:
Only editor windows
are part of this group

Tab Group:
Several windows
grouped together

Detached:
Floating window not tied
to Workbench

CCS APPS

Fast view: Hidden


until you click on the
button to restore
them. Click on
another window to
hide.

Windowing Tips
Double-clicking on the title bar of a window will maximize the window
Double-clicking again will restore it to its previous size

Fast-view windows are great for windows you use infrequently but need
a lot of space when you do use them
The window that has focus is indicated by a blue border and heading

Current window
CCS APPS

Customizing Perspectives
You can customize the menu items and toolbars in your perspective
Right click on the toolbar and select Customize Perspective

CCS APPS

Using the Keyboard


All key bindings can be viewed and modified: Window -> Preferences
-> General -> Keys
Key bindings are part of the general preferences that can be exported
to a preferences file and
imported

CCS APPS

Accessing Views
To open a new view go to the View menu
List the most commonly used views with CCS

To access views that are


not listed select Other
Many useful hidden views

CCS APPS

Filter Field
Use it to find options/properties faster
Narrows list of options down depending on characters entered in the field

Available in many dialogs

Project Properties
Window Properties
Workspace Properties..
Target Configuration view

CCS APPS

Eclipse Plug-ins - Basics


CCSv5 is based on Eclipse and is able to leverage many Eclipse of the
huge selection of 3rd party plug-ins available
http://marketplace.eclipse.org/

CCSv5.0 5.2 is based off Eclipse 3.7 and CCSv5.3+ is based off
Eclipse 3.8
Look for plug-ins that support this version for best compatibility

CCS APPS

Eclipse Plug-ins - Marketplace


Find plug-ins from within CCS with in the Eclipse Marketplace plug-in
Help -> Eclipse Marketplace
Browse through a list of featured or
popular plug-ins
Search for plug-ins with a keyword
search
Easy install of any plug-in found in the
marketplace

CCS APPS

Eclipse Plug-ins - Installation


Use the Eclipse Update Manager to
install plug-ins if the plug-in update site
is already known
Help -> Install New Software for new
updates to install (specify remote site
(URL) or local site (directory) )

Drop-in plugins manually


Many plug-ins can be simply downloaded
as an archive and copied into the
.\ccsv5\eclipse\dropins folder

CCS APPS

PROJECTS

CCS APPS

Working Sets (1)


Use working sets to group projects inside the Project Explorer
Useful for multi-core environments to clearly differentiate projects by which
core they are for

Change the select to


selected working sets.
Then click the New
button

CCS APPS

Working Sets (2)

Select C/C++ as
the type of working
set and click Next

Give your working set a


name and select the
projects that you want to
be part of it. Click Finish

CCS APPS

Working Sets (3)

Then go through the


process again for the next
working set. Once you
have the both created make
sure they are checked and
the click OK

Now you need to change the


project explorer to organize by
the working set

CCS APPS

Parallel Builds
Have a multi-core PC? Take advantage of all those cores to speed
up your CCS project builds with parallel builds!
In the project properties, first enable the advanced settings by
clicking on Show advanced settings in the lower left corner
In the Behavior tab under C/C++ Build, turn on the Enable
parallel build option

CCS APPS

Source Code Editor


CCS comes with an excellent, feature rich editor

Outline view displays lists


structural elements for the
selected source file

Editor tabs

Collapse
and expand
functions

Code Completion
(CTRL+SPACE
for suggestions)

CCS APPS

Advanced Editor Features


Code Completion
Complete word
Auto-member information
Auto-parameter information

Navigation

Back/Forward buttons
Back to last edit button
Go to definition
Go to declaration

Code Folding
Collapse functions

CCS APPS

Advanced Editor Features


Right-click in the editor margin to:

Toggle line numbers in the editor margin


Enable/Disable code Folding
Enable/Disable Quick Diff
Open editor Preferences to
access more options to
configure:
Content Assist (Code
Completion)
Folding
Syntax Coloring
Hovers (Cursor "hover over"
behavior)
Typing behavior
etc
CCS APPS

Edit Markers
If you have the line number column on, it also indicates changes in
your source file since your last save

Modified lines
Inserted lines
Deleted lines

CCS APPS

Variable Highlighting
Highlighting a variable in the editor will highlight all instances of the
variable in the editor

CCS APPS

Source Templates
CCS provides code templates
Ex: Hello World
Type in h in the editor and use Content Assist by pressing CTRL+SPACE
keys (can also right-click in the editor and select Content Assist from the
context menu)

Create custom templates for commonly used source code blocks or


customize existing templates
Window->Preferences->C++->Editor->Templates

CCS APPS

Indexer
The advanced editor features rely
on a database of the source and
header files of the project that
provides the basis for C/C++
search, navigation features and
parts of content assist
(code completion)
The C/C++ Indexer creates this
database by parsing all of the
source and header files of the
projects open in the workspace
Configure the Indexer:
Window -> Preferences -> C/C++
-> Indexer
CCS APPS

Indexer
The Indexer can also be configured on a per project basis in the project
properties
Must click on the Show Advanced Settings link in the lower left corner of the
project properties dialog to expose the options for the Indexer
C/C++ General -> Indexer

CCS APPS

Performance Tip: Turn off the Indexer


Dont use the CCS editor or dont need the advanced editor features?
Turn off the Indexer!
The indexer constantly scans all open projects to support some
advanced editor features
The indexer can use a decent amount of system resources, causing CCS
to appear sluggish
This is most evident with large projects or many open projects in the
workspace (or both)

The default CCS setting is to have the indexer enabled

CCS APPS

Troubleshooting Tip: Rebuild the Indexer


Advanced editor feature not working right?
Code completion not working or bringing up the wrong suggestions?
Open declaration not finding the
declaration?
Outline/Hierarchy views showing
incorrect information?
Indexer database/cache may
have gotten corrupted or is out of
date!
Rebuild it!
Right-click on a project and select
Index -> Rebuild to rebuild the
indexer database for that project
CCS APPS

View: History
CCS keeps a local history of source changes
Switch to the CCS Edit perspective
Right-click on a file in the editor an select
Team -> Show Local History
Opens History view

File Comparer

CCS APPS

Use the History view to


compare the current
source file against any
previous version or replace
it with any previous version
Double-click on a revision
to open it in the editor
Right-click on a revision to
compare that revision to
the current version

History view

Local History - Project


CCS keeps a local history of files for the project
Recover files deleted from the project
Right-click on the project and select Recover from Local History in
the context menu

CCS APPS

View: Outline
Displays an outline of a structured file that is
currently open in the editor area, and lists
structural elements
View -> Outline

CCS APPS

View: Include Browser


Which header files is this source file
including? Who is including this header file?
Directly? Indirectly?
Show hierarchy of included header files for
a source file
View -> Other -> C/C++ -> Include
Browser

CCS APPS

View: Call Hierarchy


Displays callers and callees for a selected function
Right-click on a function and then select Open Call Hierarchy in the
context menu

CCS APPS

DEBUGGING

CCS APPS

Debug Configurations
Debug information created when a debug session is first launched for a
project or target configuration
Information stored includes which target configuration to use, debug
settings

Both project and project-less debug sessions launch debug sessions


using a debug configuration
A debug session can be started by explicitly launching a debug configuration

To configure: Use drop-down menu


next to the Debug As button and
select Debug Configurations

CCS APPS

Debug Configurations
Interface to manage existing configuration or to create new ones
Existing debug configurations are configurable

CCS APPS

Debug Configurations Main Options


Use the Main tab to:
Which target configuration to use
Use the Initialization Script field to specify a DSS JavaScript for target
initialization
Specify which devices on the JTAG scan chain will be visible by in the
Debug view by default
Specify if all CPUs share the same console for C I/O (for multi-core debug)
C I/O will be interleaved in the
same console (preceded with the
CPU name)
Uncheck the option to create a
separate C I/O console for each
CPU

CCS APPS

Debug Configurations Program Options


Use the Program tab to:
Specify which CPU to load the executable on (for multi-core devices)
Can specify different programs for each CPU

Specify to load the program (default) or just symbols only (to debug
code in flash, etc)

CCS APPS

Debug Configurations Target Options


The Target tab can be used to set a variety of debug options like
auto-run to main, auto-connect to a HW target, real-time options,
program verification on load, etc
Flash Programmer options are available for applicable devices

CCS APPS

Debug Configurations Source Options


The Source tab allows you to add additional source lookup search
paths
Specify paths on a per CPU granularity (for multi-core devices)
All paths to any source files in your project are automatically added by
default

CCS APPS

Debug Configurations Common Options


The Common tab contains a collection of miscellaneous options
Can specify the debugger to send all CIO to a file instead of the
console
Specify character encoding

CCS APPS

Troubleshooting Tip: Debug Configuration


Having some strange debugger issues?
Having problems launching a debug session?
Cant connect to the target anymore?
Is the debug session unstable?
Debug Configuration may have gotten corrupted!
Delete it and have CCS generate a new one
Select the Debug Configuration to delete in the Debug
Configurations dialog and press the delete button

CCS APPS

Troubleshooting Tip: Test Connectivity


Having target connection issues?
Validate your physical JTAG connection
to the device from the driver
Use the Test Connection button in the
Advanced tab of the target configuration
Will test both the target configuration file
and the JTAG connectivity between CCS
and the target by running some diagnostics
If all test pass, then the physical connection
between the device and the driver is fine
and the issue is with the debugger
If there are failures, send the results to TI
support
http://processors.wiki.ti.com/index.php/Debugging_JTAG_Connectivity_Problems

CCS APPS

Not all emulators support this feature

Debugging Without a Project


For project-less debug sessions, CCS will look for source files using
relative path information stored in the debug symbols
CCS will find the source files if the executable and source files are in the
exact same location as when the executable was originally built

If the location of the executable file or source (or both) has changed,
CCS may not be able to find the source files
CCS can be instructed where to find the source files one of two ways:
Tell CCS where the first file is and let CCS find the rest of the files using
relative path information in the symbols (recommended method)
Set Source Lookup Paths for CCS to scan when looking for source files:
Set for current debug session
Set for Debug Configuration - apply for every debug session launched by the
debug configuration (under the Source options}
Set at global (workspace) level apply for any debug session started with this
workspace
CCS APPS

Method #1 (Recommended)
If a source file cannot be found during debug, it will be indicated in the
editor
Use Locate the Source File button to browse to the location of the
source file
The debugger can then find other source files in the same location or use relative path
information to find files relative to
the current file
Location is remembered for future
loads of the same program

This method has the best


performance for finding source
files

CCS APPS

Method #2 Debug Context


Source lookup paths can also
be explicitly specified for each
debug context
Right-click in the Debug view
and select Edit Source
Lookup in the context menu
To add a file system path,
select File System Directory
to browse to and add paths
For multi-core debugging, each
debug context has its own set of
source lookup paths
CCS APPS

Method #3 Debug Configuration


The Source tab in the debug configuration allows you to add
additional source lookup search paths
All paths to any source files in your project are automatically added by
default

CCS APPS

Method #4 Global (Workspace)


Source lookup paths can also be set globally to apply for all debug
contexts (in a multi-core environment) and debug sessions
Windows -> Preferences -> C/C++ -> Debug -> Source Lookup Path

CCS APPS

More Debugging: Source Lookup Paths


Once the path is known to the debugger
(using any method), the source file will be
opened in the debugger
Method #1 is recommended due to
having the best performance
The other methods will do recursive
searches inside the specified directories
when searching for files. If the directories
have many subfolders and many files
inside, the search may be slow and thus
lead to slow performance when looking
for the source files

CCS APPS

View: Modules
Provides information for all loaded symbol files
View -> Modules

CCS APPS

View: Terminal
Terminal emulator that can connect to a remote target via a serial port
or over TCP/IP using the TELNET or SSH protocol.
View -> Other -> Terminal -> Terminal

CCS APPS

View: Remote Systems


Remote Systems Explorer (RSE) is an Eclipse
plug-in that provides:

Drag-and-drop access to the remote file system


Remote shell execution
Remote terminal
Remote process monitor

RSE must be enabled in


the workspace preferences
(Window -> Preferences )

Access Remote Systems view


via View -> Other -> Remote
Systems -> Remote Systems

CCS APPS

You might also like