Drexel University's Logo

Clayton McNeil

HUBO Lab Motor Controller Programming Guide


Home
About Me
Tutorials
Media Archive
Resources

Part 2: Setting up Texas Instruments’ Code Composer Studio
and the JTAG Emulator

As mentioned before, the TI F2811 DSP is the brains of the operation. When we say we are programming the MC, we really mean to say we are programming the DSP chip on it. Two things are needed to accomplish this task: a development environment to write the code in and a means of loading it onto the DSP chip. TI’s Code Composer Studio (v3.1) will be used to satisfy the first requirement and a F2811-compatible JTAG emulator will be used to fulfill the second.


Installing Code Composer Studio and the On-Chip Flash Programmer Plug-in:

Coder Composer Studio (CCS) is an integrated development environment (IDE) for several of TI’s DSP platforms. Along with a robust set of debugging utilities designed specifically for embedded systems, CCS contains a special C-compiler which builds programs in a way suitable for export onto the target DSP. In addition to the standard IDE, we will also be using the On-Chip Flash Programmer Plug-in which streamlines the process of exporting the program, also known as ‘flashing’.

Installing CCS is as simple as installing any other Windows application, just run the setup executable and follow the prompts. Choosing a Typical Installation should ensure that everything needed to program the F2811 is included (see below). Make note of what directory CCS is installed to as this information may be needed when setting up the JTAG Emulator. The default is usually the root of the System drive.

CCS Install Screen showing Typical Installation

If the version of CCS being installed does not include the On-Chip Flash Programmer Plug-in, it will have to be installed separately. To do this, run the plug-in’s setup executable and follow the prompts as before.


Setting up, Configuring, and Connecting the JTAG Emulator:

A JTAG Emulator is a device which facilitates communication between the development PC and the DSP chip. The term JTAG refers to an IEEE standard for testing/probing integrated circuits and the term Emulator refers to how the PC is used to emulate the DSP chip during debugging (this is more of a legacy term as most debugging actually uses the PC to monitor/control the DSP as it runs the program).

There are a several JTAG Emulators available for the F2811, many of which are listed here. Typically, the JTAG Emulator will possess one end that connects to the circuit containing the DSP (a 14-pin connector is required for the HUBO Lab MC) and another end which attaches to the PC. This tutorial was written while using a USB JTAG Emulator like the one shown below from Spectrum Digital.

Spectrum Digital USB JTAG Emulator

Setting up and configuring the JTAG Emulator varies depending on its brand and type (USB, Parallel, PCI, etc). Fortunately though, most function in the same way after this is completed. The following is a list of generalized steps for the process, any of which may or may not be required. Refer to the manufacturer’s documentation for more detailed instructions.

  1. Install the Device Drivers, usually by connecting the JTAG Emulator to the PC and following the ‘New Hardware Found’ prompts shown by Windows. For some types of JTAG Emulators, such as Parallel, use of a configuration program and/or modifying the PC’s BIOS may be required instead.
  2. Install the Emulation Drivers, usually by running a setup executable provided by the manufacturer. This step installs the files needed for CCS to actually communicate with the DSP. In some cases, this step must be done manually by placing the relevant files in ‘\cc\bin’ under the CCS installation directory.
  3. Choose a platform target by running the Code Composer Setup utility. Here the actual DSP emulator configuration is chosen from a list of existing ones. Assuming installation of the emulation drivers was successful, the configuration corresponding to the F2811 for the JTAG Emulator being used should be listed. Sometimes certain properties of the configuration must be changed before it can be used. These should be mentioned in manufacturer’s documentation.

Once the JTAG Emulator drivers have been installed and CSS has been setup with the appropriate emulation configuration, it is time to actually connect the JTAG Emulator to the MC and start CCS. After the program is loaded, click Debug->Connect from the menu bar at the top. Assuming there are no problems, CCS should connect to the MC and display something similar to the following screen:

CCS Screen when JTAG Emulator Connects Succesfully

If the above screen appears, then the MC is successfully connected and ready to be program. If an error message appears instead, then there was a somewhere during the installation procedure. Unfortunately, it is not within the scope of this tutorial to offer any guidance for troubleshooting other than double checking that all the manufacturer’s instructions for setting up the JTAG Emulator were followed correctly. Searching for the error message on the internet may also yield useful information.

Continue to Part 3, Building Code Composer Studio Projects and Flashing the Motor Controller...

Home | About Me | Tutorials | Media Archive | Resources