This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

MISRA-C Checking & Build Configurations

Other Parts Discussed in Thread: CCSTUDIO, TMS320C6424

Hello,

I have a CCSv6 project which contains three principal build configurations, the standard 'Debug' and 'Release' builds along with a specific 'MISRA' build which performs MISRA-C 2004 checking amongst other options.

I intend to run the MISRA build through Hudson Jenkins, as I currently do for release builds. But the command line script I use to import the code into a Jenkins workspace from SVN seems not to copy the .cproject file (which based on my initial evaluation seems to contain build configuration information).

The Jenkins job contains the following steps:

1.    Pull an entirely new copy of the code from SVN to ".\DemoCode".

2.    Remove the previous CCS workspace (using rd /Q /S)

3.    Import the fresh project into the workspace. Using: "eclipsec -noSplash -data <workspace_location> -application com.ti.ccstudio.apps.projectImport -ccs.location ".\DemoCode" -ccs.copyIntoWorkspace"

4.    Build the project. Using "eclipsec -noSplash -data <workspace_location> -application com.ti.ccstudio.apps.projectBuild -ccs.projects CDemo -ccs.autoImport -ccs.configuration MISRA"

It is on step 4 that the build fails, this only happens when building from the command line with the MISRA configuration specified. The build operates as expected when performed within Code Composer v6. If no build configuration is specified then the project builds under debug as expected.

I have noted that the .cproject file held within subversion (and the freshly pulled copy) is 162KB, but once the project import has completed the file has a size of 102KB. This leads me to believe that the project import step creates a new default copy of the .cproject file.

Does anybody have experience of a solution to this, or a suggestion for a better method of triggering the MISRA build from within Jenkins.

Many Thanks,
Daniel White

System Spec: Windows XP SP3, Code Composer Studio v6.0., Spectrum Digital TMS320C6424 DSK Module

  • Daniel,

    Daniel White said:
    It is on step 4 that the build fails, this only happens when building from the command line with the MISRA configuration specified.

    Can you provide more details on exactly how the build fails?

    Daniel White said:
    I have noted that the .cproject file held within subversion (and the freshly pulled copy) is 162KB, but once the project import has completed the file has a size of 102KB. This leads me to believe that the project import step creates a new default copy of the .cproject file.

    Have you opened and compared the two .cproject files to see what changed? If you can send us the two files we could take a look as well.

    I also noticed you are using CCS 6.0. Any chance you could install the latest 6.1.1 and give that a try? http://processors.wiki.ti.com/index.php/Download_CCS

  • Aarti,

    The build fails with the following error code:
    !ERROR: Build-configuration 'MISRA' does not exist for project 'CDemo'!
    But this happens only when the project is added to the workspace using the console commands as described in the OP.

    I have used beyond compare to look at the contents of the two .cproject files described above and can confirm that the larger one contains references to the MISRA build configuration and the smaller does not.

    This means that when using the console commands above the project is imported to the workspace but without the relevant .cproject file. I will try adding a .bat which copies the file across manually, but is there anything you can suggest to add to the code composer studio command line instructions to allow this to occur?

    Many thanks,
    Daniel
  • Aarti,

    Adding a copy command to my .bat file has done the trick. So I can confirm that the CCS command line statements described in the OP do not copy the .cproject file.

    Many thanks
  • Daniel White said:
    Adding a copy command to my .bat file has done the trick. So I can confirm that the CCS command line statements described in the OP do not copy the .cproject file.

    I'm glad you have a suitable workaround. However, I haven't been able to reproduce this with simple projects that I tried with, and I can't explain why the .cproject file is not being copied over correctly. I suspect it has something to do with SVN and Jenkins, but it might be difficult for us to track it down without having the same build environment. 

  • Aarti,

    I can't quite explain it either. However I do know that Jenkins sometimes acquires a 'lock' on files that are within its workspace, and this may be the case. As I am currently copying the .cproject file in from another location.

    Thanks for you help regardless.

    Daniel White