0% found this document useful (0 votes)
94 views66 pages

Ccs V 6 Fundamentals Ms P 430

Code Composer Studio is an integrated development environment for TI's embedded processors. It provides tools like a debugger, compiler, and editor based on the open-source Eclipse framework. This workshop will cover getting started with Code Composer Studio, including an overview, hands-on exercises with the MSP430 microcontroller, and demonstrations of debugging, building projects, and using features like the ULP Advisor.

Uploaded by

tilak k c
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)
94 views66 pages

Ccs V 6 Fundamentals Ms P 430

Code Composer Studio is an integrated development environment for TI's embedded processors. It provides tools like a debugger, compiler, and editor based on the open-source Eclipse framework. This workshop will cover getting started with Code Composer Studio, including an overview, hands-on exercises with the MSP430 microcontroller, and demonstrations of debugging, building projects, and using features like the ULP Advisor.

Uploaded by

tilak k c
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/ 66

Code Composer Studio

v6

Fundamentals Workshop with the MSP430


Agenda
• Overview
• Hands-on workshop with MSP430
– Getting Started
– Watchpoints
– Build properties
– Debugging programs existing in flash
– Portable Projects
– ULP Advisor
– GRACE basics (Coming)
Code Composer Studio
v6

Overview
Code Composer Studio
• What is Code Composer Studio?
– Integrated development environment for TI’s embedded processors
supporting all Microcontrollers and Processors in a single environment
– A suite of tools including a debugger, compiler, editor…
• Based on the Eclipse open source software framework
– Eclipse is widely used by many development environments
– Offers a rich set of code development tools
– TI contributes changes directly to the open source community
– Extended by TI to support device capabilities
• Integrate additional tools & functionality
– OS application development tools (TI-RTOS, Linux, Android…)
– Code analysis, source control…
Where does CCS fit in the Ecosystem?
• There is a diverse ecosystem of software and tools supporting TI
embedded processors (especially ARM based devices)
• CCS is a software development environment that is available for all of
our embedded processor families
• A selection of free CCS options allow users to get started without
having to invest a significant amount of money
• Support from partner tools is essential to TI success
– Some of our partners provide products that offer a differentiated feature
set or a feature set tailored to specific market segments
– Customers are free to choose the product that best meets their needs or
individual preferences
– TI will make selected features available in partner environments (XDS
debug probe support, Grace, ULP Advisor are examples)
Getting Started View
• Initial screen visible when
Code Composer Studio is
launched
• Provides fast access to
common tasks
– Create a new project
– Use a example
– Open the App Center…
• Embedded Getting Started
Video walks users through
the basics of using CCS
• Links to support, videos
and training material

6
CCS App Center
• Access to additional
products
– “Wares”
– SDKs
– New features
• Keep products up to
date from within CCS
• Further reduce CCS
download size
• Great way to promote
features
“Simple” Mode
• Enabling “Simple”
mode reduces the
environment to just
essential functionality
• Makes it easier for
new users, especially
LaunchPad type
customers to start
using the CCS
environment
Resource Explorer
• Easily access a broad
selection of packages such
as controlSUITE,
MSP430ware, TivaWare,
TI-RTOS…
• Guides you step by step
through using examples
• Provides links to
documentation, videos and
other collateral
Energia Support in CCSv6
• Import existing Energia sketches
– Leverage existing work
– You can build/edit/debug Energia projects
inside CCS
• Provide more debugging capabilities
– JTAG debug
– Register display
– See the generated code
• Keep it simple
– CCS will most likely be customer’s second debugger ever used and their
first full software development environment
– Recommended to use “Simple” Mode
Optimizer Assistant
• Provides advice on how to get the best performance for available code
size
• Graphical display of memory usage

CCS APPS
ULP (Ultra Low Power) Advisor
Turning MCU developers into Ultra-Low-Power experts

ULP Advisor analyzes all C Checks against a thorough Highlights areas of


