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.

How do you compile examples with CCS?

Other Parts Discussed in Thread: CC2640

Hi,


I'm trying to compile some examples from the latest version of BLE stack and TI-RTOS. None of them compile. Here is the build log:

**** Build of configuration Debug for project empty_CC2650DK_7ID_TI_CC2650F128 ****

"C:\\ti\\ccsv6\\utils\\bin\\gmake" -k all 
'Building file: ../empty.cfg'
'Invoking: XDCtools'
"C:/ti/xdctools_3_32_00_06_core/xs" --xdcpath="C:/ti/tirtos_cc13xx_cc26xx_2_18_00_03/packages;C:/ti/tirtos_cc13xx_cc26xx_2_18_00_03/products/tidrivers_cc13xx_cc26xx_2_16_01_13/packages;C:/ti/tirtos_cc13xx_cc26xx_2_18_00_03/products/bios_6_45_02_31/packages;C:/ti/tirtos_cc13xx_cc26xx_2_18_00_03/products/uia_2_00_05_50/packages;C:/ti/ccsv6/ccs_base;" xdc.tools.configuro -o configPkg -t ti.targets.arm.elf.M3 -p ti.platforms.simplelink:CC2650F128 -r release -c "C:/ti/ccsv6/tools/compiler/arm_15.12.2.LTS" --compileOptions "-mv7M3 --code_state=16 --float_support=vfplib -me --include_path=\"C:/Users/IEUser/workspace_v6_1_3/empty_CC2650DK_7ID_TI_CC2650F128\" --include_path=\"C:/ti/tirtos_cc13xx_cc26xx_2_18_00_03/products/cc26xxware_2_23_03_17162\" --include_path=\"C:/ti/ccsv6/tools/compiler/arm_15.12.2.LTS/include\" -g --define=ccs --diag_warning=225 --diag_warning=255 --display_error_number --diag_wrap=off --gen_func_subsections=on --abi=eabi  " "../empty.cfg"
making package.mak (because of package.bld) ...
generating interfaces for package configPkg (because package/package.xdc.inc is older than package.xdc) ...
configuring empty.xem3 from package/cfg/empty_pem3.cfg ...
generating custom ROM library makefile ... 
Starting build of library sources ...
making C:/Users/IEUser/workspace_v6_1_3/empty_CC2650DK_7ID_TI_CC2650F128/src/sysbios/rom_sysbios.aem3 ...
gmake[1]: Entering directory `C:/Users/IEUser/workspace_v6_1_3/empty_CC2650DK_7ID_TI_CC2650F128/src/sysbios'
clem3 C:/ti/tirtos_cc13xx_cc26xx_2_18_00_03/products/bios_6_45_02_31/packages/ti/sysbios/BIOS.c ...
gmake[1]: Leaving directory `C:/Users/IEUser/workspace_v6_1_3/empty_CC2650DK_7ID_TI_CC2650F128/src/sysbios'
Build of libraries failed.
      5 [main] sh 2304 C:\Program Files\OpenSSH\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
   3097 [main] sh 2304 cygwin_exception::open_stackdumpfile: Dumping stack trace to sh.exe.stackdump
      5 [main] sh 1728 fork: child -1 - forked process 2304 died unexpectedly, retry 0, exit code 0x100, errno 11
