CCSv6 TipsAndTricks
CCSv6 TipsAndTricks
• Projects
– Working Sets
– Editor Tips
– Indexer
– Useful CCS Edit Views
• Debugging
– Debug Configurations
– Debugging Without a Project
– Useful Debug Views
CCS APPS
CCS APPS
GENERAL
Eclipse Concept: Workspaces
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
CCS APPS
(Occasionally) Clean Your Workspace
• The workspace folder can get corrupted over time
CCS APPS
View: Getting Started
CCS APPS
View: TI Resource Explorer
CCS APPS
View: App Center
CCS APPS
Perspective: Simple
CCS APPS
Window Types
Editor:
Only editor windows
are part of this group
Tab Group:
Several windows
grouped together
CCS APPS
another window to Floating window not tied to
hide. Workbench
Windowing Tips
• 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
CCS APPS
Quick Access Field
• Global search field that will search all of CCS
• Search for:
– Views
– Commands
– Menu items
– Preferences
CCS APPS
Filter Field
• Use it to find options/properties faster in the scope of a specific
dialog/view
– Narrows list of options down depending on characters entered in the field
CCS APPS
Eclipse Plug-ins - Basics
• CCS App Center focuses on TI specific content and only shows a tiny
fraction of available Eclipse plug-ins
CCS APPS
Eclipse Plug-ins - Marketplace
• Find additional Eclipse plug-ins from within
CCS with 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) )
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
CCS APPS
Working Sets (2)
CCS APPS
Working Sets (3)
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, under the Behavior tab under 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
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
• Don’t use the CCS editor or don’t 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 Index
• 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?
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 History view
– Opens History view
CCS APPS
the current version
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
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?
– Can’t connect to the target anymore?
– Is the debug session unstable?
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
CCS APPS
– http://processors.wiki.ti.com/index.php/Debugging_JTAG_Connectivity_Problems
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
CCS APPS
Method #2 – Debug Context (CCSv6.0.x)
• 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
• NOTE: This option is only available
CCS APPS
for CCSv6.0.x
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
CCS APPS