code line by line. Ultra-Low-Power checklist. improvement within code.

• Can benefit any application • List of 15 Ultra-Low-Power best • Identify key areas for
• Checks all code within a practices improvement
project at build time • Compilation of ULP tips & tricks • Listed in the “Advice” view
• Enabled by default from the well-known to the more • Includes a link to more
• Parses code line-by-line obscure information
• Combines decades of Ultra-
Low-power development
experience

www.ti.com/ulpadvisor
Code Composer Studio Licenses
• Free options:
– 90 day evaluation
– MSP430: 16KB Code Size Limited with the optimizing TI compiler
– MSP430: unlimited code size with GCC
– When using XDS100 JTAG emulators
– Tied to development kits with onboard emulation (not for MSP430)
• Purchase professional tools:
– Starting at $495
– Node Locked License (tied to a PC)
– Floating Licenses available (shared licenses)
– www.ti.com/ccstudio
MSP430 JTAG Emulators

MSP-FET430UIF MSP-FET430PIF

• USB Interface • Parallel Port Interface


• Compatible with CCS, IAR and other • Compatible with CCS, IAR and other
debuggers debuggers
• $99 • $49
XDS Debug Probes
XDS100v2 – Entry Level XDS200 – Mid Range

• Entry level JTAG emulator • Excellent balance of performance and cost


• USB interface • USB interface (Ethernet version available)
• 3 models based on JTAG headers (14pin TI, 20pin TI, • 20pin TI, 14pin TI, 20pin ARM and 10pin ARM connectors
20/10pin ARM) • $295
• $79

XDS560v2 – High Performance Pro Trace

• USB or USB + Ethernet interfaces • Trace Receiver & XDS560v2 JTAG emulator
• Includes multiple JTAG adapters (14pin TI, 20pin TI, 20pin • USB + Ethernet interfaces
ARM, 60pin MIPI, some include 60pin TI) • MIPI60 and 60pin TI adapters
• System Trace • DSP, ARM & System Trace to pins
• $995 - $1495 • $3495
Extensive Support
E2E Community Wiki

• Videos, Blogs, • Technical articles


Forums • Training
• Global customer • Design ideas
support
• http://processors.wiki
• Search for answers .ti.com
• http://e2e.ti.com
YouTube Channel
Getting Started with CCSv5 and
LaunchPad
What is LaunchPad?
• Low cost easy-to-use development tool
intended for beginners and experienced
users alike for MSP430 devices

• Complete development environment that


features integrated USB-based emulation
and all of the hardware and software
necessary to develop applications
LaunchPad: G2x Setup

Connect mini-USB cable


from PC to board

Agenda …
LaunchPad: F5529 Setup

Connect mini-USB cable


from PC to board

Agenda …
LaunchPad
• Want to learn more about LaunchPad?
– Check out:
http://processors.wiki.ti.com/index.php/MSP430_LaunchPad_%28
MSP-EXP430G2%29
Blink LED Example: Briefing
• Key Objectives
– Create and build a simple program to blink LED1
– Start a debug session and load/flash the program on the Launchpad
– Run the program to blink LED1
• Tools and Concepts Covered
– Workspaces
– Welcome screen / Resource Explorer
– Project concepts
– Basics of working with views
– Debug launch
– Debug control
– Profile Clock
– Local History
– Build Properties
– Changing compiler versions
LAB 1: BLINK LED EXAMPLE

30 MINUTES

Open CCS and select the default workspace


You can close the TI Resource Explorer View (it will not be used)
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
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
Getting Started View
• Initial screen visible when
Code Composer Studio is
launched
• Provides fast access to
common tasks
– Create a new project
– Use a example
– Open the App Center…
• Embedded Getting Started
Video walks users through
the basics of using CCS
• Links to support, videos
and training material

