Quick Tips

From Texas Instruments Wiki
Jump to: navigation, search


This page contains a number of tips on how to quickly do things in Code Composer Studio v4. Many of the tips include a short video capture that demonstrate how to perform the task. The video captures have been created with different builds of the product so some captures may not match exactly with what you see in your version.

Note that some of these captures reside on a website that requires a MyTI login. If you do not have a login there is a link to create one on the login screen.  As we update the captures we will move them to a location that does not require a login.

If the demos are not shown, you may need to download the Flash player.

Getting Started 

Hello World This demo goes through the steps to create a project, write source code, build, and debug hello world.

MSP430 Blink the LED This demo goes through the steps to create a project, write source code, build, and debug an example MSP430 program that blinks the LED.

Standard Make Project This demo goes through the steps to create a 'Standard Make Project' to reuse an existing makefile. Building the project will simply call the specified make utility on the makefile associated with the project.

Using Language Packs (Chinese) This demo goes through the steps for installing the Eclipse Language Packs and configuring CCSv4 for Chinese language support. A simple project is created that will output "Hello!" to the 'Output' view in Chinese. Using other languages will have a similar setup and configuration. Since the demo is done using a English Windows system, CCSv4 is launched with additional parameters to "force" Chinese language mode. Also additional steps are done to change the encoding, steps which are not needed if it was a Chinese Windows system. There are some known issues in regards to Chinese language support. See the Language Pack Installation topic for more information on Chinese language support and the known issues.


Creating a Project with RTSC Support This demo shows how to create a CCSv4 project that has RTSC support enabled. In this example, a DSP/BIOS v6 "hello world" template is used when creating the project.

Creating a DSP/BIOS 5.x Project This demo shows how to create a project that uses DSP/BIOS v5.x APIs and configuration. A similar demo, which also shows how to display LOG_printf() output, is available here.

Using XGCONF for RTSC Configuration This demo shows how to use XGCONF to edit a RTSC configuration file.

Using the RTSC Platform Wizard This demo shows how to create a custom RTSC platform package. You would follow these steps, for example, if your memory configuration differs from the configuration in the standard platform package for your device. Additional demos show how to customize the memory sections, build with a custom platform package, and distribute a custom platform package.


Scripting Console This demo shows how to open the scripting console and start using commands. This view allows you to control operations in CCS by typing simple text commands. Use tab to complete commands or hit tab on a blank line to see all available commands. help commandname will show the help for a particular command.

Shortcut to a Workspace This demo shows how to change your CCSv4 desktop shortcut to launch a specific workspace. This way you can have multiple desktop shortcuts for different workspaces.


File Compare This demo shows how to compare two files that exist in your workspace.

Local History The editor keeps a local history every time you save a source file. At any time you can go back and compare your current version of a file with the versions that are in the local history. You can also replace your file with a version from the history.

Code Templates.  Templates are a powerful code insertion feature that ties in with the code completion feature of the editor.  Try typing "mai" and hit CNTL-Space and you will see that it inserts a template for a main function.  There are a bunch of templates included with CCSv4, including templates for things like hello world.  Try typing "h" and hit CNTL-Space.  You should see a few possble completions for this, for the completions that match to a template you even get a little code preview window.  The template feature is something that you can customize yourself.  If you go to Windows->Preferences.  Type templates in the little filter box at the top left of the screen, this filters the preference tree to just those that contain the word templates.  Then select templates under C/C++ -> Editor.  Now you have a screen where you can see all the templates that are loaded and you can also define your own.  Personally I like to export the templates to an xml file after I have added them so that I can easily share them with other people.


Compiler Installation and Selection Topic on how to use a new compiler with CCS

Parallel Builds Compile times are getting longer and longer. Maybe people now have dual or even quad core machines. CCSv4 uses make as its build system underneath the project. This quick demo shows how to use mingw-make as a replacement for gmake in CCSv4 to take advantage of multiple cores in a build. gmake claims to support parallel builds, however it does not work on Windows. The option to enable parallel builds in mingw-make is -j # where # is the number of cores. So typically this is -j 2 Note: the newer gmake in CCSv5 supports -j so there is no need to install mingw.

Exporting Projects In this capture we show how you can export a project and give it to other users. It shows how to structure your project and how to use the export and import features.


Save/load memory from file This demo shows how to find the menu items to save memory to file and load the contents of a file into memory. .dat, coff and raw binary formats are supported.

Clock This demo shows how to use the profiler clock. It shows you how to enable, view and reset the clock.

Cache Visibility in Memory View This demo shows how to enable viewing different levels of memory. i.e. inspect the contents L1P cache, L1D, L2...

Image Analyzer This demo shows the Image Analyzer being used to display a raw YUV 4:2:2 interleaved data on target memory. Note how the 'Load Memory' feature is used to load the raw YUV image from the PC to target memory and the Image Analyzer properties is imported from an existing properties file to avoid re-entering the properties.

Single Time/Frequency Graph This demo shows how to set up a Single Time/Frequency graph using the modem tutorial. Note how File I/O is used to stream in graph data from files on the PC to the target (using advanced breakpoints) and how another breakpoint is used to update the graph (simulate "animate" functionality).

MMU Page Table Viewer This display shows you a tabular view of MMU page table entries. This is used when you need to quickly find out which virtual address corresponds to a physical address. You would use this when you need to find out what software is modifying a certain configuration register. To this this you need to know the virtual address of the software module.


Programming F28xxx flash This demo shows the programming of flash on an F28335 device. The programming is integrated with the program download function and happens automatically. You can also flash using Debug Server Scripting, this enables you to automate your testing, including flashing. DSS Example.

Flash470 This demo shows how to setup flash470 as a post build step so that you can build, flash and launch the debugger all in 1 step. Remember to change your debugger properties to just load symbols only instead of also loading the program.


Function Profiling Use the profiling capabilities of CCSv4 to help you optimize your algorithm. You can enable profiling for your application once you are connected to the target. Once connected, go to Tools->Profile->Profile Setup and select "Profile all Functions". After you execute your program, you can view the results by selecting Tool->Profile->View Function Profile.

Code Coverage The Code Coverage feature provides Line and Functional coverage information for a program after its execution has completed. This feature is enabled through the tool bar (Tools->Profile->Profile Setup) prior to executing the program. Once the program completes, you can view the coverage results by selecting Tools->Profile->View Code Coverage Results. This feature is only supported on the following simulators: C64xx/C64x+, C62xx, C67xx, C54xx and C55xx.

Target Setup

Create A New Target Configuration This demo shows how to create a simple target configuration for C6416 Device Simulator and how to start debugger using this configuration. A similar demo, using the DM6467 simulator, is available here.

Changing the Target Configuration Properties This demo shows how to adjust target configuration properties. Example of target configuration properties could be initialization script (startup GEL files), JTAG clock frequency, target endianness, etc.

Using ICEPICK This demo shows how to view the ICEPICK device inside C6000 and SoC devices to inspect and enable individual cores.

Launching a project target configuration manually This demo shows how to manually launch a target configuration that belongs to a project.

Launching a shared target configuration manually This demo shows how to manually launch a target configuration stored in the shared area.

A target configuration can also be added to a project so that when the 'Debug Active Project' feature is used to start debugger, then project's active configuration will be used. This allows to have different projects use different target configurations, without the need to explicitly change target configuration when active project is changed. The Hello World demo shows an example of this.

If your emulator and device combination is not available in the 'General Setup' utility shown in the demos, the 'Advanced Setup' utility will need to be used to build a configuration. See the mediawiki topic: Creating Custom Target Configurations

Additional information about emulators are below: