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/66AK2H12: Location of intermediate files and out file

Part Number: 66AK2H12
Other Parts Discussed in Thread: SYSBIOS

Tool/software: Code Composer Studio

Hi

I am using code composer 6 (6.1.3 but i can upgrade if necessary)

I have a c66 executable project and i am using "Generate Makefiles automatically"

The intermediate files are created in two places

1. ProjectDirectory / ConfigurationDirectory  where project directory is the location of the .ccsproject file

2. Next to the cfg file a src/sysbios folder with sysbios.ae66 is created

I would like to direct all intermediate files and out file to directories of my choice.

How can I do this?

I only managed to redirect the .lst and .d files using the directory specifier

Shiran

  • Shiran,

    For redirecting the SYS/BIOS 'src' directory, please see this FAQ.

    For the .out file, you can specify a custom directory directly in the --output_file option in CCS. 

  • It helped but not completely.

    If in project properties ->Build -> C6000 Compiler -> Advanced Options -> Directory Specifier I set everything other than "Compilation output file name". It compiles but in the old folder I am still let with:

    If I try to set "Compilation output file name" to a specific file c:\temp\out\TestProjectLocation.out I get the following error:

    What can I do to move everything from under Debug folder to another folder?

    Sincerely

    Shiran

  • Shiran Ben Israel said:
    If I try to set "Compilation output file name" to a specific file c:\temp\out\TestProjectLocation.out I get the following error:

    I would expect this to work fine the way you have it specified. Even if other compiler generated files go into the default directory, you should still be able to specify a custom location for the .out file. Could you copy the full output of the CCS build console to a text file and attach it here for us to look at? 

    Just FYI, to put your object files (.obj) in a custom directory, you would need to change the Mode from "automatic" to "manual" as in the screenshot below. Then the option to specify object file directory becomes available, until then it is grayed out.

  • Attached is the error output

    **** Build of configuration Debug for project TestProjectLocation ****
    
    "C:\\ti\\ccsv6\\utils\\bin\\gmake" -k all 
    'Building file: ../app.cfg'
    'Invoking: XDCtools'
    "C:/ti/xdctools_3_32_00_06_core/xs" --xdcpath="C:/ti/bios_6_46_00_23/packages;C:/ti/pdk_keystone2_3_01_04_07/packages;C:/ti/ccsv6/ccs_base;" xdc.tools.configuro -o configPkg -t ti.targets.elf.C66 -p ti.platforms.evmTCI6636K2H -r release -c "C:/ti/ccsv6/tools/compiler/c6000_7.4.18" --compileOptions "-g --optimize_with_debug" -v "../app.cfg"
    #
    # making package.mak (because of package.bld) ...
    C:/ti/xdctools_3_32_00_06_core/xs  -Dxdc.path="C:/ti/bios_6_46_00_23/packages;C:/ti/pdk_keystone2_3_01_04_07/packages;C:/ti/ccsv6/ccs_base;C:/ti/xdctools_3_32_00_06_core/packages;.." -Dxdc.root=C:/ti/xdctools_3_32_00_06_core -Dxdc.hostOS=Windows -Dconfig.importPath=".;C:/ti/bios_6_46_00_23/packages;C:/ti/pdk_keystone2_3_01_04_07/packages;C:/ti/ccsv6/ccs_base;C:/ti/xdctools_3_32_00_06_core/packages;..;C:/ti/xdctools_3_32_00_06_core;C:/ti/xdctools_3_32_00_06_core/etc" -Dxdc.bld.targets="" -DTOOLS=   -f C:/ti/xdctools_3_32_00_06_core/packages/xdc/bld/bld.js ./config.bld package.bld package.mak 
    #
    # generating interfaces for package configPkg (because package/package.xdc.inc is older than package.xdc) ...
    C:/ti/xdctools_3_32_00_06_core/xs -Dxdc.path="C:/ti/bios_6_46_00_23/packages;C:/ti/pdk_keystone2_3_01_04_07/packages;C:/ti/ccsv6/ccs_base;C:/ti/xdctools_3_32_00_06_core/packages;.." -Dxdc.root=C:/ti/xdctools_3_32_00_06_core -Dxdc.hostOS=Windows -Dconfig.importPath=".;C:/ti/bios_6_46_00_23/packages;C:/ti/pdk_keystone2_3_01_04_07/packages;C:/ti/ccsv6/ccs_base;C:/ti/xdctools_3_32_00_06_core/packages;..;C:/ti/xdctools_3_32_00_06_core;C:/ti/xdctools_3_32_00_06_core/etc" -Dxdc.bld.targets="" -DTOOLS=  -f xdc/services/intern/cmd/build.xs  -m package/package.xdc.dep -i package/package.xdc.inc package.xdc
    #
    # configuring app.xe66 from package/cfg/app_pe66.cfg ...
    C:/ti/xdctools_3_32_00_06_core/xs -Dxdc.path="C:/ti/bios_6_46_00_23/packages;C:/ti/pdk_keystone2_3_01_04_07/packages;C:/ti/ccsv6/ccs_base;C:/ti/xdctools_3_32_00_06_core/packages;.." -Dxdc.root=C:/ti/xdctools_3_32_00_06_core -Dxdc.hostOS=Windows -Dconfig.importPath=".;C:/ti/bios_6_46_00_23/packages;C:/ti/pdk_keystone2_3_01_04_07/packages;C:/ti/ccsv6/ccs_base;C:/ti/xdctools_3_32_00_06_core/packages;..;C:/ti/xdctools_3_32_00_06_core;C:/ti/xdctools_3_32_00_06_core/etc" -Dxdc.bld.targets="" -DTOOLS=   xdc.cfg app.xe66 package/cfg/app_pe66.cfg package/cfg/app_pe66
    generating custom ti.sysbios library makefile ... 
    Starting build of library sources ...
    making c:/Temp/libs/sysbios/sysbios.ae66 ...
    gmake[1]: Entering directory `c:/Temp/libs/sysbios'
    cle66 C:/ti/bios_6_46_00_23/packages/ti/sysbios/BIOS.c ...
    asme66 C:/ti/bios_6_46_00_23/packages/ti/sysbios/family/c64p/Exception_asm.s64P ...
    asme66 C:/ti/bios_6_46_00_23/packages/ti/sysbios/family/c64p/Hwi_asm.s62 ...
    asme66 C:/ti/bios_6_46_00_23/packages/ti/sysbios/family/c64p/Hwi_asm_switch.s62 ...
    asme66 C:/ti/bios_6_46_00_23/packages/ti/sysbios/family/c64p/Hwi_disp_always.s64P ...
    asme66 C:/ti/bios_6_46_00_23/packages/ti/sysbios/rts/ti/tls_get_tp.asm ...
    asme66 C:/ti/bios_6_46_00_23/packages/ti/sysbios/family/c62/TaskSupport_asm.s62 ...
    asme66 C:/ti/bios_6_46_00_23/packages/ti/sysbios/timers/timer64/Timer_asm.s64P ...
    are66 BIOS.obj c64p_Exception_asm.obj c64p_Hwi_asm.obj c64p_Hwi_asm_switch.obj c64p_Hwi_disp_always.obj ti_tls_get_tp.obj c62_TaskSupport_asm.obj timer64_Timer_asm.obj ...
    gmake[1]: Leaving directory `c:/Temp/libs/sysbios'
    Build of libraries done.
    C:/ti/xdctools_3_32_00_06_core/bin/sed 's"^\"\(package/cfg/app_pe66cfg.cmd\)\""\"D:/Workspace/TestProjectLocation/TestProjectLocation/Debug/configPkg/\1\""' package/cfg/app_pe66.xdl > linker.cmd
    C:/ti/xdctools_3_32_00_06_core/bin/setdate -r:max package/cfg/app_pe66.h compiler.opt compiler.opt.defs
    C:/ti/xdctools_3_32_00_06_core/bin/rm -f package/cfg/app_pe66.oe66
    #
    # cle66 package/cfg/app_pe66.c ...
    C:/ti/ccsv6/tools/compiler/c6000_7.4.18/bin/cl6x -c  -g --optimize_with_debug -qq -pdsw225 -mo -mv6600 --abi=eabi -eo.oe66 -ea.se66   -Dxdc_cfg__xheader__='"configPkg/package/cfg/app_pe66.h"'  -Dxdc_target_name__=C66 -Dxdc_target_types__=ti/targets/elf/std.h -Dxdc_bld__profile_release -Dxdc_bld__vers_1_0_7_4_18 -O2  -I. -IC:/ti/bios_6_46_00_23/packages -IC:/ti/pdk_keystone2_3_01_04_07/packages -IC:/ti/ccsv6/ccs_base -IC:/ti/xdctools_3_32_00_06_core/packages -I.. -IC:/ti/ccsv6/tools/compiler/c6000_7.4.18/include -fs=./package/cfg -fr=./package/cfg -fc package/cfg/app_pe66.c
    C:/ti/xdctools_3_32_00_06_core/bin/mkdep -a package/cfg/app_pe66.oe66.dep -p package/cfg -s oe66 package/cfg/app_pe66.c -C   -g --optimize_with_debug -qq -pdsw225 -mo -mv6600 --abi=eabi -eo.oe66 -ea.se66   -Dxdc_cfg__xheader__='"configPkg/package/cfg/app_pe66.h"'  -Dxdc_target_name__=C66 -Dxdc_target_types__=ti/targets/elf/std.h -Dxdc_bld__profile_release -Dxdc_bld__vers_1_0_7_4_18 -O2  -I. -IC:/ti/bios_6_46_00_23/packages -IC:/ti/pdk_keystone2_3_01_04_07/packages -IC:/ti/ccsv6/ccs_base -IC:/ti/xdctools_3_32_00_06_core/packages -I.. -IC:/ti/ccsv6/tools/compiler/c6000_7.4.18/include -fs=./package/cfg -fr=./package/cfg
    'Finished building: ../app.cfg'
    ' '
            1 file(s) copied.
    making c:/Temp/libs/sysbios/sysbios.ae66 ...
    gmake[1]: Entering directory 'c:/Temp/libs/sysbios'
    gmake[1]: Nothing to be done for 'all'.
    gmake[1]: Leaving directory 'c:/Temp/libs/sysbios'
    'Building file: ../main.c'
    'Invoking: C6000 Compiler'
    "C:/ti/ccsv6/tools/compiler/c6000_7.4.18/bin/cl6x" -mv6600 --abi=eabi -g --include_path="C:/ti/ccsv6/tools/compiler/c6000_7.4.18/include" --diag_wrap=off --diag_warning=225 --display_error_number --output_file="c:/temp/out/TestProjectLocation.out" --list_directory="c:/temp/out" --obj_directory="c:/temp/out" --asm_directory="c:/temp/out" --temp_directory="c:/temp/out" --preproc_with_compile --preproc_dependency="c:/temp/out/main.d" --cmd_file="configPkg/compiler.opt" "../main.c"
    'Finished building: ../main.c'
    ' '
    'Building target: TestProjectLocation.out'
    'Invoking: C6000 Linker'
    "C:/ti/ccsv6/tools/compiler/c6000_7.4.18/bin/cl6x" -mv6600 --abi=eabi -g --diag_wrap=off --diag_warning=225 --display_error_number --output_file="c:/temp/out/TestProjectLocation.out" --list_directory="c:/temp/out" --obj_directory="c:/temp/out" --asm_directory="c:/temp/out" --temp_directory="c:/temp/out" -z -m"TestProjectLocation.map" -i"C:/ti/ccsv6/tools/compiler/c6000_7.4.18/lib" -i"C:/ti/ccsv6/tools/compiler/c6000_7.4.18/include" --reread_libs --diag_wrap=off --display_error_number --warn_sections --xml_link_info="TestProjectLocation_linkInfo.xml" --rom_model -o "TestProjectLocation.out" "c:/temp/out/main.obj" -l"configPkg/linker.cmd" -llibc.a 
    <Linking>
    "C:\\Users\\iplab\\AppData\\Local\\Temp\\2\\063963", line 14: error #10008-D: 
    
       cannot find file "c:/temp/out/main.obj"
    >> Compilation failure
    makefile:139: recipe for target 'TestProjectLocation.out' failed
    
     undefined first referenced                                                          
      symbol       in file                                                               
     --------- ----------------                                                          
     main      C:\ti\ccsv6\tools\compiler\c6000_7.4.18\lib\rts6600_elf.lib<args_main.obj>
    
    error #10234-D: unresolved symbols remain
    error #10010: errors encountered during linking; "TestProjectLocation.out" not built
    gmake: *** [TestProjectLocation.out] Error 1
    gmake: Target 'all' not remade because of errors.
    
    **** Build Finished ****
    

  • Thank you for providing the build output.

    Looking at it, I see that the command passed to the linker looks like this:

    'Invoking: C6000 Linker'
    "C:/ti/ccsv6/tools/compiler/c6000_7.4.18/bin/cl6x" -mv6600 --abi=eabi -g --diag_wrap=off --diag_warning=225 --display_error_number --output_file="c:/temp/out/TestProjectLocation.out" --list_directory="c:/temp/out" --obj_directory="c:/temp/out" --asm_directory="c:/temp/out" --temp_directory="c:/temp/out" -z -m"TestProjectLocation.map" -i"C:/ti/ccsv6/tools/compiler/c6000_7.4.18/lib" -i"C:/ti/ccsv6/tools/compiler/c6000_7.4.18/include" --reread_libs --diag_wrap=off --display_error_number --warn_sections --xml_link_info="TestProjectLocation_linkInfo.xml" --rom_model -o "TestProjectLocation.out" "c:/temp/out/main.obj" -l"configPkg/linker.cmd" -llibc.a

    You are using the compiler --output_file option to specify the name/location of the linker output file, when in fact it should be specified under linker options. Note that both the compiler and linker have this option - the compiler option is for controlling the output of the compile step, the linker option is for controlling the output of the link step. What you want is the latter.

    In CCS, go to Linker->Basic Options and specify the name/location of .out file under the --output_file option there. Then go to Compiler->Advanced Options->Directory Specifier, and delete what you had specified there for --output_file.

    Hope this helps!

  • Hi

    That did help

    I am now back to my quest to move all of the compilation generated files to a different folder

    I am now left with:

    Any ideas on how to move all of these files/folders to a different location?

    Thanks

    Shiran

  • Are you trying to change the location of CCS generated makefiles (makefile, *.mk etc)? If so, unfortunately that is not possible when the project is set to "Generate makefiles automatically". Please see a related thread here.

  • How about .config, configPkg and ccsObjs.opt?
    Are they also part of the generated makefiles that can't be moved?
  • Shiran Ben Israel said:
    How about .config, configPkg and ccsObjs.opt?
    Are they also part of the generated makefiles that can't be moved?

    Yes, these are also generated by CCS as part of the managed build and cannot be redirected. 

    A workaround could be to create a post build step that copies the contents of the \Debug directory to a directory of your choosing and then deletes the original \Debug directory. Note though that the \Debug directory will be re-generated every time you build the project .

  • My solution as i saw in some post on eclipse was to create a symbolic link of Debug folder to another location

    Last file I encountered:
    there is also an .xdchelp file generated next to the project files,
    i understand from processors.wiki.ti.com/.../Source_control_with_CCS that i am not supposed to put it in source control, so is there a way to redirect it to a different folder?
  • Sorry I am not aware of a way to redirect the .xdchelp file to a different folder.