collection 1432

20
C2000 Getting Started with Code Composer Studio v5 1 C2000 Getting Started with Code Composer Studio v5 Introduction Code Composer Studio is TI's integrated development environment (IDE) for TI embedded processors. This wiki article covers getting started topics for C2000 users who are: New and starting with CCS v5.1 Migrating from CCS v4 to CCSv5.1 Migrating from CCS v3.3 to CCSv5.1 Changes from CCSv4 If you are migrating from CCSv4, then reading through the CCSv5 Changes Wiki Page is highly recommended. Other Training Material For all generic CCSv5 topics which are not C2000-specific, or to better understand CCSv5 in more detail, please visit the Code Composer Studio Wiki: Code Composer Studio v5 Wiki The following workshop material is targeted to other device families. However much of it is still generic CCS v5.1 information and will apply to the C2000 MCUs. CCSv5 Fundamentals Workshop: Introductory hands-on training for CCSv5.1 using an MSP430 LaunchPad CCSv5 Advanced Workshop: Deeper dive into some of the more advanced functionality of CCSv5.1 using an AM3517 Experimenter Board Key Eclipse Terminology Workspaces In CCSv5 a workspace is: 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 between users Note: Workspaces in CCSv5.1 are the same as in CCSv4.x. Workspaces are not portable because they contain data specific to your computer system. You cannot save a workspace, zip it up, and send it to another user. A CCSv5.1 workspace should not be confused with the CCSv3 concept of workspace.

Upload: vatan50

Post on 27-Oct-2014

55 views

Category:

Documents


3 download

TRANSCRIPT

C2000 Getting Started with Code Composer Studio v5 1

C2000 Getting Started with Code ComposerStudio v5

IntroductionCode Composer Studio is TI's integrated development environment (IDE) for TI embedded processors.This wiki article covers getting started topics for C2000 users who are:

• New and starting with CCS v5.1• Migrating from CCS v4 to CCSv5.1• Migrating from CCS v3.3 to CCSv5.1

Changes from CCSv4If you are migrating from CCSv4, then reading through the CCSv5 Changes Wiki Page is highlyrecommended.

Other Training MaterialFor all generic CCSv5 topics which are not C2000-specific, or to better understand CCSv5 in more detail,please visit the Code Composer Studio Wiki:

• Code Composer Studio v5 WikiThe following workshop material is targeted to other device families. However much of it is still generic CCSv5.1 information and will apply to the C2000 MCUs.

• CCSv5 Fundamentals Workshop: Introductory hands-on training for CCSv5.1 using an MSP430 LaunchPad• CCSv5 Advanced Workshop: Deeper dive into some of the more advanced functionality of CCSv5.1 using an

AM3517 Experimenter Board

Key Eclipse Terminology

WorkspacesIn CCSv5 a workspace is:

• 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 between usersNote: Workspaces in CCSv5.1 are the same as in CCSv4.x. Workspaces are not portable because they containdata specific to your computer system. You cannot save a workspace, zip it up, and send it to another user. ACCSv5.1 workspace should not be confused with the CCSv3 concept of workspace.

C2000 Getting Started with Code Composer Studio v5 2

WorkbenchWorkbench refers to the main CCSv4 GUI window Equivalent to the "Control Window" in CCS 3.x. TheWorkbench contains all the various views and resources used for development and debug.

CCS 3.xEach debuggable CPU must have their own instance of the Control Window

• Only one Control Window can be opened for each debuggable CPU• Information is not shared between each Control Window

CCS v4 and v5• One Workbench window can have visibility to all debuggable CPUs• Multiple Workbench windows can be opened ('Window->New Window')• Each Workbench window can differ visually (arrangement of views, toolbars and such), but refer to the same

workspace and the same running instance of CCSv4. A project is opened from one Workbench will appear tobe open in all the Workbench windowsThe CCSv5 concept of workbench makes working with dual cores such as the C28x and CLA or the ConcertoM3 and C28x. You can choose to work with both cores within one workbench, or you can open a workbenchfor each CPU.

ViewsViews are the individual windows which provide a visual representation of information within the workbench.For example the Memory View visually shows a view of memory contents. Another example is the ExpressionView which shows the results of different expressions. Most Views can be opened through the View menu.

PerspectivesA perspective defines the set and layout of views (i.e. windows) in the Workbench window. Each perspectiveprovides a set of functionality aimed at accomplishing a specific type of task. For example "CCS Edit" forproject development, "CCS Debug" for debugging. You can also create custom perspectives.CCS is likely in the Debug Perspective at this point. This automatically happens when the code is loaded to theMCU.To switch between perspectives:

• On the upper right you will find a "Open Perspective", "CCS Edit" button, and "CCS Debug" button.• Click on the "CCS Edit" button to switch back to "CCS Edit" Perspective. The resources now visible are those

used for project development.• Click on the "CCS Deubg" button to switch back to the “CCS Debug” Perspective. The resources now visible

are those used for project debug.• Click on "Open Perspective" to view other defined perspectives.

Perspective Selection

C2000 Getting Started with Code Composer Studio v5 3

Starting Up CCSv5.1

Select a workspaceWhen you first open CCSv5.1, a dialog box will prompt you to select a workspace. This is a folder where allof your custom settings will be saved for your specific personal computer. This includes all of your projectsettings, macros, and views when you shut down CCSv5. For instance, if you have several projects + memorywindows + graph window + watch variables that you were working with when you closed CCSv5.1, thesesame projects and settings will be available when you re-open CCSv5.1.Note: Workspaces save automatically when you close Code Composer Studio. If you don't want to overwritethe settings you have for a current workspace, you can open / switch to a new workspace by going to: "File->Switch Workspace".

Select a Workspace

Resource ExplorerResource Explorer will display the first time CCS is used with a new workspace. The Resource Explorerincludes many getting started resources as well as resources advanced users will find helpful. These include:

• Getting Started video introduces you to CCS• Contains links to documentation, examples, support resources• Buttons to create a new project or import an existing one into your workspace

To open Resource Explorer at a later time: "Help->Welcome to CCS".

Run Your First C2000 Project in CCSv5.1

Set up the Target Configuration OptionsA Target Configuration tells CCS how to connect to the device. It describes the device using gel files anddevice configuration files.