C:/Users/IEUser/AppData/Local/Temp/make3128-1.sh: fork: retry: Resource temporarily unavailable
1018203 [main] sh 4400 C:\Program Files\OpenSSH\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
1018991 [main] sh 4400 cygwin_exception::open_stackdumpfile: Dumping stack trace to sh.exe.stackdump
1056217 [main] sh 1728 fork: child -1 - forked process 4400 died unexpectedly, retry 0, exit code 0x100, errno 11
C:/Users/IEUser/AppData/Local/Temp/make3128-1.sh: fork: retry: Resource temporarily unavailable
3066321 [main] sh 5136 C:\Program Files\OpenSSH\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
3068146 [main] sh 5136 cygwin_exception::open_stackdumpfile: Dumping stack trace to sh.exe.stackdump
3166862 [main] sh 1728 fork: child -1 - forked process 5136 died unexpectedly, retry 0, exit code 0x100, errno 11
C:/Users/IEUser/AppData/Local/Temp/make3128-1.sh: fork: retry: Resource temporarily unavailable
7174737 [main] sh 5300 C:\Program Files\OpenSSH\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
7175427 [main] sh 5300 cygwin_exception::open_stackdumpfile: Dumping stack trace to sh.exe.stackdump
7218494 [main] sh 1728 fork: child -1 - forked process 5300 died unexpectedly, retry 0, exit code 0x100, errno 11
C:/Users/IEUser/AppData/Local/Temp/make3128-1.sh: fork: retry: Resource temporarily unavailable
15225513 [main] sh 5612 C:\Program Files\OpenSSH\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
15226365 [main] sh 5612 cygwin_exception::open_stackdumpfile: Dumping stack trace to sh.exe.stackdump
15267581 [main] sh 1728 fork: child -1 - forked process 5612 died unexpectedly, retry 0, exit code 0x100, errno 11
C:/Users/IEUser/AppData/Local/Temp/make3128-1.sh: fork: Resource temporarily unavailable
gmake[1]: *** [rom_sysbios.obj] Error 254
gmake: *** [C:/Users/IEUser/workspace_v6_1_3/empty_CC2650DK_7ID_TI_CC2650F128/src/sysbios/rom_sysbios.aem3] Error 2
error: xdc.cfg.SourceDir: "C:/ti/xdctools_3_32_00_06_core/packages/xdc/cfg/SourceDir.xs", line 209: xdc.cfg.SourceDir : Build of generated source libraries failed: exit status = 2:

