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.

CCS/MSP430FR5962: Compiler command line switches

Part Number: MSP430FR5962

Tool/software: Code Composer Studio

CCS Version :  8.3.0.00009

I have 4 similar projects within the same workspace, they share many source files and build variants of the same thing.

I have modified the Project properties such that the compiler invocation is actually a batch file, which runs PCLint, then invokes the compiler.

This has been working for a year or so, but recently as I have made tweaks to the project and added source modules CCS has taken it upon itself to reset certain project properties, causing my build to fail.  I have therefore regularly had to set them back to my preferred settings and all is well until the next time !

However, yesterday CCS ramped things up a notch, it has decided not to pass compiler switches and settings ( as setup in project properties ) as a long command line string, it now passes the name of a file instead ( -@"ccsCompiler.opt" ). To make matters worse the file doesn't include all the parameters I require.  Also, of my 4 projects within the workspace, two still work fine, the other two have this problem, no amount of faffing from me seems to make a difference !

So, can you tell me why CCS has taken it upon itself to do this ? and is there any settings menu where I can set it back to what I want ? 

The setting in question is :-

Project Properties->CCS Build->MSP430 Compiler

      Command                    : "${CODE_CHECKER_DIR}/bin/CheckAndCompile.bat" 

      Command line pattern :  ${command} ${CODE_CHECKER_DIR} ${CG_TOOL_CL}  ${output}  ${flags}  ${inputs}

Above is my preferred setting, which now fails in two of the projects ( ok in the others ), if I change the "command" to the usual ${CG_TOOL_CL} it builds but obviously doesn't run PCLint.

Many thanks,

    Andy

  • Andy Castle said:
    So, can you tell me why CCS has taken it upon itself to do this ? and is there any settings menu where I can set it back to what I want ? 

    The ccsCompiler.opt file is automatically generated when the command line length goes over a certain limit. CCS does this to workaround command line length limitations. The file should contain all the compiler options configured for the project, and instead of passing each option on the command line it instead passed the ccsCompiler.opt file.

    How is the build failing in this case? Could you show the build failure/error that appears in the CCS build console?

    An alternate method to letting CCS auto-generate this file (when command line gets too long) could be for you to create your own options file and pass it to the compiler using the --cmd_file option. The option is documented in the MSP430 Compiler Users Guide and is available under Compiler Advanced Options (shown below).

    This would give you bit more control over the process.

  • Thanks, a quick test verifies this, the threshold seems to be around 8000 chars on the command line, and my minimum is around 7794 for my setup !

    If I knew it was going to happen I could work with it but ...The reason the build fails is that when it uses the command line file it only includes the compiler switches, it does not pass the other settings that I have specified within the Command line pattern field ( see my original post ).  Therefore I am not getting all the settings I need to build the image properly !

    Andy

  • Andy Castle said:
    Thanks, a quick test verifies this, the threshold seems to be around 8000 chars on the command line,

    Yes, I believe its somewhere around 8191. 

    Sorry about the inconvenience. I hope you are able to find a reasonable method to work around it for your build environment.