C2000 Launchpad on Fedora

I have recently received my C2000 Launchpad (from Mouser) and after much headache, finally have things up and working. Since the process was a little bit of a hassle, I figured i would do a post as a kind of Tutorial for bootstrapping the development process in Fedora 17 (as you may know my Distro of Choice). Hopefully this will fill a niche to get Fedora users from an unopened box all the way to custom Blinky application.

Firstly you should hit the following links:

TI's Pages:
TI's C2000 Launchpad page
TI's Wiki

Grab the following Documentation:
C2000 Launchpad Product Brief
The C2000 Launchpad User Guide

And the following Software:
Code Compose r Studio (get the current version for linux)
controlSUITE

At this point you should be up to speed on what you have. The Example that comes pre-programmed is pretty interesting. In order to get serial working (if you roll a custom linux kernel like me), make sure that you have the following USB driver built into your kernel:

USB FTDI Single Port Serial Driver

as well as the necessary composite device support. I wasn't getting /dev/ttyUSB0 at first.

CCS Install

Installing CCS is hopefully straight-forward for you, grab the gzip, extract it, and run the included binary. When installing, i put my copy in /opt/ti. For convenience, i will refer to all paths as if you installed yours at /opt/ti, so i hope there's no confusion there.

During installation, choose a custom install, then make sure to include the C2000 libraries, the XDS100 emulator support as a minimum. This should save you some precious space on /.

controlSUITE Install

Next, install controlSUITE with wine into the same parent directory as CCS (again /opt/ti). controlSUITE isn't going to play properly on linux, which is okay as we only really need the headers and drivers, more on which later.

First Impressions

Begin by firing up CCS and selecting a License (i simply chose Evaluate).
Next, you'll find yourself at the Welcome screen. Select Resource Explorer and at the bottom of the screen you should find

"Configure Resource Explorer to discover examples, documentation and generates a resource package"

Add the top level controlSUITE directory here (/opt/ti/controlSUITE). Now search your new package for launchpad to find Example_F2802xLaunchPadDemo, literally the only Launchpad specific example code in controlSUITE.

The Example

Now for some interesting stuff. Try building this project by clicking the little hammer "build" icon. In my beginnings, many hiccups and errors came up. First, setup the target configuration. Click File->New->Target Configuration File. Click through the default on the dialog box that pops up. In the next screen select XDS100v2 USB Emulator, and using a search for 28027 find the TMS320F2807 device. Save this config, and test the connection. Hopefully you get a successful test. If not, check lsusb, lsmod, and your kernel config for the right drivers, to ensure that everything is in line with hardware support.

Next, lets fix a pesky bug. Browse in your project editor to:

Includes->/opt/ti/***/C2000_Launchpad->F2802x_common->cmd->F28027.cmd

In this file edit line 117 to change that last period into a comma, a bug i found out about in this post.

Linker path

Next, there is a problem with the include path for the linker. If an error comes up complaining about IQmath.lib, then add the include path manually. Right click the project in the explorer and select "Show Build Settings". Under

Build->C2000 Linker->File Search Path

remove the bare entry for IQmath.lib, and add a new entry with the full path: /opt/ti/controlSUITE/development_kits/C2000_LaunchPad/f2802x_common/lib/IQmath.lib

Your build and debug should now succeed!

Now for some Custom Blinking

Rather than reinvent the wheel, i forward you here. Pay special attention to the Update at the bottom in order to pull in the headers and driverlib.lib.

Cheers!