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.

Custom Build Commands?

Hello,

Is there a way to do custom build commands in CCS? By "custom build commands" I mean real customized commands - not the custom build command option that CCS leads you to think you have.

I am using CCS 5.3. If I right click on my CCS project, select Properties, and select CCS Build, uncheck Use default build command and Generate Makefiles automatically, I would expect that I can insert my build command in the space following Build command. Unfortunately, CCS wants to keep appending a "-k" to anything I enter in that space. What gives?

I am running CCSv5.3 on Linux.

  • What is it that you would like to do?  There are a couple of different project types in CCS/Eclipse.  Managed Build (used to be called Managed Make) and Standard Make.  When you create a new CCS Project is a Managed Build project.  For Managed build, make is used under the hood but it should really be though of a IDE managed build system, the fact that makefiles are generated and make is called is just the implementation.  It does allow you to change the make utility if you don't want to use the supplied gmake.

    Standard make projects are for people who don't want the IDE controlling the build.  I.e. you have your own makefile which you will maintain.  The project is really just for integrating into the IDE so you can navigate your source better and kick off the build.

    I think maybe a standard make project is what you are looking for.  There are a couple of ways to create this projects.  Personally I have not used them very much.  From the File menu select New -> Other.  Expand C/C++.  You can select "C Project" or C++, and there is also "Makefile Project with Existing Code".  The one I used was "C Project".   When the wizard comes up I choose "Empty Project" under "Makefile project" at the bottom left.  You can then finish.  I would suggest opening the "Make Targets View"  from the view menu go to other and expand Make to find it.

    For this project when you go look at the properties you will see that it is using make as the build command which you can change and it is not set to generate the makefile.  Using the Make Targets View you can create various Make Targets, i.e. commands to your makefile.

    John

    John

  • Thanks for the reply John. Much has happened since my last post.

    1. I found that the "-k" was getting inserted because the option Stop on first build error was selected (from the Behavior tab of the Build Properties).
    2. All this was started because I was trying to insert some general commands in the custom build command area. I was trying to run the shell command env from there. I  wanted to do that because it seemed like CCS was not picking up my environment variables correctly. I found out that CCS must run from a shell other than bash. I moved my shell parameters from .bashrc to .profile and everything started working as it should.
    3. We really did not want to go entirely to the "Empty Project" type because then it seemed we lost the ability to use the CCS GUI for configuring SYS BIOS (xgconf).
    We're all set for now.

    Brock

  • If you are looking to insert commands before the build there is also the option to use a pre-build step.  it is limited to 1 command but on Linux that is not a big deal as you can string them together.  The pre-build and post-build steps can be set 2 tabs over from where you adjust the build command.

    John