26
Resource Explorer
• Easily access a broad
selection of packages such
as controlSUITE,
MSP430ware, TivaWare,
TI-RTOS…
• Guides you step by step
through using examples
• Provides links to
documentation, videos and
other collateral
Resource Explorer: MSP430ware
Browse the contents of
MSP430ware from the
Resource Explorer

Access documentation,
examples and tutorials
Resource Explorer: Tutorials

One-Click build and


debug MSP430ware
examples
Eclipse Concept: Projects
• Projects map to directories in the file system
• Files can be added or linked to the project
– Adding file to project
• Copies the file into your project folder
– Linking file to project
• Makes a reference to the file in your project
• File stays in its original location

• Projects are either open or closed


– Closed Projects:
• Still defined to the workspace, but it cannot be modified by the Workbench
• The resources of a closed project will not appear in the Workbench, but the resources still
reside on the local file system
• Closed projects require less memory and are not scanned during routine activity

• Projects that are not part of the workspace must be imported into the active
workspace before they can be opened
– Both CCSv4/5, CCE projects and legacy CCSv3 projects can be imported into the
workspace
View: Project Explorer
• Displays all projects defined in the active workspace
• The view is mostly a representation of the file system of the project
folder
– Linked files are marked with a special link graphic in the icon
• Use filters to hide various file types to reduce clutter in the view
– Default is to filter CCS generated project files (.*)
Eclipse Concept: Views
• Views are windows within the main Workbench window that provide
visual representation of some specific information
– Most views can be accessed via the ‘View’ menu
– Views are context sensitive

Active tab (in focus)

Inactive tab
(out of focus)
Eclipse Concept: Perspectives
• Defines the initial set and layout of views in the Workbench window
• Each perspective provides a set of functionality aimed at
accomplishing a specific type of task (‘CCS Edit’ for project
development, ‘CCS Debug’ for debugging, etc)
• Can create custom perspectives
View: Debug
• The Debug view displays:
– Target configuration or project
– Call stack

• Buttons to ‘run, halt, terminate (debug session), source and asm stepping,
reset CPU, restart program
View: Console
• Multiple contexts
– Can display build messages or debug messages (including CIO)
depending on which console is selected
– Automatically switches contexts when a new message occurs
• Can use the “Pin” option to prevent this
• You can open multiple console windows
– CIO output in one and build messages in the other
Breakpoint Types
• Software vs Hardware breakpoints
– For software breakpoints the opcode in memory is replaced with a break
opcode so that execution halts when that opcode is reached
– For hardware breakpoints an address comparator is used on the device to
compare the address being fetched with that stored in the comparator
• When placing breakpoints in Flash hardware breakpoints are used
– MSP430 is special as we can use a single hardware breakpoint resource to enable
unlimited “software” breakpoints in Flash
• You have a limited number of hardware breakpoints based on the
number of comparators on the device
• Watchpoints are hardware breakpoints that are looking at data
addresses instead of program addresses
– i.e. break when a location or variable is accessed or written or written with
a specific value (extra comparator required)
View: Breakpoints
• View all available breakpoints
• Can group breakpoints by CPU (multi-core device)
• Specify various actions when the breakpoint is triggered
– Control Profiling (set profile halt/resume points)
– File I/O
– Run a GEL expression
– Set a Watchpoint
– Control CPU trace (on selected ARM & DSP devices)
Further on Breakpoints
• Although not applicable in this lab, some more advanced MSP430 devices
offer further breakpoint options (see the screen capture)
• These include the ability to use operators as well as set a range, eg for a
data, program address or DMA based breakpoint, etc
• Watchpoints on read/write are also available on certain more advanced msps

• Further examples and