1. Go to the "View->Target Configurations" menu.2. Click on the "New Target Configuration File" icon.

Create a New Target Configuration

• Type a name for the target configuration file. It will have a “.ccxml” suffix.• Leave the "Use shared location" box checked.

3. Select "Finish".

C2000 Getting Started with Code Composer Studio v5 4

New Target Configuration

4. In the window that appears, select your emulator via the “Connection” pull-down list.5. In the “Device” list, select your device.

• In this example, we have selected the “XDS100v1 Emulator” and the “TMS320F28069” device checkbox.

Target Configuration

6. Click on the "Save" button or use “File->Save”7. Go to “View->Target Configurations”

• Under “User-Defined”, you will see your new target configuration.8. Right-click the configuration.9. Select "“Set as Default”" if you want to use this emulator and device GEL file by default for all future projects

opened in your workspace that do not have a target configuration assigned to them.• Alternatively: Select “Link File to Project ->Example_2806xCpuTimer", to always use this target

configuration for this specific project in your workspace.

Set Default Target Configuration for a Project

Open the CCSv4 cpu_timer project included with controlSUITE (www.ti.com/controlsuite)This example shows how to load one of the CCSv4 projects from controlSUITE. CCSv4 projects can beimported directly into CCSv5. These instructions are for the CPU Timer example for the F2806x devices.Similar instructions can be followed for any project.

1. For now you can close resource explorer.2. Go to "Project->Import Existing CCS/CCE Eclipse Project"

C2000 Getting Started with Code Composer Studio v5 5

Import Existing CCS4 or CCS5 Project

3. Next to “Select Search Directory”• Click on the “Browse” button• Browse to the project directory. In this example we will use the

"<controlSUITE>/device_support/f2806x/<version>/f2806x_examples/cpu_timer" directory• Select “OK”.• Make sure “Example_2806xCpuTimer” is selected in the “Projects:” textbox.• Important: For example projects supplied by TI, do NOT check the “Copy projects into workspace” checkbox.

4. Click on the “Finish” button.

Eclipse Import Wizard

If the project is CCSv4 based, Code Composer Studio will convert the build option files to the required CCSv5format.

• Select "Yes" to port the build option files.• The original CCSv4 files will be saved in .cdtbuild_initial and .project_initial. These files can be used to

restore the CCSv4 build options if needed.• Projects ported to CCSv5.1 can not be loaded directly into CCSv4. The .cdtbuild and .project files must first be

restored.

C2000 Getting Started with Code Composer Studio v5 6

Converting a CCSv4 Project

You are now in the CCS Edit perspective. The project files appear in the “Project Explorer” view.

Project Explorer

BinariesAfter the project is built, the .out file for the project is located here.

IncludesAll directories with include referenced by the build options are listed here. Expanding the directorieslists all .h and .inc files in these directories which may or may not be used by the project.

DebugAll debug files are located here, including .map and .obj files.

Source FilesAll source files are listed. If any source files contain functions, include files, or structures, selecting the“cross” next to the source file lists all the function, include file, and structure names in that file.Double-clicking the function names brings you to where the function, include file, and structures aredefined in the source code.

Note: Opening Multiple Projects: As in CCSv4 multiple projects can be imported into CCSv5.1 at one time.One difference is the concept of "active project" is no longer used in CCSv5.1. This is discussed in more detailin the building projects section.

C2000 Getting Started with Code Composer Studio v5 7

Launch the DebuggerTo build the project and launch the debugger:

1. Select the project by clicking on the project's name in the "Project Explorer" view.2. Click on the green bug ("debug" button) on the toolbar.

Debug Button

3. Code Composer will do the following:• Save any open files in the project selected• Build the selected project.• Automatically switch to the CCS Debug perspective

4. The "Debug" view will now be visible.• This view should always be open (do not close it). If you should close it, you can open it again using the

"view->debug" menu item.• It allows you to connect to the target device and control it (run, step, etc).

Debug View - Don't Close This!

The debugger can also be launched by a right click on the target configuration and selecting "Launch SelectedConfiguration". This will not build the project, however.

Launch Configuration

Connect to the TargetTo Connect to the target:

1. In the debug window, select the CPU you wish to connect to.• In this example the C28x core is selected.

2. Right click on the core and select "Connect Target"• Alternative: Select "Run->Connect Target"• Alternative: Use the keyboard shortcut CTRL-ALT-C

Connect to the Target

C2000 Getting Started with Code Composer Studio v5 8

Note: You can configure the debug button to also automatically connect to the target after launch: In theCCS Debug perspective: "Tools -> Debugger Options -> Generic Debugger" and slect "Connect toTarget on Debugger Setup".

Build the ProjectTo Build the Project without connecting to the target, or to build it after you have already connected, followthese steps:

1. Make sure the project has been selected by clicking on the name in Project Explorer• Note: In CCSv4 you would make the project the "active project" before building. In CCSv5 there is no

concept of active project. Instead select the project by clicking on the name.2. Click on the "build" button which is a small hammer in the toolbar.

Build the Project

AlternativeYou can also build using the "Project->Build Project" menu item.

• This menu is also visible in the debug perspective.If you have multiple projects that you would like to build one after another:

1. Import all of the projects into Project Explorer2. "Project->Build All"

Load the ApplicationAt this point the CPU Timer example application is likely already loaded onto the target and you will see thesource code for the main function. If this is not the case, then load the application by:

1. In the CCS Debug Perspective• If needed refer to Perspectives

2. Select "Run->Load->Load Program"3. Select "Browse Projects". All projects imported into CCS will be shown along with their .out file if it exists.4. Select the .out file you want to load into the MCU.5. Select "Ok".

Load Application

C2000 Getting Started with Code Composer Studio v5 9

Reset the CPURestart and Reset are available on the Debug Toolbar:

Reset and Restart

Alternatively:• Select "Run->Reset->Reset CPU" to reset the device.• To restart the program, select "Run->Restart".

ResetReset is similar to pulling the device reset pin. Most registers on the device will return to their defaultstate. Some exceptions are PLL configuration, for example.

RestartThis will force the PC to the "entry point" of the application. In most of the C2000 examples this isdefined as the symbol "code_start". It should be noted that using "Restart" will bypass executing theboot ROM code. If you are trying to debug issues when an application runs stand-alone, it isrecommended to not use restart since it bypasses the boot ROM and the jump to flash.

