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.

DSP/BIOS CMD linker error: "memory range has already been specified"

Other Parts Discussed in Thread: CCSTUDIO

Hi,

I have the following configuration:

Code Composer Studio v4.2

Code Generation Tools v7.3

DSP/BIOS v5.20

Windows 7 64-bit

I'm trying to build a big project, that compiles successfully, but I'm having some problems with the linking process. I have to use a CMD file to specify additional memory sections that were not created with the generated CMD file from running the Tconf script. From the user guide for DSP/BIOS you create you own CMD file and then call the generated file from it. However, with my attempt it appears as though the generate CMD file gets called twice. The command file looks as follow:

/* ---------------------------------------------------*/
/* DSP/BIOS generated command file                    */
/* ---------------------------------------------------*/
 -l "D:\Rapid_Mobile\projects\client-rapidm\product-wp_tc4_ref_sys\make\tc4_rev06\Debug\product-wp_tc4_ref_syscfg.cmd"

/* ---------------------------------------------------*/
/* Additional memory sections not defined by DSP/BIOS */
/* ---------------------------------------------------*/

SECTIONS
{
   .int_data:  {} > IRAM
   .ext_data:  {} > SDRAM_DATA
   .s4538_ext_data:  {
       
        "D:/Rapid_Mobile/projects/client-rapidm/product-wp_tc4_ref_sys/make/tc4_rev06/mod-rm_s4538_arcs_lib/bin/Release_Complete/rm_s4538_arcs_lib.lib"(.bss)
        "D:/Rapid_Mobile/projects/client-rapidm/product-wp_tc4_ref_sys/make/tc4_rev06/mod-rm_s4538_arcs_lib/bin/Release_Complete/rm_s4538_arcs_lib.lib"(.data)
        "D:/Rapid_Mobile/projects/client-rapidm/product-wp_tc4_ref_sys/make/tc4_rev06/mod-rm_s4538_arcs_lib/bin/Release_Complete/rm_s4538_arcs_lib.lib"(.far)
        "D:/Rapid_Mobile/projects/client-rapidm/product-wp_tc4_ref_sys/make/tc4_rev06/mod-rm_s4538_arcs_lib/bin/Release_Complete/rm_s4538_arcs_lib.lib"(.const)
           
    } > SDRAM_DATA

   .ale_2g_ext_data:  {
       
        "D:/Rapid_Mobile/projects/client-rapidm/product-wp_tc4_ref_sys/make/tc4_rev06/mod-rm_ale_2g_lib/bin/Release_Complete/rm_ale_2g_lib.lib"(.bss)
        "D:/Rapid_Mobile/projects/client-rapidm/product-wp_tc4_ref_sys/make/tc4_rev06/mod-rm_ale_2g_lib/bin/Release_Complete/rm_ale_2g_lib.lib"(.data)
        "D:/Rapid_Mobile/projects/client-rapidm/product-wp_tc4_ref_sys/make/tc4_rev06/mod-rm_ale_2g_lib/bin/Release_Complete/rm_ale_2g_lib.lib"(.const)
           
    } > SDRAM_DATA

/*---------------------------------------------------------------*/
/* C++ sections.                                                 */
/*---------------------------------------------------------------*/
   .template:  {} > SDRAM_PROG
}

Upon linking I get the following errors:

