Compiling Code Composer Studio projects from command line

by tsachi 30. June 2009 19:10

Hardware companies makes great stuff. Especially when it comes to hardware. However, when it comes to areas which are not in their development focus, they tend not to do very well.

.. and Texas Instrument is no diffrent. Their H/W is designed and implmented quite well. However, when it comes to provide software support for it, they blow up. big time.

It took me quite a while to figure out how to implement the compilation automation. Officially, Code Composer does not provide any command line options. The only way to make it work thru command line is using the exposed COM interfaces.

The only way to compile their projects is via their user interface, or by using one of the two scripting techniques:

1. Perl

2. COM scripting language

The Perl implementation, as you could have guessed is a plain COM proxy. I will therefore skip their Perl solution and go right to the COM automation.

Below, you can find a script that takes a pjt ( code composer project file ) and compile it.

compilePJT.vbs (1.72 kb)

Please keep in mind that if you have more than a single version of code composer installed on the same machine, you need to re-register all the COM interfaces before compilation. ( I guess nobody at TI heard about COM Versioning.. )

Registering all the COM interfaces can be quite a long task since there are many COM files. Below you can find a link to a batch file that does all that work ( will work for code composer 2.2 )

ccs22_reg.cmd (22.85 kb)

 Last, the COM intefaces are basically mimics the user's actions. That means that if you forget to close the project in the script, an open code composer is still in memoery, with the project open.




About the author

9+ years experience in software, software engineering, software development, software architecture, software development methodology and practices, web, internet, intranet, distributed application, client/server, object-oriented analysis and design, requirements analysis and modeling, data modeling, and database design. Progressed through end-user application, servers and databases work to management positions. Held positions with management responsibility, including training and technological leading, for up to 5 employees. Engaged in computer applications development with focus over video streaming, web and security.