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.

[FAQ] CCS/CCSTUDIO: Project build error: xdc.cfg.SourceDir : Build of generated source libraries failed: exit status = 2:

Tool/software: Code Composer Studio

When building a TI-RTOS based CCS project it fails with the following error:

error: xdc.cfg.SourceDir : Build of generated source libraries failed: exit status = 2:

What is the reason for the error?

  • A couple of different reasons could trigger this type of error.

    1) Whitespaces or non-ASCII characters in paths referenced by the build tools

    This was known to happen with older SYS/BIOS and TI-RTOS versions.

    To avoid the error, make sure that all software packages are installed in paths without spaces, and workspace and project names also do not have spaces or non-ASCII characters.

    2) Cygwin related errors 

    Take a look at the CCS build console for errors prior to the above diagnostic. If the errors are coming from the shell, the problem is likely related to Cygwin (which is supplied with CCS and XDCtools).

    The types of shell errors that could occur are:

    • unable to remap somedll to same address as parent
    • couldn't allocate heap
    • can't reserve memory for stack
    • died waiting for dll loading
    • child -1 - died waiting for longjmp before initialization
    • child state waiting for longjmp
    • STATUS_ACCESS_VIOLATION
    • Resource temporarily unavailable

    To avoid the error, try the solutions described in this CCS Build errors page: 
    http://software-dl.ti.com/ccs/esd/documents/sdto_ccs_build-errors.html#rtsc-diagnostics

    The Cygwin type of errors may also manifest during the automatic library build step. The same solutions described above should help in this situation as well.
    Please check this Mklib page for more information: http://processors.wiki.ti.com/index.php/Mklib#MKS_or_Cygwin_or_gmake_tools_in_your_path