MATLAB: CCS 5.1 integration: when and how

3.35.1ccscode composer studioEmbedded CoderEmbedded IDE LinkTarget Support Package TC2ti

Hello,
Since it was announced that Mathworks wouldn’t provide the same integration functionalities for TI’s Code Composer Studio v4 as it does for CCSv3.3 and it would skip to the next version, I’ve been waiting for CCSv5 to finally appear, which took longer than expected.
Now that this is out for a while, I couldn’t find any references to when this will be implemented and in which version it will occur. Does anyone have any clue about this? I’d really prefer not having to downgrade to the outdated V3.3, but a part of my project has been in standby for too long already.
Thanks!
Martin

Best Answer

Martin,
You can use CCS v5.1 today with Matlab via the xmakeilesetup infrastructure provided for CCSv4.
To do so, follow these instructions:
  • Type xmakefilesetup at the Matlab command prompt. A GUI opens.
  • Keep the "Template" as "gmake", uncheck "Display operational conifgurations only", then select "ti_c000_ccsv4" for the Configuration.
  • Click Apply on the XMakefile GUI, if you haven't used this tool before, a GUI will ask to browse to you CCS v4 installation folder. Use this tool to point to your CCS v5.1 installation folder (i.e.: C:\TI\ccsv5).
  • If you have previously used this tool with CCSv4 a "Tool Directories" tab should be present below, select that tab and copy your CCS v5.1 installation paths in the edit boxes, i.e:
  1. CCS Installation: C:\TI\ccsv5
  2. Code geeneration Tools: C:\TI\ccsv5\tools\compiler\c2000
  3. Code geeneration Tools: C:\TI\bios_6_32_05_54
  • Click "Apply" on the GUI (don't close it).
  • Click on the "New" button next to "Configurations", the tool will offer to chose a name like "ticcs_c2000_ccsv4_clone", let's rename it "ticcs_c2000_ccsv5_based_on_v4", click "OK".
  • All tabs are now editable, you have to update "Compiler", "Linker" and "Archiver". Make sure that the paths are pointing to your CCS v5.1 installation folders, i.e.:
  1. Under Compiler, the compiler section should poiint to something like : C:\TI\ccsv5\tools\compiler\c2000\bin\cl2000
  2. Under Compiler, the arguments section should poiint to something like : -I"C:\TI\ccsv5\tools\compiler\C2000\include" -fr"[|||MW_XMK_DERIVED_PATH_REF|||]"
  3. Under Linker, the Linker section should poiint to something like : C:\TI\ccsv5\tools\compiler\C2000\bin\cl2000
  4. Under Archiver, the Archiver section should poiint to something like : C:\TI\ccsv5\tools\compiler\C2000\bin\ar2000
  • Click "OK" on the GUI to save your changes and close it.
You can now use the models you have created for CCSv3.3.
  • On your model or on a c2000 demo, double click on the "Target Preferences" block.
  • On the "IDE/Tool Chain" drop down, select "Texas Instruments Code Composer Studio v4 (makefile generation only)". Make sure that you save your target settings first as this will erase the existing configuration.
  • Select the apropiate board and processor. Restore your settings.
You are now ready to generate code using CCS v5.1. This approach will use a makefile based approach to compile and link the code using the CCS v5.1 command like tools. Once these steps are completed you can grab the generated *.out file in the code generation folder and download it on the target using CCS v5.1.
Even though this workaround is based on the CCS v4 support, you don't need to have it installed on your machine. This has been succesfully tested with Matlab R2011b and the pre-release of Matlab R2012a. It should also work with earlier versions of the xmakefilesetup tool.
I hope it helps,
Good luck,
Antonin.
Related Question