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.

Compile Issue with CCSv4

I have received a sample project from TI for TMS570 DEVICE ID reading.  This need to be converted from a 3.3 project to a version 4 project.  I went through that process and can not get the project to build.  Two colleauges have gone through the same process without issues.

A couple of things that I have tried:

1) uninstalled CCSv4 and re-installed.

2) tried running in Admin mode to make sure there was not folder priveleges that may have been an issue.

I have attached a file that has my build output and the erros that I am getting.

It is looking for an icode file that does not seem to exist.  Has anyone else had a similar issue?

Thanks,

Scott

  • Scott,

    This error might be due to the compiler not being able to create temporary files.

    Try to use the -ft option to specify the temporary file directory.

    You can go to the ccsv4 directory (C:\Program Files\Texas Instruments\ccsv4\tools\compiler\tms470\bin\) to run the cl470.exe in a command line mode to compile c-file to debug this problem.

    In CCS4, to change the temporary directory,  Project -> Properties ->left window choose 'C/C++ Build' -> right window choose tab ' Tool Settings' ->TMS470 Compiler ->Directory Specifier

    The following link has some useful information about a similar error:

    http://e2e.ti.com/support/microcontrollers/tms320c2000_32-bit_real-time_mcus/f/171/p/21684/120638.aspx

    https://savannah.cern.ch/task/?7788#comment8

    Regards,

    Haixiao

     

     

     

  • Haixiao,

    Thank you for the response - but I am still not there yet.  Using the -ft directive did take care of the icode error.  I am not sure why that was necessary since my colleague did not have to make any changes on his machine. 

    Now I am to the point where I am getting this error:

    >> Abort - Cannot open output file \\005163: Invalid argument 

    I did notice in the links that you sent for similar issues that the person there had this same issue but I am really struggling to decode how that issue was fixed.  Seems like the solution was to run the utility outside of the code compser IDE - is that the case?  Do you have more direct instructions on how to get around this issue?

     

    Thanks,

    Scott

  • Scott,

    There are two possibilities: space in the directory name (Should be handled in CCS4 IDE) and directory permission.

    Those files are tempory files and will be deleted after the compile is done. Usually, they are saved in the directory specified by Environment Variables 'TMP' and "TEMP'.

    Can you check the Environment Variables 'TMP' and 'TEMP'? And change them to some directory without space in the name and you have the full control permission.

    Regards,

    Haixiao

  • Haixiao,

     I believe I have done everything in that both links you sent suggested and still am not able to compile.  The one item that I am struggling with are permission, I look at the temp folder and it is checked as read only.  I then uncheck the read only box apply the changes and then go back and look - it still shows read only, but also show I have permissions for full control on that folder.

     

    All in all my colleagues computer seems to be set up identical to mine and he is able to compile fine - the exact project.  My next step will be to have him send me his project and i will put that in a different workspace and try to compile his project.  Do you have any ohter suggestions - we are going to have TMS570 training starting tomorrow for 2 days and I would really like to have this working so I am not spending 1/2 the day trying ot get this running.

    Let me know what you think,

    Thanks,

    Scott

  • Scott Wendling said:
    >> Abort - Cannot open output file \\005163: Invalid argument 

    Scott,

    I've seen that error before, and in that case the cause was that the TMP environment variable is not set. Could you check if that variable is set to a valid path? If it is not, try setting the TMP environment variable in Windows? It's basically another variable that points to your temp folder.

    Thanks

    ki

  • Can someone suggest how to solve this "Abort - Cannot open output file \\005163: Invalid argument " problem. I run out of ideas. My colleagues will be on-site for a training. And they need the CCS for this training. Thanks for your help.

    Regards,

    Haixiao

  • Ki-Soo,

    I have done this and both my windows and system environment variables are pointing to a valid location.  I have also updated my project settings to have a -ft.  I seem to have run out of options here and am completely confused as too why my colleague - whose set up seems to be identical does not have any issues compiling, linking and then programming to the EVM board.  Are there settings in code composer I can compare between his computer and mine to look for differences? I have been through several settings and everything seems to be the same.

     

    Thanks,

    Scott

  • Sorry Scott. As I reread the thread, I see that Haixiao already suggested it and you already tried it.

  • Ki-Soo,

    In one case, CCS 3 reports a similar error after the user 'clean'  the registry. Do you know which registry entry is critical for this?

    Thanks,

    Haixiao

  • I have seen this before.  Yet I have never figured out the root of the problem.  I can offer three options.  Choose the one you think most likely to work.

    Option 1: Add some debug options to the build which cause the compiler to issue lots of information about how the build is proceeding.  Then post what you see here.  We might be able to diagnose the root problem.  The options are: --d --v .  Because they are debug options which are not exposed like the usual options, you have to take a special step.  Bring up the Build Properties window and hand enter the options in the "Command" box.  Here is a picture.

    Option 2: According to this thread, you should re-install CCS.  http://e2e.ti.com/support/development_tools/compiler/int-compiler/f/85/t/4376.aspx .

    Option 3: According to this thread, you should not have any spaces in the path to the temporary directory.  http://e2e.ti.com/support/microcontrollers/tms320c2000_32-bit_real-time_mcus/f/171/t/21684.aspx .  I discount this option myself.  I have spaces in my temporary directory path, and I've never had this problem.

    Thanks and regards,

    -George

  • Thanks George,

    I will try option 1 and post that since I have done Option 2 a couple times and I have dicounted option 3 as well since I have 4 co-workers with spaces and things are working fine as well.

    I am sitting in training with Sunile Oak right now and he also mentioned un-installing and manually cleaning up my registry to then re-install, what are your thoughts on that?

  • George - here is a comparison of a build output that works (Left Side) to a build output that does not (my PC - Right Side).  Not sure if this will help. 

    FYI - I did uninstall and re-install one more time with the same results..

  • Please show me the exact settings of the TEMP and TMP environment variables.

    Thanks and regards,

    -George

     

  • George - could you email me your phone information so I could give you a call directly?  If we can work through this I will be sure to post the solution

  • Here are the User settings:

    TMP = C:\temp1

    TEMP = c:\temp

     

    Here are the system settings:

    Temp = %SystemRoot%\TEMP

    TMP = %SystemRoot%\TEMP

  • I doubt SystemRoot has anything suspicious in it.  But we have to check everything at this point.  Please bring up a DOS shell and post the results from running

    % echo %TMP%
    % echo %TEMP%

    I found out that the compiler shell (cl6x or whatever one you are using) gets the temporary filename by invoking the system function _tempnam like this ...

    _tempnam(NULL, prefix);

    where "prefix" points to a string of 5 digits based on the PID (process identification number assigned by Windows).  Here's is more about that system function  http://msdn.microsoft.com/en-us/library/hs3e7355(VS.80).aspx .  That documentation may not be from the exact version of the MicroSoft compiler we build with, but I think it is close enough for now.  Basically, it gets the temporary directory name from the TMP environment variable.  Otherwise, nothing there looked helpful to me.  But I thought you should have a look too.

    Thanks and regards,

    -George

     

  • George,

    I had run those commands while looking further into this yesterday.  The command returns the value of the enviroment variable:

    so echo %TMP% returns C:\temp1

    and echo %TEMP% returns C:\temp

    I will check out the link that you sent as well.

     

    Thanks,

    Scott

  • Does running the compiler work from the command line?  Please run this experiment and post the results ...

    % type file.c
    int a;
    % "C:\Program Files\Texas Instruments\ccsv4\tools\compiler\c6000\bin\cl6x.exe" --d --v file.c

    Thanks and regards,

    -George

     

  • George -

    I have attached a test.txt file with the results from teh command line run.  Seems to work fine.

  • The compiler for TMS570 should be:

    C:\Program Files\Texas Instruments\ccsv4\tools\compiler\tms470\bin\cl470.exe

    Regards,

    Haixiao

  • I was able to replicate the problem in two different ways and it seems clear that one possible cause is TMP not being set, but there could be others.

    Here is the command line version with 7.0.1 C6000 compiler:
    C:\Documents and Settings\a0868339\My Documents\workspace\idiom_101>C:/PROGRA~1/TEXASI~2/ccsv4/tools/compiler/C6000C~1.1//bin/cl6x -c  -qq -pdsw225 -mv6740 -eo.o674 -ea.s674  -D_DEBUG_=1 -Dxdc_target_name__=C674 -Dxdc_target_types__=ti/targets/std.h -Dxdc_bld__profile_debug -Dxdc_bld__vers_1_0_7_0_1 --symdebug:dwarf  -I. -IC:/PROGRA~1/TEXASI~2/xdctools_3_20_00_34_eng/packages -I.. -IC:/PROGRA~1/TEXASI~2/ccsv4/tools/compiler/C6000C~1.1//include -fs=./package/lib/lib/idiom_101/package -fr=./package/lib/lib/idiom_101/package -fc package/package_idiom_101.c

    C:\Documents and Settings\a0868339\My Documents\workspace\idiom_101>set
    ...
    TMP=C:\DOCUME~1\a0868339\LOCALS~1\Temp
    ...

    C:\Documents and Settings\a0868339\My Documents\workspace\idiom_101>set TMP=

    C:\Documents and Settings\a0868339\My Documents\workspace\idiom_101>C:/PROGRA~1/TEXASI~2/ccsv4/tools/compiler/C6000C~1.1//bin/cl6x -c  -qq -pdsw225 -mv6740 -eo.o674 -ea.s674  -D_DEBUG_=1 -Dxdc_target_name__=C674 -Dxdc_target_types__=ti/targets/std.h -Dxdc_bld__profile_debug -Dxdc_bld__vers_1_0_7_0_1 --symdebug:dwarf -I. -IC:/PROGRA~1/TEXASI~2/xdctools_3_20_00_34_eng/packages -I.. -IC:/PROGRA~1/TEXASI~2/ccsv4/tools/compiler/C6000C~1.1//include -fs=./package/lib/lib/idiom_101/package -fr=./package/lib/lib/idiom_101/package -fc package/package_idiom_101.c
    >> Abort - Cannot open input icode file
    \\074763: Invalid argument

    >> Compilation failure

    And then, here is how to replicate it in CCS 4.1.2, when building a C/C++ Make Project:

    With the configuration above, the build fails. Adding TMP, but still keeping the option "Replace native environment" or checking "Append environment" makes the build succeed. 

  • It has been determined that this is a compiler bug. This bug will occur on Windows if the TMP environment variable is not set properly (meaning it is undefined or has an invalid value). In this case, Windows will return temporary file names in the current root directory (NOTE: the Windows documentation of _tempnam() says it will be in the current working directory, but this is not the case). The file name will have the form of "\12345". Due to how we invoke tools during the compilation process, when the file is passed to a tool, it will look like "\\12345". The double backslashes cause an error because they are used for UNC names on Windows. The bug is that the compiler should not add the second backslash to the file name in this case.

    The bug can be tracked on SDOWP , with the number SDSCM00036499.