Note: In the debugger options, you can specify the action to take on a reset, program load or restart. Forexample "run to main". Disable this option if you want to step through the boot code before main()!

Add Variables to the Expression ViewTo quickly add variables to the expressions view:

1. Make sure you are in the CCS Debug perspective.• If needed refer to Perspectives

2. In “Example_2806xCpuTimer.c”, scroll down in the comments at the top of the file until you reach "“WatchVariables”".

3. Highlight “CpuTimer0.InterruptCount”, right-click, and select Add Watch Expression.4. A menu will open showing the expression you are adding. Click "ok".5. Then repeat for “CpuTimer1.InterruptCount” and “CpuTimer2.InterruptCount”.

• These variables are now in the Expressions View.• You can also add expressions directly to the Expression View. Simply click "Add New expression" and

type the expression that you want to evaluate. For example, (CpuTimer0.InterruptCount + 5)*3. Then clickok.::

Expressions View

Note: The Expression View was called the Watch View in CCS v4 and the Watch Window in CCS v3.3

C2000 Getting Started with Code Composer Studio v5 10

Enable real-time mode to monitor the watch variables as they are changingTo enable real-time mode:

1. Make sure you are in the CCS Debug perspective.• If needed refer to Perspectives

2. Click on the clock at the top of the CCS Debug perspective.

Enable Realtime Mode

3. CCS will ask you if you would like to change bit 1 of the ST1 status register to 0. This is required to enterreal-time mode.

4. Select "Yes".5. In the upper right-hand corner of the watch window, click on the white down-arrow and select “Continuous

Refresh Interval”.6. Change the Continuous Refresh Interval to “100” (milliseconds) instead of the default “500” (milliseconds).7. In the upper right-hand corner of the watch window, click on the icon of the yellow arrows rotating to enable

continuous refresh mode.

Configure Refresh Interval and Enable Refresh

Run the program1. In the CCS Debug Perspective

• If needed refer to Perspectives2. Select the green arrow icon on the toolbar or go to "Run->Resume"

Debug Toolbar

Watch the variables in the Watch Window increment once per second as the CPU timers interrupt.Congratulations!! You just finished running your first C2000 project in CCS v5.1!

C2000 Getting Started with Code Composer Studio v5 11

Portable Projects in CCSv5 or What happened to macro.ini?You may be familiar with a file called macro.ini that was used to create a portable project in CCSv4 (Refer to:Portable Projects in CCSv4 for C2000). Since that time, Eclipse has implemented the capability to storepath-variables in the project's settings and the macro.ini is no longer needed.You can now define and edit the path-variables at the project scope:

1. Make sure you are in the CCS Edit perspective.• If needed refer to Perspectives

2. Right click on the project's name3. Select "Properties -> Resource -> Linked Resources"

• You can now view, add or edit the macros for the project.• Multiple projects now store their variables at the project scope, not at the global scope.• Avoids name collisions between multiple projects.• Existing macros.ini files are automatically processed when a CCSv4 project is imported. In the below

screenshot, the macros indicated with a blue square were processed from the macro.ini file andautomatically added to the project properties when the project was imported.

Linked Resource Macros in the Project Properties

Note: Knowing the resolved pathname of a macro can be useful when trying to debug issues with alinked resource. If you would like to see the full path that a macro resolves to, then right click on theproject name and open the linked resources page ("Properties -> Resource -> Linked Resources"). Nowdouble click on the name of the macro. An edit dialog box will open. Under the macro, you can view thefully resolved path name.

Resolved Macro Path in the Edit Macro DialogBox

.

C2000 Getting Started with Code Composer Studio v5 12

Linking New Files to a Project

To link new files into a project do the following:1. Make sure you are in the CCS Edit perspective.

• If needed refer to Perspectives2. In the Project Explorer view, right click on a project name and choose "Add Files"3. Choose files that you would like to add and click "Open"4. A dialog that pops up providing options to copy files or link files.

• If you choose "link file" then you can choose whether to create a link relative to the PROJECT_LOC macroor a macro you created.

• The PROJECT_LOC macro resolves to the current project's location.

Linking a New Source File

Note: You can also drag/drop files to a CCSv5 project. Configure the action to be taken on drag/drop in theWindow->Preferences->General->Workspace->Linked Resource menu.

Programming FlashAn improvement in CCSv4 and CCS v5.1 over CCSv3.3 is that the flash-programmer plug-in is built in. Whenyou debug a project which has its source code and command linker file configured for flash memory, you nolonger need to load the symbols only and then separately use the flash programmer plugin to program the codeto flash. Instead, as long as the correct device target configuration is loaded, if CCSv5.1 detects that there iscode in flash memory via the command linker file in your project, it will automatically erase the flash andprogram the relevant code to flash when you load the .out file.The flash programmer plug-in settings will automatically be configured for your device. To view or change thesettings in CCS v5.1:

1. First ensure that your target configuration is set up properly for your device.2. Launch the debugger.3. Make sure you are in the CCS Debug perspective.

• If needed refer to Perspectives4. Select "Tools->On-chip Flash"5. Configure the On-Chip Flash Programmer as required

• You can also erase the flash from the On-Chip Flash Programmer view.• For help with the flash plug-in, click on the On-Chop Flash Programmer View and press the F1 key

6. Select "Remember My Settings" if you would like this configuration to remain for future debug sessions.Note: If your program only uses a few sectors, you can save time by erasing only the sectors you are using. Inthe Flash plug-in configuration, uncheck the sectors not being used. Now they will not be erased as part of theload process.

C2000 Getting Started with Code Composer Studio v5 13

On-Chip Flash Programmer Configuration

Project Migration

Migrating C2000 Projects from CCSv4.x to CCSv5.1CCSv4 and CCSv5 projects are similar. However, the internal storage format of the managed build systemchanged between CCSv4 and CCSv5 so an internal migration will happen automatically. To import a CCSv4project, from the Project menu select "Import Existing CCS/CCE Eclipse Project". During import, CCS willask if you want to convert to the newer format. If you select "No" the project will not be converted andimported into CCSv5.Note: Projects converted to CCSv5 cannot be directly loaded back into CCSv4, but the conversion processsaves a copy of the original .cdtbuild, .project and macros.ini (if one exists) files and names them with a_initial extension. If the project needs to be imported back into CCSv4, these files should first be restored totheir original names.