'Invoking: Linker'
'Flags: --cmd_file="D:\Rapid_Mobile\projects\client-rapidm\product-wp_tc4_ref_sys\cmd\product-wp_tc4_ref_sys_compiler.cmd" -mv6200 -g -O3 --define=CHIP_6418 --diag_warning=225 --abi=coffabi --opt_for_speed=5 --std_lib_func_not_defined --temp_directory="D:/Rapid_Mobile/projects/client-rapidm/product-wp_tc4_ref_sys/make/tc4_rev06/obj/Release_Complete" --obj_directory="D:/Rapid_Mobile/projects/client-rapidm/product-wp_tc4_ref_sys/make/tc4_rev06/obj/Release_Complete" -z -m"D:/Rapid_Mobile/projects/client-rapidm/product-wp_tc4_ref_sys/make/tc4_rev06/../../bin/tc4_rev06/Release_Complete/product-wp_tc4_rev_06_ref_sys.map" --warn_sections -i"C:/Program Files (x86)/Texas Instruments/C6000 Code Generation Tools 7.3.2/lib" -i"C:/Program Files (x86)/Texas Instruments/C6000 Code Generation Tools 7.3.2/include" -i"C:/Program Files/C6xCSL/lib_3x" -i"D:/Rapid_Mobile/projects/client-rapidm/product-wp_tc4_ref_sys/c6000_lib" -i"C:/CCStudio_v3.3/bios_5_20_03/bios_5_20_03/packages/ti/rtdx/lib/c6000" -i"C:/CCStudio_v3.3/bios_5_20_03/bios_5_20_03/packages/ti/bios/lib" --reread_libs --no_sym_merge --rom_model'
"C:/Program Files (x86)/Texas Instruments/C6000 Code Generation Tools 7.3.2/bin/cl6x" -@"ccsLinker.opt" -o "D:\Rapid_Mobile\projects\client-rapidm\product-wp_tc4_ref_sys\make\tc4_rev06/../../bin/tc4_rev06/Release_Complete/product-wp_tc4_rev_06_ref_sys.out"
<Linking>
"D:/Rapid_Mobile/projects/client-rapidm/product-wp_tc4_ref_sys/cmd/tc4_rev06/product-wp_tc4_ref_sys.cmd", line 1: error:
   cannot find file "ser"
"D:\Rapid_Mobile\projects\client-rapidm\product-wp_tc4_ref_sys\make\tc4_rev06\Debug\product-wp_tc4_ref_syscfg.cmd", line 230: error:
   CACHE_L2 memory range has already been specified
"D:\Rapid_Mobile\projects\client-rapidm\product-wp_tc4_ref_sys\make\tc4_rev06\Debug\product-wp_tc4_ref_syscfg.cmd", line 230: error:
   CACHE_L2 memory range overlaps existing memory range CACHE_L2
"D:\Rapid_Mobile\projects\client-rapidm\product-wp_tc4_ref_sys\make\tc4_rev06\Debug\product-wp_tc4_ref_syscfg.cmd", line 231: error:
   IRAM memory range has already been specified
"D:\Rapid_Mobile\projects\client-rapidm\product-wp_tc4_ref_sys\make\tc4_rev06\Debug\product-wp_tc4_ref_syscfg.cmd", line 231: error:
   IRAM memory range overlaps existing memory range IRAM
"D:\Rapid_Mobile\projects\client-rapidm\product-wp_tc4_ref_sys\make\tc4_rev06\Debug\product-wp_tc4_ref_syscfg.cmd", line 232: error:
   SDRAM_DATA memory range has already been specified
"D:\Rapid_Mobile\projects\client-rapidm\product-wp_tc4_ref_sys\make\tc4_rev06\Debug\product-wp_tc4_ref_syscfg.cmd", line 232: error:
   SDRAM_DATA memory range overlaps existing memory range SDRAM_DATA
"D:\Rapid_Mobile\projects\client-rapidm\product-wp_tc4_ref_sys\make\tc4_rev06\Debug\product-wp_tc4_ref_syscfg.cmd", line 233: error:
   SDRAM_PROG memory range has already been specified
"D:\Rapid_Mobile\projects\client-rapidm\product-wp_tc4_ref_sys\make\tc4_rev06\Debug\product-wp_tc4_ref_syscfg.cmd", line 233: error:
   SDRAM_PROG memory range overlaps existing memory range SDRAM_PROG

