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.

Linker file issues porting from CCS V3.3 to CCS V4.2

Other Parts Discussed in Thread: CCSTUDIO

Hello,

I have been porting over a project from CCS V3.3 to V4.2 and I am having trouble using my old linker file.

In CCS V4.2:

If I "add" it as a file to the project using a right-click  on the C/C++ projects tab OR if I add it in project properties=>CCS Build=>Linker Command file (which takes a small eternity to complete) the compiler runs through the compilation and then does not recognize the file as a command file and stops the compilation.

Alternatively, if I place it in project properties=>C/C++ Build=>C6000 Compiler=>Command Files I get

>> WARNING: invalid compiler option --l (ignored)

and

>> WARNING: invalid compiler option -tack (ignored)

warnings. It seems it does not recognize either the -l (for link option) or the -stack option. Only one warning shows up in the "problems" tab regarding:

"Invalid project path: Duplicate path entries."

and claims:

'Finished building target: Testbed.out'

' '

Build complete for project Testbed

 


Yet no .out file is produced that I can find.


Yet no .out file is produced that I can find.

 

DSP/BIOS 5.41 is being used and it has its auto-produced .cmd file. I'm not sure if that is affecting anything? I was able to use both linker command files together before.

Any thought?

Thanks in advance.

Dan.

 

  • There are two kinds of command files, those for the compiler and those for the linker.  When using the command line, compiler command files must be specified on the command line to the left of any "-z" option, and linker command files must be specified to the right of any "-z".  You are getting this (serious) warning because your linker command file is being treated as a compiler command file.  I'm sorry, I don't know how to fix the problem inside CCS.

  • Hi Archaeologist,

    Yeah, I am actually using a bone fide compiler command file (*.opt) extension as well. I put the linker (*.cmd) file in the compiler command section since it didn't seem to "take" anywhere else and i figured it was worth a try.

    Below is the (non-editable) command-line text for the linker:

    ***

    -z -m"Testbed.map" --warn_sections -i"C:/Program Files/Texas Instruments/ccsv4/tools/compiler/C6000 Code Generation Tools 7.0.4/lib" -i"C:/Program Files/Texas Instruments/ccsv4/tools/compiler/C6000 Code Generation Tools 7.0.4/include" -i"C:/Program Files/Texas Instruments/bios_5_41_10_36/packages/ti/rtdx/lib/c6000" -i"C:/Program Files/Texas Instruments/bios_5_41_10_36/packages/ti/bios/lib" --reread_libs --rom_model

    ***
    I also tried adding it to project properties=>C6000 Linker=>File Search Path=>"Include a library file or a command file as input" ,  but it still does not recognize the file as linker command file during compilation.
    Dan.
  •  

    OK...

    By using the project properties=>C/C++ Build=>C6000 Linker=>File Search Path=>"Include library file or command file as input"   adding a line using the green "+" button and then using the "file system" option manually directing to each library for each new line I was able to get the libraries included.

    It seems that I can set the -stack and -heap options in project properties=>C/C++ Build=>C6000 Linker=>Basic Options

    So the only portion I can't find an equivalent GUI entry for is my SECTIONs part. I only have two custom sections as the rest is in the DSP/BIOS command file, but somehow I need to place:

    ***

    SECTIONS
    {

       .Lattice      > L3_CBA_RAM ALIGN (8)
       .LatticeL2      > IRAM ALIGN (8)
    }

    ***

    Any thoughts?

    Dan.

     

     

  •  

    I found that if I put the SECTIONS text into the DSP/BIOS generated command file then everything works OK. However every time a re-build occurs it will overwrite the old DSP/BIOS-generated .cmd file. So any help in this area would be great.

     

    Thanks.

  • Dan,

    You can simply create an additional linker CMD file with the desired sections and add it to your project. CCS will pick it up when building your code. 

    custom.cmd said:

     

    /* Supplemental linker command file for custom memory sections */

    SECTIONS

    {

    .Lattice    > L3_CBA_RAM ALIGN (8)

    .LatticeL2  > IRAM ALIGN (8)

    }

     

    Hope this helps,

    Rafael

     

     

  • Hello Desouza,

    If you look back at the beginning of this problem I have been unable to add a .cmd file to the project. No matter how I try adding it, the project will not acknowledge it as a valid file.

     

    Dan.

     

  • Dan,

    Can you add the custom linker command file to the project by rgiht-clicking on project name and choosing Add Files, then capture a screenshot of the C/C++ Projects view in CCS and attach it here? Also please post the complete output of the build console after adding this linker command file to the project.

  • Hi Aarti,

    The command file is called "SECTS_ONLY.cmd" and was added as you mentioned. Below is the output. You can see near the bottom that it does not accept the CMD file.

    I'm not sure how to attach a screen shot on this website. I tried pasting it below with no luck.

     

    **** Build of configuration C6748 for project Testbed ****

     

    C:\Program Files\Texas Instruments\ccsv4\utils\gmake\gmake -k all

    'Building file: ../C6748_128M_RAM.TCF'

    'Invoking: TConf Script Compiler'

    "C:/Program Files/Texas Instruments/xdctools_3_20_08_88/tconf" -b -Dconfig.importPath="C:/Program Files/Texas Instruments/bios_5_41_10_36/packages;" "../C6748_128M_RAM.TCF"

    'Finished building: ../C6748_128M_RAM.TCF'

    ' '

    'Building file: C6748_128M_RAMcfg.s??'

    'Invoking: Compiler'

    "C:/Program Files/Texas Instruments/ccsv4/tools/compiler/C6000 Code Generation Tools 7.0.4/bin/cl6x" --cmd_file="C:\Dan\MODEME\Subsea\Test CCS 4X\MODEM_EMBEDDED\Common\ORE_MODEM.opt" -mv6740 -g --include_path="C:/Program Files/Texas Instruments/ccsv4/tools/compiler/C6000 Code Generation Tools 7.0.4/include" --include_path="C:/Dan/MODEME/Subsea/CCS_4_Projects/Testbed/C6748" --include_path="C:/Program Files/Texas Instruments/bios_5_41_10_36/packages/ti/bios/include" --include_path="C:/Program Files/Texas Instruments/bios_5_41_10_36/packages/ti/rtdx/include/c6000" --diag_warning=225 --preproc_with_compile --preproc_dependency="C6748_128M_RAMcfg.pp" "C6748_128M_RAMcfg.s62"

    'Finished building: C6748_128M_RAMcfg.s??'

    ' '

    'Building file: C6748_128M_RAMcfg_c.c'

    'Invoking: Compiler'

    "C:/Program Files/Texas Instruments/ccsv4/tools/compiler/C6000 Code Generation Tools 7.0.4/bin/cl6x" --cmd_file="C:\Dan\MODEME\Subsea\Test CCS 4X\MODEM_EMBEDDED\Common\ORE_MODEM.opt" -mv6740 -g --include_path="C:/Program Files/Texas Instruments/ccsv4/tools/compiler/C6000 Code Generation Tools 7.0.4/include" --include_path="C:/Dan/MODEME/Subsea/CCS_4_Projects/Testbed/C6748" --include_path="C:/Program Files/Texas Instruments/bios_5_41_10_36/packages/ti/bios/include" --include_path="C:/Program Files/Texas Instruments/bios_5_41_10_36/packages/ti/rtdx/include/c6000" --diag_warning=225 --preproc_with_compile --preproc_dependency="C6748_128M_RAMcfg_c.pp" "C6748_128M_RAMcfg_c.c"

    <Optimizing>

    <Generating>

    <Assembling>

    'Finished building: C6748_128M_RAMcfg_c.c'

    ' '

    'Building file: ../ORE_MODEM_C6748.cpp'

    'Invoking: Compiler'

    "C:/Program Files/Texas Instruments/ccsv4/tools/compiler/C6000 Code Generation Tools 7.0.4/bin/cl6x" --cmd_file="C:\Dan\MODEME\Subsea\Test CCS 4X\MODEM_EMBEDDED\Common\ORE_MODEM.opt" -mv6740 -g --include_path="C:/Program Files/Texas Instruments/ccsv4/tools/compiler/C6000 Code Generation Tools 7.0.4/include" --include_path="C:/Dan/MODEME/Subsea/CCS_4_Projects/Testbed/C6748" --include_path="C:/Program Files/Texas Instruments/bios_5_41_10_36/packages/ti/bios/include" --include_path="C:/Program Files/Texas Instruments/bios_5_41_10_36/packages/ti/rtdx/include/c6000" --diag_warning=225 --preproc_with_compile --preproc_dependency="ORE_MODEM_C6748.pp" "../ORE_MODEM_C6748.cpp"

    "../ORE_MODEM_C6748.cpp", line 320: warning #179-D: variable "val" was declared but never referenced

    "../ORE_MODEM_C6748.cpp", line 358: warning #552-D: variable "decode_params_struct" was set but never used

    "../ORE_MODEM_C6748.cpp", line 588: warning #179-D: variable "i" was declared but never referenced

    "../ORE_MODEM_C6748.cpp", line 594: warning #179-D: variable "results" was declared but never referenced

    "../ORE_MODEM_C6748.cpp", line 70: warning #552-D: variable "t3" was set but never used

    <Optimizing>

    <Generating>

    <Assembling>

    'Finished building: ../ORE_MODEM_C6748.cpp'

    ' '

    'Building target: Testbed.out'

    'Invoking: Linker'

    "C:/Program Files/Texas Instruments/ccsv4/tools/compiler/C6000 Code Generation Tools 7.0.4/bin/cl6x" --cmd_file="C:\Dan\MODEME\Subsea\Test CCS 4X\MODEM_EMBEDDED\Common\ORE_MODEM.opt" -mv6740 -g --diag_warning=225 -z -m"Testbed.map" --stack_size=0x800 --heap_size=0x800 --warn_sections -i"C:/Program Files/Texas Instruments/ccsv4/tools/compiler/C6000 Code Generation Tools 7.0.4/lib" -i"C:/Program Files/Texas Instruments/ccsv4/tools/compiler/C6000 Code Generation Tools 7.0.4/include" -i"C:/Program Files/Texas Instruments/bios_5_41_10_36/packages/ti/rtdx/lib/c6000" -i"C:/Program Files/Texas Instruments/bios_5_41_10_36/packages/ti/bios/lib" --reread_libs --rom_model -o "Testbed.out" -l"./C6748_128M_RAMcfg.cmd" "./ORE_MODEM_C6748.obj" "./C6748_128M_RAMcfg_c.obj" "./C6748_128M_RAMcfg.obj" -l"libc.a" -l"C:\CCStudio_v3.3\C6000\cgtools\lib\rts64plus.lib" -l"C:\Dan\MODEME\Subsea\CCS_4_Projects\BSL_LIB\C6748\BSL_LIB.lib" -l"C:\c67xmathlib_2_01_00_00\lib\C674xfastMath.lib" -l"C:\Dan\MODEME\Subsea\CCS_4_Projects\RCV_IO\C6748\RCV_IO.lib" -l"C:\Dan\MODEME\Subsea\CCS_4_Projects\RCV\C6748\RCV.lib" -l"C:\Dan\MODEME\Subsea\CCS_4_Projects\TX_IO\C6748\TX_IO.lib" -l"C:\Dan\MODEME\Subsea\CCS_4_Projects\LIB_PCL\C6748\LIB_PCL.lib" -l"C:\Dan\MODEME\Subsea\CCS_4_Projects\Dragonfly\C6748\Dragonfly.lib" -l"C:\Dan\MODEME\Subsea\CCS_4_Projects\TX\C6748\TX_LIB.lib" -l"C:\Dan\MODEME\Subsea\Test CCS 4X\MODEM_EMBEDDED\Common\Siglib\C6x_lib\SIGLIB_C6748.lib" "../SECTS_ONLY.cmd"

    <Linking>

    "C:\\DOCUME~1\\BISHOP~1.EDG\\LOCALS~1\\Temp\\032123", line 38: fatal error:

    unrecognized file: "../SECTS_ONLY.cmd"

     

    >> Compilation failure

    gmake: *** [Testbed.out] Error 1

    gmake: Target `all' not remade because of errors.

    Build complete for project Testbed

     

    Screen Shot:

     

     

     

  • Dan,

    I've been trying to create a similar environment but I can't duplicate the linker error. Are you able to attach your project here, or if you cannot post it to a public forum, can you send it to me via private conversation? If you can, please export your project per the procedure described here: http://processors.wiki.ti.com/index.php/Project_Sharing