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: pre-build make error (e=5)

Tool/software: Code Composer Studio

Hello,

Trying to run a pre-build batch file, as part of a project build.  Unfortunately, it keeps err'ing out, as shown below.  I've reduce the problem replication to a very simple batch file, that does a simple "dir" command, for the time-being, until finding out what is causing the issue.  I'm using CCS 7.3.0.  Please advise.

Robert

  • Hi Robert,

    The only contents of the bat file is "dir"?

    Then you should see something like:

    That "make (e=5)" error is usually caused by some permissions issue. Check the tmp directory or the 1.bat file and check it has the proper execute permissions

  • Hi Ki,

    Thanks for the reply.  Yes, only "dir".  I'm pretty sure it's not permissions on the tmp directory ... I made it, open permissions on it, etc.

    I talked with a colleague, and he mentioned having a similar error in the past, and it was related to using Cygwin Git.  He resolved it by using Windows version of GIT.  Don't know if you've heard of anything like that?  I'd like to remain with the Cygwin version, since that is my main development environment.

    Robert

  • Robert Wolfe said:
    I talked with a colleague, and he mentioned having a similar error in the past, and it was related to using Cygwin Git.  He resolved it by using Windows version of GIT.

    From CCS gmake errors the error could be an incompatible version of gmake in your path.

  • Hi,

    Thanks for the reply.  To try and totally disconnect it from any GIT-related issue, I just created a simple bat file, 1.bat, and put it in a c:\temp directory, and tried to run it via gmake.  And it failed again, as shown below.  The gmake version we're using for our project is from ccsv7, so that is put directly in the calling path.

    Here is the associated makefile line for "pre-build"

    1.bat has a simple "dir" command in it.

    As you can see, the gmake is still having issues trying to run this batch file.  I have several gmake versions on my computer, including one from a later version of CCS, one in XDCtools directories.  But as shown above, I've specifically called the CCSV7 version, so there shouldn't be any incompatibility involved, right?

    Please advise

    Robert

  • Robert - in the article that Chester referenced, can you try the suggestion regarding setting your system PATH to minimum:

    Check your system PATH variable to see if there are any other "make" binaries in the PATH. If you have other toolchains in your PATH (such as Cygwin, WINAVR) that also contain make utilities, then that could cause a conflict, and the incorrect make may be picked up. Try removing such tools and/or setting your PATH to a bare minimum to ensure that the gmake used by CCS is correctly picked up. Then restart CCS and see if the error persists. 

  • Thanks Ki.  Even if I run the make command from a command window, explicitly spelling out the gmake path (c:\ti\ccsv7\utils\bin\gmake), I get the same error.  I don't think it is path related, although I did put that path at the front of my system PATH environmental variable (with no change in error).

    It is something about the TI gmake and Cygwin GIT interaction causing an issue ... at least that is still the latest suspicion.

    Robert

  • Robert Wolfe said:
    Yes, only "dir".  I'm pretty sure it's not permissions on the tmp directory ... I made it, open permissions on it, etc.

    The error appears to be "permission denied" when gmake attempts to execute a batch file in the temp directory.

    According to Can't execute from Temp folder in Windows 7 thus could be due to anti-virus software

  • Robert Wolfe said:
    It is something about the TI gmake and Cygwin GIT interaction causing an issue

    Another thing to check is if there another sh.exe on the path - see MKS or Cygwin or gmake tools in your path

  • Chester,

    Thanks for those follow-ups.  I reviewed, and checked all, without success still.  Kind of sinking a lot of time on this, so any additional suggestions would be appreciated.  As note, I can run the makefile commands on Cygwin without issue, using standard make.  It's when CCS and its version of gmake comes into play, that things error out.  That happens whether called as part of the CCS build, or done in an external command window.

    Robert

  • Robert Wolfe said:
    Even if I run the make command from a command window, explicitly spelling out the gmake path (c:\ti\ccsv7\utils\bin\gmake), I get the same error.  I don't think it is path related, although I did put that path at the front of my system PATH environmental variable (with no change in error).

    It is not necessarily that first gmake call but subsequent calls made "under the hood" to gmake and other related utilities that can cause a problem. Sometimes the wrong utility gets picked up depending on the customer's environment. Hence the suggestion to clear the system PATH to make it as minimal as possible and then try again.

  • I was able to resolve this, via a combination of path adjustment and permission changes.  For the latter, specifically, any batch file called from CCS as a pre or post-build step, needed its permissions changed to 760 (rwxrw----), from the default 660 (rw-rw----) of the initial Cygwin Git clone of the repository.

    Thanks,

    Robert