C2000 Getting Started with Code Composer Studio v5 14

Migrating C2000 Projects from CCSv3.3 to CCSv5.1Code Composer Studio v5.1 allows users to migrate projects from CCSv3.3. The user has the flexibility ofmigrating a single project at a time or multiple projects at once. This way, if there are many projects in a singledirectory which need conversion from CCSv3.x to CCSv5.1, in one run, all the projects can be easilymigrated.

CCSv3.3 Projects (.pjt) CompatibilityCCSv5 uses the Eclipse concept of projects, which is different than the projects in CCSv3.3. CCSv5 includes aproject import wizard for importing legacy 3.3 projects. To import a CCS 3.3 project, from the Project menuselect "Import Legacy CCSv3.3 Project". This will launch a wizard that will guide you through the conversionprocess. If you don't want to convert your projects at this time one thing you may want to try is to insteadcreate a standard make project that calls timake to build your existing pjt file. A standard make project is reallyjust a wrapper project where you provide the build utility that you want to use and the parameters that shouldbe passed to it for building and cleaning.If you are importing a project that uses DSP/BIOS the import wizard will ask you which version of DSP/BIOSyou want the imported project to use. It is recommended that you select DSP/BIOS 5.41.xx. This version ofDSP/BIOS is compatible with previous 5.x versions.

Migrating a Single Project from CCSv3.3 to CCSv5.1To start the migration process:

1. Make sure you are in the CCS Edit perspective• If needed refer to Perspectives

2. Select "Project-> Import Legacy CCSv3.3 Project". The legacy import wizard will open.3. Choose "Select a project file" radio button4. Browse to the project (.pjt) you would like to import and select "Open"

• In the below figure, the "2808_IQsampleC.pjt" file is selected.• Note: This is just an example, a CCSv4 version of the project already exists in controlSUITE [1].

Importing a Legacy Project

5. Press the "Next" button.6. Select the Code Generation Tools version desired for building the selected project.

C2000 Getting Started with Code Composer Studio v5 15

Codegen Tool Version Selection

7. Press the "Next" button.8. Specify whether DSP/BIOS support should be enabled or automatically determined.

• If you do not know, then select "Automatically Determine DSP/BIOS support enablement".9. Press the "Next" button.10. De-select "Use common root for all migrated projects" to allow CCS to automatically determine the unique

common root for all files referenced by the project.11. Press the "Finish" button.

Congratulations! You have migrated a CCSv3.x project to CCSv5.1. Code Composer will have created a newfolder with the CCSv5.1 files. This includes:

• .ccsproject• .cproject• .project

When the project is imported into CCSv5.1, resources in other directories will be linked to the project using alinked resource macro. In this example, the IQmath project contains source that is in another directory so it canbe shared with multiple projects. After import, the project properties will have a PROJECT_LOC andSRC_ROOT macro as shown below:

Linked Resources Created During Import

If we take a look in the .project file, we will find the SRC_ROOT macro is used to create a relative path to thesource files. This allows the source files to remain in their original location.

Path in the .project File to a Linked Resource

Migrating Multiple Projects at Once from CCSv3.3 to CCSv5.1To start the migration process:

1. Make sure you are in the CCS Edit perspective• If needed, refer to Perspectives

2. Select "Project-> Import Legacy CCSv3.3 Project". The legacy import wizard will open.3. Select the "Search-Directory" radio button4. Browse to the directory holding all or some of the CCSv3.3 project files you wish to migrate.

• In the below screenshot, the directory selected is:"C:\ti\controlSUITE\libs\math\IQmath\v160\examples\C\projects".

C2000 Getting Started with Code Composer Studio v5 16

• Note, this is just an example. A CCSv4 version of these projects already exists in [|controlSUITE [2]].• The migration wizard will then search for all legacy projects under the selected directory, and these projects

will appear in the “Discovered Legacy Projects:” box.• Check those projects you wish to migrate.

Importing Multiple Legacy Projects

5. Press the “Next” button.6. Select the Code Generation Tools version desired for building the selected project.

Codegen Tool Version Selection

7. Press the "Next" button.8. Specify whether DSP/BIOS support should be enabled or automatically determined.

• If you do not know, then select "Automatically Determine DSP/BIOS support enablement".9. Press the "Next" button.10. In the Set Advanced Options window, de-select the "Use a common root for all migrated projects" checkbox.

This checkbox is used when multiple projects share a common root directory for files included in thoseprojects.

11. Press the "Finish" button.The below figure shows the directory file structure for the projects being migrated. All projects to be migratedfor this example are located in individual folders in one directory.

C2000 Getting Started with Code Composer Studio v5 17

Imported Directory Structure

All of these projects include common files under a separate /source directory just as they did before the import.

Target Configurations: Device Target and Emulation SetupWith Code Composer Studio v3.3, in order to configure the device emulation settings for a target, the usermust open the Setup CCStudio v3.3 utility, which is independent of the Code Composer Studio IDE to selectthe correct emulator and device GEL file for CCStudio. This then requires the user to close the CCStudio IDEand run the setup utility every time the target or emulator changes.Code Composer Studio v5.1 includes emulator target configuration within the IDE itself. The user can specifydifferent target configurations for different emulators and device settings either for general use, or for specificprojects.Please refer to Set up the Target Configuration Options for more information.

C2000 GEL File Migration

CCS v4 to CCS v5.1GEL files used under CCS v4 are compatible with CCS v5.1.

CCS v3.3 to CCS v5.1The device gel files from CCSv3.3 still work with CCSv5.1. Calls to manipulate projects (i.e. Build Project)and “WatchAdd()” functions to add variables to the watch window are no longer supported. GEL hotmenuitems now appear in the “Scripts” pull-down menu.More information on GEL files, including how to load GELs and which GEL functions are still supported canbe found at the GEL Wiki page here: GELRegister WatchAdd() in Device GEL Replaced by View->Registers