>> Compilation failure
gmake: *** [D:\Rapid_Mobile\projects\client-rapidm\product-wp_tc4_ref_sys\make\tc4_rev06/../../bin/tc4_rev06/Release_Complete/product-wp_tc4_rev_06_ref_sys.out] Error 1
gmake: Target `all' not remade because of errors.
Build complete for project product-wp_tc4_rev_06_ref_sys

I've ran out of ideas to solve this issue. Can someone please help urgently!

Thanks in advance!

Regards

  Reinier

  • Reinier,
    I am seeing the same problem, but I don't know yet if it's a documentation bug or a bug in the config code. Can you just not include the generated linker command file in your own linker command file? My project looks a little bit different and I can see both files on the command line. I think that in your case the generated linker command file is coming through ccsLinker.opt.

    You also have an error on the line 1 of your file. There is a reference to a missing file 'ser'.

  • Hi Sasha,

    You'll notice that I do include the generated command linker file at the top of the command linker file that I included in my previous post. This is based upon the example that I found in the DSP/BIOS user manual. I'm really not sure what I'm doing wrong. I will also look into the missing file 'ser', I'm not sure where that came from. Do you perhaps have any advice for preventing this double inclusion? Please help!

    Regards

      Reinier

  • Reinier,
    I was proposing that you remove from your command file that line that includes the generated linker command. It seems that the generated file is already included, so you don't have to do it in your file. Can you also attach the generated linker command file? The error message about the file 'ser' might be coming from there.

  • Sasha,

    My apologies, I misread your previous e-mail. I did exclude the generated linker file from my own linker command file. However, the problem is now that the generated linker command file is only called after my own linker command file. This causes linker errors since my linker command files refer to sections that have not yet been defined at that point in time. I did have a look at the generated "ccsLinker.opt" file and I noticed that the generated linker command file was included from there. The thing is I can't figure out where to turn off the linking of the generated command file, so that it can only be called from my own command file.

    I also tried to set the Link Order in Project Properties -> CSS Build -> Link Order, but this did not have an effect, or I did it incorrectly.

    I then looked at the project .cdtbuild file to see if I could not find something to change there, where I came accross the following:

    <tool id="com.ti.ccstudio.buildDefinitions.C6000_7.3.exe.linkerDebug.253851011" name="C6000 Linker" superClass="com.ti.ccstudio.buildDefinitions.C6000_7.3.exe.linkerDebug">
    <option id="com.ti.ccstudio.buildDefinitions.C6000_7.3.linkerID.OUTPUT_FILE.884601419" superClass="com.ti.ccstudio.buildDefinitions.C6000_7.3.linkerID.OUTPUT_FILE" value="&quot;${ProjDirPath}/../../bin/tc4_rev06/Release_Complete/product-wp_tc4_rev_06_ref_sys.out&quot;" valueType="string"/>
    <option id="com.ti.ccstudio.buildDefinitions.C6000_7.3.linkerID.MAP_FILE.672771556" superClass="com.ti.ccstudio.buildDefinitions.C6000_7.3.linkerID.MAP_FILE" value="&quot;${ProjDirPath}/../../bin/tc4_rev06/Release_Complete/product-wp_tc4_rev_06_ref_sys.map&quot;" valueType="string"/>
    <option id="com.ti.ccstudio.buildDefinitions.C6000_7.3.linkerID.generatedLinkerCommandFiles.233837857" superClass="com.ti.ccstudio.buildDefinitions.C6000_7.3.linkerID.generatedLinkerCommandFiles" valueType="libs">
    <listOptionValue builtIn="false" value="&quot;$(GEN_CMDS_QUOTED)&quot;"/>
    </option>

    I then changed the value of the last option from "&quot;$(GEN_CMDS_QUOTED)&quot;" to "" and I noticed that the inclusion of the generated linker file dissapeared in the "ccsLinker.opt" file. However, I also got the following linker error:

    "must link using compiler shell to complete template instantiations"

    This error was only displayed in the problems tab and not in the console, not sure why. Can you please provide me with some insight in how to solve this problem??

  • Reinier,
    I don't think it's a good idea to change .cdtbuild manually. The error message is probably coming from the CCS and looks like an internal error message.

    The right way to do it is by using LinkOrder, but I don't know why it's not working for you. What kind of project is that? How did you get the file ccsLinker.opt to show up on the command line? My linker command file looks like this:

    'Invoking: Linker'
    "E:/Texas Instruments/ccsv4/tools/compiler/c6000/bin/cl6x" -mv64+ -g --diag_warning=225 --abi=coffabi -z -m"tcftest2.map" --warn_sections -i"E:/Texas Instruments/ccsv4/tools/compiler/c6000/lib" -i"E:/Texas Instruments/ccsv4/tools/compiler/c6000/include" -i"E:/Texas Instruments/bios_5_41_09_34/packages/ti/rtdx/lib/c6000" -i"E:/Texas Instruments/bios_5_41_09_34/packages/ti/bios/lib" --reread_libs --rom_model -o "tcftest2.out" "../add.cmd" -l"./hellocfg.cmd" "./somefile.obj" "./hellocfg_c.obj" "./hellocfg.obj" "./hello.obj" -l"libc.a"

    with two linker command files hellocfg.cmd and add.cmd, which I can order any way I need using LinkOrder.