js: "C:/ti/xdctools_3_32_00_06_core/packages/xdc/cfg/Main.xs", line 160: Error: Configuration failed!
gmake.exe: *** [package/cfg/empty_pem3.xdl] Error 1
gmake.exe: *** Deleting file `package/cfg/empty_pem3.xdl'
gmake.exe: *** [package/cfg/empty_pem3.xdl] Deleting file `package/cfg/empty_pem3.h'
gmake.exe: *** [package/cfg/empty_pem3.xdl] Deleting file `package/cfg/empty_pem3.c'
js: "C:/ti/xdctools_3_32_00_06_core/packages/xdc/tools/Cmdr.xs", line 51: Error: xdc.tools.configuro: configuration failed due to earlier errors (status = 2); 'linker.cmd' deleted.
gmake: *** No rule to make target 'configPkg/linker.cmd', needed by 'configPkg/compiler.opt'.
gmake: *** No rule to make target 'configPkg/linker.cmd', needed by 'configPkg/compiler.opt'.
gmake: *** No rule to make target 'configPkg/linker.cmd', needed by 'configPkg/compiler.opt'.
gmake: Target 'all' not remade because of errors.

**** Build Finished ****

The relevant message seems to be this: "fatal error in forked process - fork: can't reserve memory for parent stack",
 however I have more than enough free memory available.


What am I doing wrong?

  • Try to refer to section 2.6.3 Code Composer Studio in CC2640 BLE Develop's Guide.
  • Looks like this was a Windows 10 problem. I created a Windows 7 virtual machine, installed CCS and the BLE SDK in that, and I'm no longer getting this error. :)

    Note to TI: please fix the SDK so that it works under Windows 10.
  • Looks like it still isn't perfect yet. I'm trying to build the simple BLE peripheral example, but I'm getting an error when it's trying to link the simple_peripheral_cc2650em_stack. Here is the build log:

    **** Build of configuration FlashROM for project simple_peripheral_cc2650em_stack ****
    
    "C:\\ti\\ccsv6\\utils\\bin\\gmake" -k -j 2 all -O 
    "C:/ti/simplelink/ble_sdk_2_02_00_31/examples/cc2650em/simple_peripheral/ccs/stack/../../iar/stack/../../../../../tools/lib_search/lib_search.exe" C:/ti/simplelink/ble_sdk_2_02_00_31/examples/cc2650em/simple_peripheral/ccs/stack/../../iar/stack/build_config.opt "C:/ti/simplelink/ble_sdk_2_02_00_31/examples/cc2650em/simple_peripheral/ccs/stack/../../iar/stack/../../../../../tools/lib_search/params_split_cc2640.xml" C:/ti/simplelink/ble_sdk_2_02_00_31/examples/cc2650em/simple_peripheral/ccs/stack/../../iar/stack/../../../../../src/../blelib "C:/ti/simplelink/ble_sdk_2_02_00_31/examples/cc2650em/simple_peripheral/ccs/stack/../../iar/stack/../../ccs/config/lib_linker.cmd"
    <<< Using Library: host_pxxx.a >>>
    <<< Using Library: cc2640_ctrl_pxxx.a >>>
    <<< Using Library: cc26xx_hci_tl_none.a >>>
    <<< Not Modifying lib_linker.cmd. Stack configurations have not changed. >>>
    ' '
    'Building target: simple_peripheral_cc2650em_stack.out'
    'Invoking: ARM Linker'
    "C:/ti/ccsv6/tools/compiler/ti-cgt-arm_15.12.1.LTS/bin/armcl" --cmd_file="C:/ti/simplelink/ble_sdk_2_02_00_31/examples/cc2650em/simple_peripheral/ccs/stack/../../iar/stack/../../../../../src/config/build_components.opt" --cmd_file="C:/ti/simplelink/ble_sdk_2_02_00_31/examples/cc2650em/simple_peripheral/ccs/stack/../../iar/stack/build_config.opt"  -mv7M3 --code_state=16 --abi=eabi -me -O4 --opt_for_speed=0 --c99 --define=USE_ICALL --define=OSAL_SNV=1 --define=FLASH_ROM_BUILD --define=POWER_SAVING --define=GATT_NO_CLIENT --define=INCLUDE_AES_DECRYPT --define=xPM_DISABLE_PWRDOWN --define=xTESTMODES --define=xTEST_BLEBOARD --define=OSAL_CBTIMER_NUM_TASKS=1 --define=xDEBUG --define=EXT_HAL_ASSERT --define=xDEBUG_GPIO --define=xDEBUG_ENC --define=xDEBUG_SW_TRACE --define=NEAR_FUNC= --define=DATA= --define=CC26XXWARE --define=CC26XX --diag_wrap=off --diag_suppress=48 --diag_suppress=16004 --diag_warning=225 --display_error_number -z -m"simple_peripheral_cc2650em_stack.map" --heap_size=0 --stack_size=256 -i"C:/ti/ccsv6/tools/compiler/ti-cgt-arm_15.12.1.LTS/lib" -i"C:/ti/ccsv6/tools/compiler/ti-cgt-arm_15.12.1.LTS/include" --reread_libs --display_error_number --diag_suppress=16002-D --diag_suppress=10247-D --diag_suppress=10325-D --diag_suppress=10229-D --diag_wrap=off --warn_sections --xml_link_info="simple_peripheral_cc2650em_stack_linkInfo.xml" --entry_point=startup_entry --rom_model --unused_section_elimination=on --compress_dwarf=on -o "simple_peripheral_cc2650em_stack.out" "C:/ti/simplelink/ble_sdk_2_02_00_31/examples/cc2650em/simple_peripheral/ccs/config/ccs_linker_defines.cmd" "./HAL/Common/hal_assert.obj" "./HAL/Target/CC2650/Drivers/hal_flash_wrapper.obj" "./HAL/Target/CC2650/Drivers/hal_rtc_wrapper.obj" "./HAL/Target/CC2650/Drivers/hal_trng_wrapper.obj" "./HAL/Target/CC2650/_common/mb_patch.obj" "./ICallBLE/ble_dispatch.obj" "./NPI/npi.obj" "./OSAL/osal.obj" "./OSAL/osal_bufmgr.obj" "./OSAL/osal_cbtimer.obj" "./OSAL/osal_clock.obj" "./OSAL/osal_memory_icall.obj" "./OSAL/osal_pwrmgr.obj" "./OSAL/osal_snv_wrapper.obj" "./OSAL/osal_timers.obj" "./PROFILES/gap.obj" "./PROFILES/gapbondmgr.obj" "./PROFILES/gattservapp_util.obj" "./Startup/ble_user_config.obj" "./Startup/common_rom_init.obj" "./Startup/icall_startup.obj" "./Startup/osal_icall_ble.obj" "./Startup/rom_init.obj" "./TOOLS/onboard.obj" "C:/ti/simplelink/ble_sdk_2_02_00_31/examples/cc2650em/simple_peripheral/ccs/config/lib_linker.cmd" "C:/ti/simplelink/ble_sdk_2_02_00_31/src/common/cc26xx/ccs/cc26xx_stack.cmd"  -llibc.a -l"C:/ti/simplelink/ble_sdk_2_02_00_31/examples/cc2650em/simple_peripheral/ccs/config/lib_linker.cmd" -l"C:/ti/simplelink/ble_sdk_2_02_00_31/src/rom/enc_lib/cc26xx_ecc_rom_api.a" -l"C:/ti/simplelink/ble_sdk_2_02_00_31/src/rom/ble_rom_releases/04242014/ble_rom_patch.symbols" -l"C:/ti/tirtos_cc13xx_cc26xx_2_18_00_03/products/cc26xxware_2_23_03_17162/driverlib/bin/ccs/driverlib.lib" 
    <Linking>
    gmake[1]: warning: -jN forced in submake: disabling jobserver mode.
    
    >> Compilation failure
    makefile:192: recipe for target 'simple_peripheral_cc2650em_stack.out' failed
    makefile:184: recipe for target 'all' failed
    
    INTERNAL ERROR: C:\ti\ccsv6\tools\compiler\ti-cgt-arm_15.12.1.LTS\bin\armlnk.exe experienced an unhandled exception
    
    This is caused by a defect in the compiler itself. TI Customer
    Support may be able to suggest a workaround to avoid this.
    
    Upgrading to the newest version of the compiler may fix this problem.
    
    Contact TI in the E2E support forums at http://e2e.ti.com under
    "Development Tools", "TI C/C++ Compiler". See the link titled
    "Submitting an issue". Include this ENTIRE error message and a
    copy of the .pp file created when option --preproc_with_comment
    (-ppc) is used.
    
    gmake[1]: *** [simple_peripheral_cc2650em_stack.out] Error 1
    gmake[1]: Target 'main-build' not remade because of errors.
    gmake: *** [all] Error 2
    
    **** Build Finished ****
    

    The relevant part seems to be this line:

    INTERNAL ERROR: C:\ti\ccsv6\tools\compiler\ti-cgt-arm_15.12.1.LTS\bin\armlnk.exe experienced an unhandled exception

    Any idea what I could do with it?
    Thanks in advance!

  • I run CCS6.1.3 on Windows 10 of my notebook and I don't see this problem. Which CCS version do you use?
  • Both of these are virtual machines.

    On the first machine, I've got:
    - Windows 10 evaluation, version 1511 (build 10586)
    - Code Composer Studio, version: 6.1.3.00033
    - BLE stack 2.2

    On the other one:
    - Windows 7 evaluation
    - Code Composer Studio, version: 6.1.3.00033
    - BLE stack 2.2
  • Do you install TI ARM compiler in CCS package?
  • Oh my... installing the TI compile v5.2.7 and manually selecting it for the project solved the issues for both machines. Thank you for suggesting that!
  • You are welcome.
  • FYI - the build issue with v15.12.2.LTS compiler is now fixed with the v15.12.3.LTS update. You can run the Check for New SW option in CCS to update to the latest version.

    Best wishes
  • Thanks! To be honest, this versioning scheme is a bit confusing. Which version is the newer, v5.2.7 or the v15.12.3? Which one should I prefer to use?