The C2000 CCS v3.3 device GEL files include “WatchAdd()” functions to all the peripheral registers, allowingthe user to quickly add any peripheral’s registers to the watch window in CCSv3.x when not using theTI-provided C/C++ header files. Because the WatchAdd() function no longer works in CCSV5.1, theperipheral registers are now available via the Registers window, which can be accessed from"View->Registers". If using the TI-provided C/C++ header files (downloadable from device product folders onthe TI website) while debugging, register structures defined in the header files can also be added to the WatchWindow same as before. Expanding these register structures allows access to individual bit fields as well (i.e.,adding "AdcRegs" to the Watch Window, will display all the ADC registers and their bit field expansions).

C2000 Getting Started with Code Composer Studio v5 18

Known Issues

controlSUITE Projects Missing Device TargetCertain controlSUITE projects break after setting a device target in the project properties.A way to determine if the project is missing a device target is to check the project properties, under "General", andsee if the device variant is listed as "Unknown TMS320C28XX Device".

1. Signs of the problem first show up in Step 3 while using the resource explorer. Clicking on "DebuggerConfiguration" causes the following error.

2. To fix the problem, open the project properties and select "General" on the left menu.3. Confirm that the device variant is listed as "Unknown TMS320C28XX Device", select the proper device

variant. In this example, an F28035 is used. Also select the appropriate connection, in this case, the "TexasInstruments XDS100v1 USB Emulator".

4. By changing the device variant, CCSv5 automatically selects the appropriate linker command file to go alongwith it. This causes a conflict with the command file already included in the example project.

5. In order to avoid this conflict, select "<none>" for the linker command file.6. Make sure the compiler version selected is the latest one (or one you have installed.)7. Click on "Apply"

The project should now successfully debug.

Other ResourcesTo discuss technical questions, the E2E Community is a great resource. Visit e2e.ti.com [3].Forums on the E2E site include:

• C2000 Forums [4]

• Development Tools (CCS, Compiler, DSP/BIOS) Forums [5]

and many more...

CN C2000 Getting Started with Code Composer Studio v4

References[1] http:/ / www. ti. com/ controlSUITE[2] http:/ / www. ti. com/ controlsuite[3] http:/ / e2e. ti. com[4] http:/ / e2e. ti. com/ support/ microcontrollers/ tms320c2000_32-bit_real-time_mcus/ f/ default. aspx[5] http:/ / e2e. ti. com/ support/ development_tools/ default. aspx

Article Sources and Contributors 19

Article Sources and ContributorsC2000 Getting Started with Code Composer Studio v5  Source: http://processors.wiki.ti.com/index.php?oldid=90012  Contributors: Alvaroprieto, John, Lheustess

Image Sources, Licenses and ContributorsImage:CCSV5 C2000 Debug perspective.jpg  Source: http://processors.wiki.ti.com/index.php?title=File:CCSV5_C2000_Debug_perspective.jpg  License: unknown  Contributors: LheustessImage:CCSv5 C2000 Workspace.jpg  Source: http://processors.wiki.ti.com/index.php?title=File:CCSv5_C2000_Workspace.jpg  License: unknown  Contributors: LheustessFile:CCSv5 C2000 New config.jpg  Source: http://processors.wiki.ti.com/index.php?title=File:CCSv5_C2000_New_config.jpg  License: unknown  Contributors: LheustessFile:New config2.jpg  Source: http://processors.wiki.ti.com/index.php?title=File:New_config2.jpg  License: unknown  Contributors: LheustessImage:CCSV5 C2000 Target setup.jpg  Source: http://processors.wiki.ti.com/index.php?title=File:CCSV5_C2000_Target_setup.jpg  License: unknown  Contributors: LheustessImage:Default target.jpg  Source: http://processors.wiki.ti.com/index.php?title=File:Default_target.jpg  License: unknown  Contributors: LheustessImage:CCSv5 C2000 Project import existing.jpg  Source: http://processors.wiki.ti.com/index.php?title=File:CCSv5_C2000_Project_import_existing.jpg  License: unknown  Contributors:LheustessImage:CCSv5 C2000 Project import existing2.jpg  Source: http://processors.wiki.ti.com/index.php?title=File:CCSv5_C2000_Project_import_existing2.jpg  License: unknown  Contributors:LheustessImage:Convert to.jpg  Source: http://processors.wiki.ti.com/index.php?title=File:Convert_to.jpg  License: unknown  Contributors: LheustessImage:CCSv5 C2000 Projectview.jpg  Source: http://processors.wiki.ti.com/index.php?title=File:CCSv5_C2000_Projectview.jpg  License: unknown  Contributors: LheustessImage:CCSv5 C2000 Bug.jpg  Source: http://processors.wiki.ti.com/index.php?title=File:CCSv5_C2000_Bug.jpg  License: unknown  Contributors: LheustessImage:CCSv5 C2000 debugview.jpg  Source: http://processors.wiki.ti.com/index.php?title=File:CCSv5_C2000_debugview.jpg  License: unknown  Contributors: LheustessImage:CCSv5 C2000 Launch configuration.jpg  Source: http://processors.wiki.ti.com/index.php?title=File:CCSv5_C2000_Launch_configuration.jpg  License: unknown  Contributors:LheustessImage:CCSV5 C2000 Connect.jpg  Source: http://processors.wiki.ti.com/index.php?title=File:CCSV5_C2000_Connect.jpg  License: unknown  Contributors: LheustessImage:CCSv5 C2000 Build.jpg  Source: http://processors.wiki.ti.com/index.php?title=File:CCSv5_C2000_Build.jpg  License: unknown  Contributors: LheustessImage:CCSV5 C2000 load.jpg  Source: http://processors.wiki.ti.com/index.php?title=File:CCSV5_C2000_load.jpg  License: unknown  Contributors: LheustessImage:CCSv5 C2000 restart reset.jpg  Source: http://processors.wiki.ti.com/index.php?title=File:CCSv5_C2000_restart_reset.jpg  License: unknown  Contributors: LheustessImage:Expressions View.jpg  Source: http://processors.wiki.ti.com/index.php?title=File:Expressions_View.jpg  License: unknown  Contributors: LheustessImage:CCSV5 C2000 Realtime mode.jpg  Source: http://processors.wiki.ti.com/index.php?title=File:CCSV5_C2000_Realtime_mode.jpg  License: unknown  Contributors: LheustessImage:CCSV5 C2000 refresh.jpg  Source: http://processors.wiki.ti.com/index.php?title=File:CCSV5_C2000_refresh.jpg  License: unknown  Contributors: LheustessImage:CCSv5 C2000 debug toolbar.jpg  Source: http://processors.wiki.ti.com/index.php?title=File:CCSv5_C2000_debug_toolbar.jpg  License: unknown  Contributors: LheustessImage:CCSv5 C2000 Resources linked.jpg  Source: http://processors.wiki.ti.com/index.php?title=File:CCSv5_C2000_Resources_linked.jpg  License: unknown  Contributors: Lheustessimage:CCSv5 C2000 resolvedpath.jpg  Source: http://processors.wiki.ti.com/index.php?title=File:CCSv5_C2000_resolvedpath.jpg  License: unknown  Contributors: LheustessImage:CCSV5 C2000 Link to file.jpg  Source: http://processors.wiki.ti.com/index.php?title=File:CCSV5_C2000_Link_to_file.jpg  License: unknown  Contributors: LheustessImage:CCSv5 C2000 flash options.jpg  Source: http://processors.wiki.ti.com/index.php?title=File:CCSv5_C2000_flash_options.jpg  License: unknown  Contributors: LheustessImage:CCSv5 C2000 legacy import.jpg  Source: http://processors.wiki.ti.com/index.php?title=File:CCSv5_C2000_legacy_import.jpg  License: unknown  Contributors: LheustessImage:CCSv5 C2000 codegen choice.jpg  Source: http://processors.wiki.ti.com/index.php?title=File:CCSv5_C2000_codegen_choice.jpg  License: unknown  Contributors: Lheustessimage:CCSv5 C2000 imported linkedresource.jpg  Source: http://processors.wiki.ti.com/index.php?title=File:CCSv5_C2000_imported_linkedresource.jpg  License: unknown  Contributors:Lheustessimage:CCSv5 C2000 project.jpg  Source: http://processors.wiki.ti.com/index.php?title=File:CCSv5_C2000_project.jpg  License: unknown  Contributors: LheustessImage:CCSv5 C2000 legacy import multiple.jpg  Source: http://processors.wiki.ti.com/index.php?title=File:CCSv5_C2000_legacy_import_multiple.jpg  License: unknown  Contributors:LheustessImage:CCSv5 C2000 codegen choice multiple.jpg  Source: http://processors.wiki.ti.com/index.php?title=File:CCSv5_C2000_codegen_choice_multiple.jpg  License: unknown  Contributors:LheustessImage:CCSv5 C2000 import directory.jpg  Source: http://processors.wiki.ti.com/index.php?title=File:CCSv5_C2000_import_directory.jpg  License: unknown  Contributors: Lheustess

