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.

Autogenerated cmd Files

I'm working on a test program that uses PSP. It looks like CCS now automatically generates more files than before. There are 2 that have SECTION and memory type definitions in them - linker.cmd and <projectname>cfg.cmd. Since they are generated from the same tcf file (if I understand it correctly) some sections are identical therefore linking fails. Is there something I'm missing here?

>> G:\\BASE_C6424\\xdcconfig\\linker.cmd, line 104: warning:
               multiple definitions of SECTION named '.stack'
>> G:\\BASE_C6424\\xdcconfig\\linker.cmd, line 105: warning:
               multiple definitions of SECTION named '.args'
>>   error: memory types IRAM and IRAM on page 0 overlap
>>   error: memory types L1DSRAM and L1DSRAM on page 0 overlap
>>   error: memory types SRAM and SRAM on page 0 overlap
>>   error: memory types DDR2 and DDR2 on page 0 overlap
>> warning: creating output section .printf without SECTIONS specification
>> warning: creating output section $build.attributes without SECTIONS
            specification
>> warning: load address of uninitialized section .hwi ignored
>>   error: errors in input - ./Debug/Test.out not built

>> Compilation failure

Build Complete,
  7 Errors, 5 Warnings, 0 Remarks.

My configuration is: CCS 3.3.82.13, BIOS 5.33.06, Code Gen Tools 6.0.8, XDC 3.00.06, PSP 1.10.00.

 

  • OMG. I think I should have chosen a different career path 15 years ago when I first started using Code Composer. This tool is by far the worse one when compared to other processor manufacturers' tools and most of the other ones are free. If not for the superb silicon I would stay away from it. Well, at least the folks who write the code are consistent. The number of bugs remain at the same level over the years.

    Using Code Generation Tools v6.1.12 gets rid of SECTION problem but memory issue is still there:

    [Linking...] "C:\Program Files\Texas Instruments\C6000 Code Generation Tools 6.1.12\bin\cl6x" -@"Debug.lkf"
    <Linking>
    "G:\\BASE_C6424\\xdcconfig\\linker.cmd", line 27: error: IRAM memory range has
       already been specified
    "G:\\BASE_C6424\\xdcconfig\\linker.cmd", line 27: error: IRAM memory range
       overlaps existing memory range IRAM
    "G:\\BASE_C6424\\xdcconfig\\linker.cmd", line 28: error: L1DSRAM memory range
       has already been specified
    "G:\\BASE_C6424\\xdcconfig\\linker.cmd", line 28: error: L1DSRAM memory range
       overlaps existing memory range L1DSRAM
    "G:\\BASE_C6424\\xdcconfig\\linker.cmd", line 29: error: DDR2 memory range has
       already been specified
    "G:\\BASE_C6424\\xdcconfig\\linker.cmd", line 29: error: DDR2 memory range
       overlaps existing memory range DDR2
    "G:\\BASE_C6424\\xdcconfig\\linker.cmd", line 30: error: SRAM memory range has
       already been specified
    "G:\\BASE_C6424\\xdcconfig\\linker.cmd", line 30: error: SRAM memory range
       overlaps existing memory range SRAM

     undefined       first referenced                 
      symbol             in file                      
     ---------       ----------------                 
     _UARTMD_FXNS    G:\\BASE_C6424\\Debug\\testcfg.obj
     _echo           G:\\BASE_C6424\\Debug\\testcfg.obj
     _uart0DevParams G:\\BASE_C6424\\Debug\\testcfg.obj
     _uart0_dev_init G:\\BASE_C6424\\Debug\\testcfg.obj

    error: unresolved symbols remain
    error: errors encountered during linking; "./Debug/Test.out" not built

    >> Compilation failure

    Build Complete,
      9 Errors, 0 Warnings, 0 Remarks.

  • Alex,

    The issue you are facing is, as the messages say, overlapping of memory segments and redefinition of sections.

    The DSP/BIOS (.tcf file) generates automatically the <projectname_cfg.cmd> file with all the MEMORY and SECTIONS linker directives a program would need (including the typical .text, .data, .const, etc). From your description I imagine you have an existing <linker.cmd> file that also defines MEMORY segments IRAM, L1DSRAM, etc. and SECTIONS .text, .data, .const, etc., is that so? If yes, then:

    - To solve the MEMORY segment conflicts you need to remove their definitions from <linker.cmd>.

    - To solve the SECTIONS conflicts you should either comment out their definitions from the <linker.cmd> file or enable the DSP/BIOS option User .cmd file for Compiler Sections (in the DSP/BIOS graphical configurator, select System --> right click on MEM - Memory Section Manager and select Properties --> tab Compiler Sections).

    Please note that you can still use the <linker.cmd> file to specify additional memory segments or user-defined sections, ok?

    Hope this helps,

    Rafael

  • Thanks for your response Rafael,

    You are right. I have a duplicate definitions for MEMORY and SECTION segments (by the way SECTION problem is gone when rebuilt with Dev Tools 6.1.12). The problem here is that both linker.cmd and my testcfg.cmd are generated automatically by the CCS tools. Moreover linker.cmd automatically gets included in your project under Generated Files. There is no way to get rid of it hence my frustration. I have my hands tied :-). This is what each file header says:

    In testcfg.cmd

    /*   Do *not* directly modify this file.  It was    */
    /*   generated by the Configuration Tool; any  */
    /*   changes risk being overwritten.                */

    In linker.cmd

    /*
     * Do not modify this file; it is automatically generated from the template
     * linkcmd.xdt in the ti.targets package and will be overwritten.
     */

    Regards, - Alex

  • Alex,

    What specific example from TI software are you trying to build?

  • Mariana,

    I'm not building an example anymore. I'm passed that. The sample UART app from PSP v1.10.00 builds fine with the lastest Code Gen tools (6.1.12) BIOS (5.33.06) and CCS (3.3.82.13). The PSP v1.10.2 and 1.10.3 won't build for me.

    This is what I did when I was creating my test program:

    1. Created a new project called "test.prj". Since in CCS 3.3 you can't select 64+ as your target when you create a new project (another bug - duh) I made sure I changed the target after the project was created.

    2. Created test.c with an empty main.

    4. Added a copy of the tcf file from the UART sample program.

    5. Added "target" and "platform" under XDC tab as in the example

    6. Added importPath under DspBiosBuilder tab

    7. Under linker tab I added log8.a64P and the path as in the example

    8. Rebuilt the project -> this creates lots of errors but creates testcfg.cmd too which I need

    9. Added _cfg.cmd to the project

    10. Added a copy of the .cfg file as in the example

    11. Rebuilt the project but linker complains about duplicated MEMORY sections

    Is there something I'm missing?

    Regards,

    Alex

  • Alex,

    It might be easier if you copy a working existing project to another folder and start from there. This way you do not loose the build options and other details.

    One thing that you can make sure -> right click on the .tcf file and choose  "File specific options...", make sure that the option "Exclude file from build" is checked.