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/MSP430F67791: Code composer command line

Part Number: MSP430F67791
Other Parts Discussed in Thread: CCSTUDIO

Tool/software: Code Composer Studio

Hello;

I have an already project in code composer and i need to build this project several time with different configurations, and i need to make this compilation using the command line.

I use this line of code for compilation 

C:\ti\ccsv6\eclipse\eclipsec -noSplash -data "C:\Users\%username%\workspace_v6_1"  -ccs.buildType full -ccs.autoImport -application com.ti.ccstudio.apps.projectBuild -ccs.projects Test_Project -ccs.configuration Debug

i tried to add this configuration -ccs.projectSpec TestPrjSpc.projectspec and make my configuration in the "TestPrjSpc.projectspec" file and it doesn't work

also i tried to add this configuration -ccs.args arg_file and it doesn't work also

------------------------------------------------------

----------The arg_file is as below------------

------------------------------------------------------

--define=TEST_SCRIPT 

is their any method to pass a configuration to the compile fix my issue.

Best regards

Mohamed Hamed

  • Mohamed Hamed said:
    I have an already project in code composer and i need to build this project several time with different configurations,

    What exactly do you mean here by different configurations? Could you provide an example?

    Have you already had a look at this wiki page that explains what options/commands are supported?

  • Thanks AartiG ;

    i mean by different configurations

    - different prepr-ocessors flags which i need to use --define keyword to define this macro

    and in my code based on this definition i will enable some features and disable others, so what i need is to define this new keyword using scripts not from the GUI. and to compile my code for different PROJECT_TYPE, i will define PROJECT_TYPE = PROJECT_1 and compile the code then define  PROJECT_TYPE = PROJECT_2 and recompile the code and so on till i compile my code with all possible project_type

    By this way i will get all hex files for all project types.

    Example

    in my Config.c file

    #ifdef (PROJECT_TYPE == PROJECT_1)

    ////

    //// enable features i have and disable others

    ////

    #elif (PROJECT_TYPE == PROJECT_2)

    ////

    //// enable features i have and disable others

    ////

    #elif (PROJECT_TYPE == PROJECT_3)

    ////

    //// enable features i have and disable others

    ////

    #else 

    #error"please chose your project type"

    #endif

  • Unfortunately there isn't a way to add additional compiler options when invoking the projectBuild command (as per this FAQ). You would need to do this at projectCreate time itself, it cannot be changed when running the build command. 

    One thing you could do when creating the project is to use a command file to pass options to the compiler (the file can be passed to compiler through --cmd_file option). The compiler reference for this option can be found here. So this --define could go into the options file and then you can simply change the option in the file each time you want to do a different build.

    Hope this helps!

  • Hello AartiG;
    OK, i will handle it another way, but i have a question, is their anyway to know the compilation status(Build success or failure) using this command line
    C:\ti\ccsv6\eclipse\eclipsec -noSplash -data "C:\Users\%username%\workspace_v6_1" -ccs.buildType full -ccs.autoImport -application com.ti.ccstudio.apps.projectBuild -ccs.projects UnifiedMeter -ccs.configuration Debug

    Best regards
    Mohamed Hamed
  • If the build fails it should report ERRORLEVEL as not 0. This support was added a while ago as per this post.