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 is broken: xdc.cfg.SourceDir : Build of generated source libraries failed: exit status = 2:



After a few months away, and after a CCS update,  my project no longer builds. 

SourceDir.xs throws exit status=2.

Which tells me almost nothing, but the console says:

"C:\\ti\\ccsv6\\utils\\bin\\gmake" -k all 
making ../src/driverlib/driverlib.lib ...
gmake[1]: Entering directory `C:/tsiprism/Pass4G/Design/Software/workspace6/Pass4/src/driverlib'
cle430X C:/ti/msp430/driverlib_2_10_00_09/driverlib/MSP430FR5xx_6xx/adc12_b.c ...
"C:/ti/ccsv6/tools/compiler/ti-cgt-msp430_4.4.3/bin/cl430" --abi=eabi -c --obj_directory=objs/  -vmspx --near_data=none --code_model=large --data_model=restricted --advice:power_severity=suppress -vmspx --abi=eabi --data_model=restricted -O4 --opt_for_speed=2 --use_hw_mpy=F5 --include_path="C:/ti/ccsv6/ccs_base/msp430/include" --include_path="C:/ti/ccsv6/tools/compiler/ti-cgt-msp430_4.4.3/include" --include_path="C:/ti/msp430/driverlib_2_10_00_09" --advice:hw_config=all -g --define=__MSP430FR5969__ --define=__TARGET_IS_DEBUG__ --diag_warning=225 --display_error_number --diag_wrap=off --silicon_errata=CPU21 --silicon_errata=CPU22 --silicon_errata=CPU40 --small_enum --printf_support=minimal --std_lib_func_not_defined   -qq -pdsw225  -D__MSP430FR5969__ -I "C:/ti/ccsv6/tools/compiler/ti-cgt-msp430_4.4.3/include" -I "C:/ti/ccsv6/ccs_base/msp430/include" -I "C:/ti/msp430/driverlib_2_10_00_09" -I "C:/ti/msp430/driverlib_2_10_00_09/driverlib/MSP430FR5xx_6xx" "C:/ti/msp430/driverlib_2_10_00_09/driverlib/MSP430FR5xx_6xx/adc12_b.c"
      0 [main] sh 14040 C:\Program Files\Git\usr\bin\sh.exe: *** fatal error in forked process - fork: can't reserve memory for parent stack 0x600000 - 0x800000, (child has 0x400000 - 0x600000), Win32 error 487
    604 [main] sh 14040 cygwin_exception::open_stackdumpfile: Dumping stack trace to sh.exe.stackdump
      0 [main] sh 7744 fork: child -1 - forked process 14040 died unexpectedly, retry 0, exit code 0x100, errno 11

Notice " C:\Program Files\Git\usr\bin\sh.exe"  

This sh.exe was on the path earlier than the one in "C:\ti\ccsv6\utils\cygwin" and prevented CCS from compiling. Adding CCS to the path earlier fixed it. Shouldn't CCS use an explicit path so as not to be confused with other software on the machine? 

  • Hi Mike,

    Your post has been moved to the CCS Forum as I believe they should be able to provide you with the information that you need.

    Regards,

    David
  • Mike Mitchell1 said:
    This sh.exe was on the path earlier than the one in "C:\ti\ccsv6\utils\cygwin" and prevented CCS from compiling. Adding CCS to the path earlier fixed it. Shouldn't CCS use an explicit path so as not to be confused with other software on the machine? 

    CCS does add its own path, however there is no "automatic" way to ensure that it always appears in the PATH before other software that may have a conflicting sh.exe.

  • But if it requires a specific sh.exe, CCS should use an explicit path that points to it's own copy, and not assume that whatever the machine has will work.  This is also true of make etc. These names are very common. My machine has 5 sh.exe files on it. Very few developers only have one cygwin or eclipse based install on a machine unless they use dedicated VMs. For example Git installs its own, so this problem will occur anytime someone also installs git in the wrong order. I also have 2 versions of CCS that I must keep to support old projects. Without an explicit path, or compatibility testing so that it is irrelevant, this stack is fragile and brittle.