information are to be available
from the processor wiki site
• http://processors.wiki.ti.com/inde
x.php/Main_Page
Debugger Options
• Many debugging features can be enabled/disabled from the Debugger
Options
• During a debug session in the ‘CCS Debug’ perspective:
– ‘ Tools->Debugger Options->Generic Debugger Options’
• Configure a variety of debug options like enable/disable:
– auto-run to main
– auto-connect to a HW target
– real-time options (on supported HW)
– program verification on load
– etc…
• Use the “Remember My Settings” option to have the settings apply for
subsequent debug sessions
Temperature Sense Demo: Briefing
• Key Objectives
– Create and build the Temperature Sense Demo
– Start a debug session and load/flash the program on the LaunchPad
– Run the program to start Temperature Sense Demo
• Tools and Concepts Covered
– Adding source files
– “Focus” concept
– Loading Symbols
– Changing Build Options
– Changing Compiler Version
LAB 2: TEMPERATURE SENSE
DEMO

30 MINUTES

Open CCS and select the default workspace


You can close the TI Resource Explorer View (it will not be used)
Eclipse Concept: Focus
• Focus refers to the highlighted portion of the workbench
– Can be an editor, a view, a project, etc.
• This concept is important since several operations inside Eclipse are
tied to the element in focus
– Project build errors, console, menu and toolbar options, etc.

‘Temperature_Sense_Demo’ project is in ‘Focus’ since it


has been selected. So pressing the ‘Debug’ button will
build the project and start the debugger for the
‘Temperatrue_Sense_Demo’ project
Compiler Versions
• Each project specifies which version of the compiler to use
– Actually set on a per configuration level
– I.e. Debug can use one version and release another
• When you download a new compiler if you want to use it you have to
change the compiler version specified by your project
• CCS will allow you to select from all the compilers that it knows about
on your computer
• When you install a new compiler via the Update Manager in CCS it will
automatically know where the computer is
– However you can also tell CCS where another version of the compiler is
located
Blink LED Example: Exercise Summary

• At this point you experimented the following concepts:


– Workspaces
– Welcome screen / Resource Explorer
– Project concepts
– Basics of working with views
– Debug launch
– Debug control
– Profile Clock
– Local History
– Build Properties
– Changing compiler versions
– Debug symbols
– Profile
SHARING PROJECTS
Sharing Projects
• Sharing “Simple” projects (all source/header files are contained in the
project folder)
• Sharing “Linked file” projects only (source is outside of project)
– Typical for non-trivial projects
– Very common when using source control to have a source repository that
is in a location outside of the project
– Effort involves making the project “portable”
• Eliminate absolute paths in the project
– This is the most common use case
Simple Projects
• USE CASE: Wish to share (give) a project folder and all needed
source files to build the project. All source files are inside the project
folder
• Easy to share projects with no linked files:
– The entire project folder can be distributed to another “as-is”
– The user who receives the project can import it into their workspace going
to menu Project  Import Existing CCE/CCS Project and selecting the
copied folder
– Works well for simple projects that only reference files inside the project
folder
“Linked file” Projects
• USE CASE:
– Wish to share (give) a project folder only. The person receiving the project
file already has a copy of the source files
– Wish to check the project folder/files into source control
• Most use cases involve sharing JUST the projects instead of bundling
all the source files
– People will have their own local copies of the source files
• Need to make the project portable to make sure the project is easily
shared
• Portable projects avoid any absolute paths
• Ideal portable projects should be usable without modifying any of the
project files
– This is required for projects maintained in source control
Linked Path Variables
• Used when linking files to projects
– Linked files are those outside of the project folder
• By default CCS (Eclipse) uses absolute paths for linked files
– Obviously that does not work well if a project needs to be shared
• Instead use variables
– Define a set of variables as part of your personal workspace
– When linking the file choose to use a variable and CCS will automatically
convert the absolute path to a path using the variable
Build Variables
• Paths are used in project options
– Location of generated files
– Search paths
• You can use absolute, relative or paths based on variables
• Depending on how your project is structured and what your include
statements look like it is often best to use variables
• Types of variables
– There are a number of pre-defined variables that you can use such as the
project location, workspace location, compiler location…
– You can define your own custom variables
Project vs Workspace Level Variables
• Linked Resource Path Variables and Build Variables can be set at the
project or workspace level
• This current lab set these variables at the workspace level
• What is the benefit of setting these variables at the workspace level
instead of the project level?
– All projects can reuse the same variable (set it once)
– Do not need to modify the project!
• This is important for projects checked into source control and to avoid constant checkouts
so the project can be written to!
LAB 3: PORTABLE PROJECTS

