I ported Joby Taffey's wonderful Launchpad SPI Explorer to the CCS compiler and present it here by popular demand.
The main change required for CCS compatibility were in processor configuration and interrupt declaration.
A few minor changes have been made to the original code. I was trying to get a single SPI device working rather than keeping it as a universal tool, so I've converted it to 16-bit SPI only. I don't have any recollection of why I couldn't do two 8-bit SPI transfers rather than one 16-bit one.
Some other bits have been commented out, stripped or shortened to make it fit onto my device. Size optimisation was required: the option can be found by right clicking the project name (just above binaries/includes/debug), Build properties, Basic Options. I have my optimisation level set to 3 and the trade-off set to 0.
Also, I think it was necessary to reduce the stack size, under the linker's basic options. Mine's set to 50 at the moment.
There are a few other options that look useful, like "Inline functions only called once." From memory, the author of the code used lots of little functions that did one thing and by default a C function call involves a fair bit of setup and teardown (it might be worth looking at the output to see what it does), but this should be a pretty safe optimisation.
Setting the debug model to "Suppress all" might free up some space too, but I don't think I had to do that.
spi_explorer.zip - 2010-09-16
Note that the project file may refer to a location for the linker script on my own computer, so you might have to fix up the paths/point it at another file/something else until I get around to fixing this.
An I2C version is also available.