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.

Logging CCS Build Output to File

Other Parts Discussed in Thread: CCSTUDIO

CCS 4.2.1

Is there a way to have the build automatically logged to a file?  I tried overriding the build command with the following:

${CCS_INSTALL_ROOT}/utils/gmake/gmake -k > ${PROJECT_BUILD_DIR}/build_output.log 2>&1

Here's a screenshot:

However, it doesn't seem to "stick".  That is, I can click apply/ok and then open the box and it has gone back to the default command.

Does anyone know of a way to log the output to a file or to allow me to override the build command?

Thanks,
Brad

 

  • Brad,

    I searched around on the internet and found the link below:

    http://dev.eclipse.org/newslists/news.eclipse.tools.cdt/msg17410.html

    However this exact command throws an exec error and did not build anything - I am blaming Win7 and UAC, but I can't tell for sure.

    Can you do a test on your XP machine?

    Regards,

    Rafael

  • What is it that you want me to try?  The problem is not that I'm using the wrong build command, it's that the build command cannot be overridden.  Even trying something as simple as unchecking the box (and not changing the command!) does not appear to "stick".  That is, you hit apply/ok and when you open the build settings again you see the box checked again!

    Here's what I mean:

     

  • Brad,

    You are right; your problem description is different.

    My CCS did not restore the Build Command option, therefore I got the exec error when trying to build my project.

    I investigated a bit more and it seems this will not work at all. The Build operation appends the gmake target ("all") to the end of whatever is set in the Build Command option:

    In this case the redirection will not work, since the command would be translated to:

    ${CCS_INSTALL_ROOT}/utils/gmake/gmake -k &>> ${PROJECT_BUILD_DIR}/output.log all

    Thus treating the entire &>> ${PROJECT_BUILD_DIR}/output.log as a target for gmake. This seems to be the reason for the exec error above.

    I really don't know why the Build Command option is acting weird in your case, so I wonder if it is tied to the CCS version. I am using 4.2.0.10018.

    Regards,

    Rafael

  • desouza said:
    I investigated a bit more and it seems this will not work at all. The Build operation appends the gmake target ("all") to the end of whatever is set in the Build Command option:

    Good point.  I guess my attempted workaround isn't possible.

    Can you file an enhancement request to get a CCS dialog option such that I can check a box and it will output file containing the build log?  For example, it would great to check a box and have the output default to ${BuildArtifactFilePath}/build.log?

  • In case anyone else runs into this issue in the interim I found a potential workaround using command line build.

    In my particular case I was trying to build the following project:

    Workspace
    C:\Documents and Settings\a0193370\My Documents\My Projects\64x+\CCS4_tryout2

    Project: my_bios_proj

    Configuration: Debug

    I executed the following commands from a dos shell:

    > cd C:\Program Files\Texas Instruments\ccsv4\eclipse

    > jre\bin\java -jar startup .jar -data "C:\Documents and Settings\a0193370\My Documents\My Projects\64x+\CCS4_tryout2" -application com.ti.ccstudio.apps.projectBuild -ccs.projects my_bios_proj -ccs.clean

    > jre\bin\java -jar startup.jar -data "C:\Documents and Settings\a0193370\My Documents\My Projects\64x+\CCS4_tryout2" -application com.ti.ccstudio.apps.projectBuild -ccs.projects my_bios_proj -ccs.configuration Debug > build_log.txt 2>&1