30 MINUTES

Open CCS and select the default workspace


You can close the TI Resource Explorer View (it will not be used)
Portable Projects: Briefing
• Key Objectives
– Create a project that uses a linked source file
– Make the project portable
• Tools and Concepts Covered
– Linked Resources
– Linked Resource Path Variables
– Build Variables
ULTRA LOW POWER ADVISOR
ULP (Ultra-Low Power) Advisor
• Guides developers on how to write code that fully utilizes the unique
Ultra Low Power features of MSP430 devices
• First true software-based teaching tool in the industry for enabling
developers to always write code with Ultra-Low Power in mind
• Offers unique and not-easily-discovered ULP tips and tricks
• Developers will understand where they can improve their code line-
by-line for ULP performance

www.ti.com/ulpadvisor
ULP Advisor | Integrated SW
• IDE Integration
– Comes with Code Composer Studio v5.2
– Pre-installed as a plug-in for IAR
• Stand-alone version coming soon
– Support for other IDEs, such as Open Source MSPGCC
• Automatically enabled for new projects
ULP Advisor | Operation
• Activated when compiling a project
• Scans through project’s code files against a ULP checklist
• Highlights ULP violations and reports in Problem View

ULP Remarks
ULP Advisor | Wiki
• Each remark provides:
– Brief suggestion
– Hyperlink to wiki with detailed information on the rule
• Customers can find:
– Background information, why the rule is important
– What ULP Advisor checked to issue this remark
– Now that I know why and whether or not:
• what is wrong with my code or
• understand why my code intentionally consumes such power
– Code examples
– Videos
– Tutorials
– Links to relevant documentation
– Leverages TI’s huge e2e online community
LAB 4: ULTRA LOW POWER
ADVISOR

20 MINUTES

Open CCS and select the default workspace


You can close the TI Resource Explorer View (it will not be used)
GRACE
Meet Grace
Graphical User Interface for enabling and configuring MSP430 peripherals.

Visually configure MSP430 peripherals.


Enable and configure ADCs, DACs, timers, clocks, serial
communication modules and more, by navigating buttons,
drop-down menus, and text fields.
Generate code that is inserted directly
into your Code Composer Studio
project.
This code can be debugged and downloaded to your
MSP430 device just like traditionally created code!
Helpful popups and tooltips are based
on MSP430 documentation.
Spend less time flipping through pages of datasheets and
user guides, and learn as you go!
Grace is seamlessly integrated into
development environment
Grace supports all F2xx and G2xx Value Line
microcontrollers, as well as MSP430’s most popular
hardware kits, including the $4.30 LaunchPad, the eZ430-
F2013 and eZ430-RF2500.
www.ti.com/grace
What is Grace?
• Grace is a tool that allows you as an MSP430 developer to generate
the peripheral’s set up code within minutes
Grace
• Fully harness MSP430 MCUs integrated analog and digital peripherals
with Grace Software
• Grace software supports all MSP430F2xx and G2xx Value Line MCU
devices
• Seamless integration Code Composer Studio
LAB 5: GRACE

20 MINUTES
COMING

Open CCS and select the default workspace


You can close the TI Resource Explorer View (it will not be used)
Resources
• http://processors.wiki.ti.com/index.php/Download_CCS
• http://processors.wiki.ti.com/index.php/Main_Page
• http://processors.wiki.ti.com/index.php/Category:CCS
• http://processors.wiki.ti.com/index.php/Category:CCS_Training
• http://processors.wiki.ti.com/index.php/MSP430
Thank you!

You might also like