Ccs V 6 Fundamentals Ms P 430
Ccs V 6 Fundamentals Ms P 430
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
• 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 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
Agenda …
LaunchPad: F5529 Setup
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
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
• 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
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
30 MINUTES
30 MINUTES
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
20 MINUTES
COMING