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.

XDCtools and Cygwin paths

Hi,

I'm working with SYS/BIOS on Windows. The default examples use the tool-chain supplied with the CCS:

xs xdc.tools.configuro -c "C:/ti/ccsv5/tools/compiler/gcc-arm-none-eabi-4_7-2012q4" ...

I would like to use a different tool-chain that I have installed under Cygwin (at Cygwin path /usr/arm-none-eabi/bin). I tried

xs xdc.tools.configuro -c "/usr/arm-none-eabi" ...

and

xs xdc.tools.configuro -c "C:/cygwin/usr/arm-none-eabi" ...

The later works, but the former doesn't because xdctools doesn't seem to understand Cygwin paths. Is there a way to make the former work too?

Regards,
Vasili

  • Vasili,
    first I have to state that in the past we had various problems with XDCtools whenever a Cygwin installation was found in PATH, or when a compiler built under Cygwin was used. The cause of these problems was mainly that XDCtools has its own version of Cygwin utilities in XDCtools/bin, which usually doesn't match the version installed by the user. Here is a thread with more details about what happens in such a use case:
    http://www.eclipse.org/forums/index.php?t=msg&th=152071&start=0&S=e354daba09d135def6f299c20307ab0f

    I don't think we have resolved any of the problems mentioned in that thread.

    Now, are you running xs under cygwin's shell? Id on't really know much about Cygwin, but that's the only environment where I would expect both POSIX and Windows paths to work. What's the error message you are getting?

    If you are working on the Windows command line, you can't pass POSIX paths untranslated. You have to use cygpath.

  • Hi Sasha,

    I see. Indeed I have a newer version of Cygwin installed and run all the above mentioned commands from Cygwin shell.

    On the other hand it is strange, since everything works fine when I pass Windows style toolchain path (even for Cygwin built toolchain).

    But when I pass the POSIX style path I get the following error:
    making package.mak (because of package.bld) ...
    js: "C:\TI\xdctools_3_25_02_70\packages\xdc\tools\configuro\template\compiler.opt.xdt", line 57: Error: template generation of 'compiler.opt' failed: Error: /usr/arm-none-eabi/bin/arm-none-eabi-gcc cannot be found. Ensure that rootDir for the A8F target is set correctly in ./config.bld
        "./package.bld", line 52
    xdctools_3_25_02_70\gmake.exe: *** Deleting file `package.mak'
    xdctools_3_25_02_70\gmake.exe: *** No rule to make target `.configuro'.  Stop.
    js: "C:/TI/xdctools_3_25_02_70/packages/xdc/tools/Cmdr.xs", line 51: Error: xdc.tools.configuro: configuration failed due to earlier errors (status = 2); 'linker.cmd' deleted.

    I think I have a theory about it. There are effectively two Cygwin filesystem root directories. One of my Cygwin (@ C:\Cygwin) and the other of XDCtools Cygwin (@ C:\TI\xdctools_3_25_02_70). I think that when running xdc it uses the second location and thus doesn't find the toolchain.

    Now I have no idea of how to solve this...

    Maybe there is a way to remove all Cygwin stuff provided with XDCtools and make it use my Cygwin?

    Best,
    Vasili

  • Vasili,
    we don't really test XDCtools under Cygwin, so you are in an uncharted territory. But, this particular error can be explained. In many cases, files are found in XDCtools using java.io classes from JVM, which is installed under XDCtools/jre. JVM can't translate Cygwin paths, so it can't find files if their paths are passed as POSIX paths. When you pass Windows paths, everything works. 

  • From Cygwin FAQ Q4.19, Q4.20, Q4.22:

    1. "The directory the Cygwin DLL resides in treated as /bin, the parent directory as /'"
      Thus, existence of several Cygwin DLLs leads to problems in my case.
    2. "...clean separation requires that you don't try to run executables of one Cygwin installation from processes running in another Cygwin installation"
    3. "For the user's convenience, and to avoid potential problems which still can occur, consider to integrate your product with an already existing Cygwin installation on the user's machine, or, if there is none, consider to install the official Cygwin distro on behalf of the user and integrate your tools from there."
    4. "Remember that the Cygwin DLL strives to be backwards compatible so a newer version of the DLL should always work with older executables"

    Basing on the above, I think the only solution here is integrating the XDCtools with my existing Cygwin installation - which I'll try to do. Due to item 4 above it is supposed to be version compatible and work (hopefully). I'll update you on the results.

  • Ok, I see it is impossible without rebuilding some tools like (e.g. xdc). I won't try it now.

    However, I strongly suggest TI to fix this issue by following the above recommendations in Cygwin FAQ.
    The solution is to change the installer so that XDCtools are integrated with Cygwin installation if one already exists.