LicenseTHE WORK (AS DEFINED BELOW) IS PROVIDED UNDER THE TERMS OF THIS CREATIVE COMMONS PUBLIC LICENSE ("CCPL" OR "LICENSE"). THE WORK IS PROTECTED BY COPYRIGHT AND/OR OTHERAPPLICABLE LAW. ANY USE OF THE WORK OTHER THAN AS AUTHORIZED UNDER THIS LICENSE OR COPYRIGHT LAW IS PROHIBITED.BY EXERCISING ANY RIGHTS TO THE WORK PROVIDED HERE, YOU ACCEPT AND AGREE TO BE BOUND BY THE TERMS OF THIS LICENSE. TO THE EXTENT THIS LICENSE MAY BE CONSIDERED TO BEA CONTRACT, THE LICENSOR GRANTS YOU THE RIGHTS CONTAINED HERE IN CONSIDERATION OF YOUR ACCEPTANCE OF SUCH TERMS AND CONDITIONS.License1. Definitionsa. "Adaptation" means a work based upon the Work, or upon the Work and other pre-existing works, such as a translation, adaptation, derivative work, arrangement of music or other alterations of a literary or artistic work, or

phonogram or performance and includes cinematographic adaptations or any other form in which the Work may be recast, transformed, or adapted including in any form recognizably derived from the original, except that a workthat constitutes a Collection will not be considered an Adaptation for the purpose of this License. For the avoidance of doubt, where the Work is a musical work, performance or phonogram, the synchronization of the Work intimed-relation with a moving image ("synching") will be considered an Adaptation for the purpose of this License.

b. "Collection" means a collection of literary or artistic works, such as encyclopedias and anthologies, or performances, phonograms or broadcasts, or other works or subject matter other than works listed in Section 1(f) below,which, by reason of the selection and arrangement of their contents, constitute intellectual creations, in which the Work is included in its entirety in unmodified form along with one or more other contributions, each constitutingseparate and independent works in themselves, which together are assembled into a collective whole. A work that constitutes a Collection will not be considered an Adaptation (as defined below) for the purposes of this License.

c. "Creative Commons Compatible License" means a license that is listed at http:/ / creativecommons. org/ compatiblelicenses that has been approved by Creative Commons as being essentially equivalent to this License,including, at a minimum, because that license: (i) contains terms that have the same purpose, meaning and effect as the License Elements of this License; and, (ii) explicitly permits the relicensing of adaptations of works madeavailable under that license under this License or a Creative Commons jurisdiction license with the same License Elements as this License.

d. "Distribute" means to make available to the public the original and copies of the Work or Adaptation, as appropriate, through sale or other transfer of ownership.e. "License Elements" means the following high-level license attributes as selected by Licensor and indicated in the title of this License: Attribution, ShareAlike.f. "Licensor" means the individual, individuals, entity or entities that offer(s) the Work under the terms of this License.g. "Original Author" means, in the case of a literary or artistic work, the individual, individuals, entity or entities who created the Work or if no individual or entity can be identified, the publisher; and in addition (i) in the case of a

performance the actors, singers, musicians, dancers, and other persons who act, sing, deliver, declaim, play in, interpret or otherwise perform literary or artistic works or expressions of folklore; (ii) in the case of a phonogram theproducer being the person or legal entity who first fixes the sounds of a performance or other sounds; and, (iii) in the case of broadcasts, the organization that transmits the broadcast.

