In this post I am showing how to instument your code for Testwell CTC++ code coverage from the Texas Instruments Code Composer Interface

It’s quite easy to enable Testwell CTC++ to instrument your source code as it is being built within the Texas Instruments Code Composer 4 or 5 IDE’s.

After having installed both CTC++ and the relevant CTC++ add-on compiler support for the Texas family of compilers, we can simply take advantage of Code Composers  pre-build and post-build steps to execute the necessary CTC commands:

Using TI Code Composer with Testwell CTC++

This is the Code Composer 4 project properties dialog. It is very similar for Code Composer 5. The two commands we’ve added are, for the pre build step:

ctcwrap -hard -modeon -i m c:\progra~1\texasi~2\C6000C~1.2\bin\cl6x.exe

For the post build step:

ctcwrap -hard -modeoff  c:\progra~1\texasi~2\C6000C~1.2\bin\cl6x.exe

Clearly, you need to provide the correct path and compiler binary name for your environment in the above 2 commands. The only other thing to remember is to add the path to the CTC++ installation directory to your PATH environment variable.

And that’s it. All the binaries you now build in Code Composer will be automatically instrumented, ready for deployment and execution on the intended target.