h. "Work" means the literary and/or artistic work offered under the terms of this License including without limitation any production in the literary, scientific and artistic domain, whatever may be the mode or form of its expressionincluding digital form, such as a book, pamphlet and other writing; a lecture, address, sermon or other work of the same nature; a dramatic or dramatico-musical work; a choreographic work or entertainment in dumb show; amusical composition with or without words; a cinematographic work to which are assimilated works expressed by a process analogous to cinematography; a work of drawing, painting, architecture, sculpture, engraving orlithography; a photographic work to which are assimilated works expressed by a process analogous to photography; a work of applied art; an illustration, map, plan, sketch or three-dimensional work relative to geography,topography, architecture or science; a performance; a broadcast; a phonogram; a compilation of data to the extent it is protected as a copyrightable work; or a work performed by a variety or circus performer to the extent it is nototherwise considered a literary or artistic work.

i. "You" means an individual or entity exercising rights under this License who has not previously violated the terms of this License with respect to the Work, or who has received express permission from the Licensor to exerciserights under this License despite a previous violation.

j. "Publicly Perform" means to perform public recitations of the Work and to communicate to the public those public recitations, by any means or process, including by wire or wireless means or public digital performances; tomake available to the public Works in such a way that members of the public may access these Works from a place and at a place individually chosen by them; to perform the Work to the public by any means or process and thecommunication to the public of the performances of the Work, including by public digital performance; to broadcast and rebroadcast the Work by any means including signs, sounds or images.

k. "Reproduce" means to make copies of the Work by any means including without limitation by sound or visual recordings and the right of fixation and reproducing fixations of the Work, including storage of a protectedperformance or phonogram in digital form or other electronic medium.

2. Fair Dealing Rights

License 20

Nothing in this License is intended to reduce, limit, or restrict any uses free from copyright or rights arising from limitations or exceptions that are provided for in connection with the copyright protection under copyright law or otherapplicable laws.3. License GrantSubject to the terms and conditions of this License, Licensor hereby grants You a worldwide, royalty-free, non-exclusive, perpetual (for the duration of the applicable copyright) license to exercise the rights in the Work as statedbelow:a. to Reproduce the Work, to incorporate the Work into one or more Collections, and to Reproduce the Work as incorporated in the Collections;b. to create and Reproduce Adaptations provided that any such Adaptation, including any translation in any medium, takes reasonable steps to clearly label, demarcate or otherwise identify that changes were made to the original

Work. For example, a translation could be marked "The original work was translated from English to Spanish," or a modification could indicate "The original work has been modified.";c. to Distribute and Publicly Perform the Work including as incorporated in Collections; and,d. to Distribute and Publicly Perform Adaptations.e. For the avoidance of doubt:

i. Non-waivable Compulsory License Schemes. In those jurisdictions in which the right to collect royalties through any statutory or compulsory licensing scheme cannot be waived, the Licensor reserves the exclusive rightto collect such royalties for any exercise by You of the rights granted under this License;

ii. Waivable Compulsory License Schemes. In those jurisdictions in which the right to collect royalties through any statutory or compulsory licensing scheme can be waived, the Licensor waives the exclusive right to collectsuch royalties for any exercise by You of the rights granted under this License; and,

iii. Voluntary License Schemes. The Licensor waives the right to collect royalties, whether individually or, in the event that the Licensor is a member of a collecting society that administers voluntary licensing schemes, viathat society, from any exercise by You of the rights granted under this License.

The above rights may be exercised in all media and formats whether now known or hereafter devised. The above rights include the right to make such modifications as are technically necessary to exercise the rights in other media andformats. Subject to Section 8(f), all rights not expressly granted by Licensor are hereby reserved.4. RestrictionsThe license granted in Section 3 above is expressly made subject to and limited by the following restrictions:a. You may Distribute or Publicly Perform the Work only under the terms of this License. You must include a copy of, or the Uniform Resource Identifier (URI) for, this License with every copy of the Work You Distribute or

Publicly Perform. You may not offer or impose any terms on the Work that restrict the terms of this License or the ability of the recipient of the Work to exercise the rights granted to that recipient under the terms of the License.You may not sublicense the Work. You must keep intact all notices that refer to this License and to the disclaimer of warranties with every copy of the Work You Distribute or Publicly Perform. When You Distribute or PubliclyPerform the Work, You may not impose any effective technological measures on the Work that restrict the ability of a recipient of the Work from You to exercise the rights granted to that recipient under the terms of the License.This Section 4(a) applies to the Work as incorporated in a Collection, but this does not require the Collection apart from the Work itself to be made subject to the terms of this License. If You create a Collection, upon notice fromany Licensor You must, to the extent practicable, remove from the Collection any credit as required by Section 4(c), as requested. If You create an Adaptation, upon notice from any Licensor You must, to the extent practicable,remove from the Adaptation any credit as required by Section 4(c), as requested.

b. You may Distribute or Publicly Perform an Adaptation only under the terms of: (i) this License; (ii) a later version of this License with the same License Elements as this License; (iii) a Creative Commons jurisdiction license(either this or a later license version) that contains the same License Elements as this License (e.g., Attribution-ShareAlike 3.0 US)); (iv) a Creative Commons Compatible License. If you license the Adaptation under one of thelicenses mentioned in (iv), you must comply with the terms of that license. If you license the Adaptation under the terms of any of the licenses mentioned in (i), (ii) or (iii) (the "Applicable License"), you must comply with theterms of the Applicable License generally and the following provisions: (I) You must include a copy of, or the URI for, the Applicable License with every copy of each Adaptation You Distribute or Publicly Perform; (II) Youmay not offer or impose any terms on the Adaptation that restrict the terms of the Applicable License or the ability of the recipient of the Adaptation to exercise the rights granted to that recipient under the terms of the ApplicableLicense; (III) You must keep intact all notices that refer to the Applicable License and to the disclaimer of warranties with every copy of the Work as included in the Adaptation You Distribute or Publicly Perform; (IV) whenYou Distribute or Publicly Perform the Adaptation, You may not impose any effective technological measures on the Adaptation that restrict the ability of a recipient of the Adaptation from You to exercise the rights granted tothat recipient under the terms of the Applicable License. This Section 4(b) applies to the Adaptation as incorporated in a Collection, but this does not require the Collection apart from the Adaptation itself to be made subject tothe terms of the Applicable License.

c. If You Distribute, or Publicly Perform the Work or any Adaptations or Collections, You must, unless a request has been made pursuant to Section 4(a), keep intact all copyright notices for the Work and provide, reasonable to themedium or means You are utilizing: (i) the name of the Original Author (or pseudonym, if applicable) if supplied, and/or if the Original Author and/or Licensor designate another party or parties (e.g., a sponsor institute,publishing entity, journal) for attribution ("Attribution Parties") in Licensor's copyright notice, terms of service or by other reasonable means, the name of such party or parties; (ii) the title of the Work if supplied; (iii) to theextent reasonably practicable, the URI, if any, that Licensor specifies to be associated with the Work, unless such URI does not refer to the copyright notice or licensing information for the Work; and (iv) , consistent withSsection 3(b), in the case of an Adaptation, a credit identifying the use of the Work in the Adaptation (e.g., "French translation of the Work by Original Author," or "Screenplay based on original Work by Original Author"). Thecredit required by this Section 4(c) may be implemented in any reasonable manner; provided, however, that in the case of a Adaptation or Collection, at a minimum such credit will appear, if a credit for all contributing authors ofthe Adaptation or Collection appears, then as part of these credits and in a manner at least as prominent as the credits for the other contributing authors. For the avoidance of doubt, You may only use the credit required by thisSection for the purpose of attribution in the manner set out above and, by exercising Your rights under this License, You may not implicitly or explicitly assert or imply any connection with, sponsorship or endorsement by theOriginal Author, Licensor and/or Attribution Parties, as appropriate, of You or Your use of the Work, without the separate, express prior written permission of the Original Author, Licensor and/or Attribution Parties.

d. Except as otherwise agreed in writing by the Licensor or as may be otherwise permitted by applicable law, if You Reproduce, Distribute or Publicly Perform the Work either by itself or as part of any Adaptations or Collections,You must not distort, mutilate, modify or take other derogatory action in relation to the Work which would be prejudicial to the Original Author's honor or reputation. Licensor agrees that in those jurisdictions (e.g. Japan), inwhich any exercise of the right granted in Section 3(b) of this License (the right to make Adaptations) would be deemed to be a distortion, mutilation, modification or other derogatory action prejudicial to the Original Author'shonor and reputation, the Licensor will waive or not assert, as appropriate, this Section, to the fullest extent permitted by the applicable national law, to enable You to reasonably exercise Your right under Section 3(b) of thisLicense (right to make Adaptations) but not otherwise.

5. Representations, Warranties and DisclaimerUNLESS OTHERWISE MUTUALLY AGREED TO BY THE PARTIES IN WRITING, LICENSOR OFFERS THE WORK AS-IS AND MAKES NO REPRESENTATIONS OR WARRANTIES OF ANY KIND CONCERNINGTHE WORK, EXPRESS, IMPLIED, STATUTORY OR OTHERWISE, INCLUDING, WITHOUT LIMITATION, WARRANTIES OF TITLE, MERCHANTIBILITY, FITNESS FOR A PARTICULAR PURPOSE,NONINFRINGEMENT, OR THE ABSENCE OF LATENT OR OTHER DEFECTS, ACCURACY, OR THE PRESENCE OF ABSENCE OF ERRORS, WHETHER OR NOT DISCOVERABLE. SOME JURISDICTIONS DO NOTALLOW THE EXCLUSION OF IMPLIED WARRANTIES, SO SUCH EXCLUSION MAY NOT APPLY TO YOU.6. Limitation on LiabilityEXCEPT TO THE EXTENT REQUIRED BY APPLICABLE LAW, IN NO EVENT WILL LICENSOR BE LIABLE TO YOU ON ANY LEGAL THEORY FOR ANY SPECIAL, INCIDENTAL, CONSEQUENTIAL, PUNITIVEOR EXEMPLARY DAMAGES ARISING OUT OF THIS LICENSE OR THE USE OF THE WORK, EVEN IF LICENSOR HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.7. Terminationa. This License and the rights granted hereunder will terminate automatically upon any breach by You of the terms of this License. Individuals or entities who have received Adaptations or Collections from You under this License,

however, will not have their licenses terminated provided such individuals or entities remain in full compliance with those licenses. Sections 1, 2, 5, 6, 7, and 8 will survive any termination of this License.b. Subject to the above terms and conditions, the license granted here is perpetual (for the duration of the applicable copyright in the Work). Notwithstanding the above, Licensor reserves the right to release the Work under different

license terms or to stop distributing the Work at any time; provided, however that any such election will not serve to withdraw this License (or any other license that has been, or is required to be, granted under the terms of thisLicense), and this License will continue in full force and effect unless terminated as stated above.

8. Miscellaneousa. Each time You Distribute or Publicly Perform the Work or a Collection, the Licensor offers to the recipient a license to the Work on the same terms and conditions as the license granted to You under this License.b. Each time You Distribute or Publicly Perform an Adaptation, Licensor offers to the recipient a license to the original Work on the same terms and conditions as the license granted to You under this License.c. If any provision of this License is invalid or unenforceable under applicable law, it shall not affect the validity or enforceability of the remainder of the terms of this License, and without further action by the parties to this

agreement, such provision shall be reformed to the minimum extent necessary to make such provision valid and enforceable.d. No term or provision of this License shall be deemed waived and no breach consented to unless such waiver or consent shall be in writing and signed by the party to be charged with such waiver or consent.e. This License constitutes the entire agreement between the parties with respect to the Work licensed here. There are no understandings, agreements or representations with respect to the Work not specified here. Licensor shall not

be bound by any additional provisions that may appear in any communication from You. This License may not be modified without the mutual written agreement of the Licensor and You.f. The rights granted under, and the subject matter referenced, in this License were drafted utilizing the terminology of the Berne Convention for the Protection of Literary and Artistic Works (as amended on September 28, 1979),

the Rome Convention of 1961, the WIPO Copyright Treaty of 1996, the WIPO Performances and Phonograms Treaty of 1996 and the Universal Copyright Convention (as revised on July 24, 1971). These rights and subjectmatter take effect in the relevant jurisdiction in which the License terms are sought to be enforced according to the corresponding provisions of the implementation of those treaty provisions in the applicable national law. If thestandard suite of rights granted under applicable copyright law includes additional rights not granted under this License, such additional rights are deemed to be included in the License; this License is not intended to restrict thelicense of any rights under applicable law.