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.

TMS320C6678: FFTLIB Linker Command File

Part Number: TMS320C6678
Other Parts Discussed in Thread: FFTLIB

Hi there,

I am trying to get one of these unit tests running from fftlib_3_1_0_0. The examples is in ti/fftlib/src/fft_omp_dp_1d_r2c_d.c. After setting up the project in the usual way for RTSC and adding the required libraries to be linked, I get the following warnings:

"configPkg/linker.cmd", line 131: warning #10068-D: no matching section
warning #10247-D: creating output section ".tdata" without a SECTIONS specification
warning #10247-D: creating output section ".tbss" without a SECTIONS specification
warning #10247-D: creating output section ".mem_ddr" without a SECTIONS specification
warning #10247-D: creating output section ".mem_l2" without a SECTIONS specification
warning #10247-D: creating output section ".mem_msm" without a SECTIONS specification
Finished building target: "fft_example.out"

Because of these warnings and because in the code there are spots where it says "#pragma DATA_SECTION(x_i, ".mem_ddr");", I amended the omp_config.cfg as:

program.sectMap[".mem_ddr"]     = new Program.SectionSpec(); // FFT specific stuff
program.sectMap[".mem_l2"]      = new Program.SectionSpec(); // FFT specific stuff
program.sectMap[".mem_msm"]     = new Program.SectionSpec(); // FFT specific stuff
program.sectMap[".mem_l2"].loadSegment      = "L2SRAM";  // FFT specific stuff
program.sectMap[".mem_ddr"].loadSegment     = "DDR3";    // FFT specific stuff
program.sectMap[".mem_msm"].loadSegment     = "MSMCSRAM";// FFT specific stuff

When I try to run theprogram on the DSP, it will yield the error for some cores:

[C66xx_1] lib_emt_init() return error! (1)

which after checking the returned value corresponds to: LIB_EMT_ERROR_RMANINIT   (-3)  /**< Failure. RMAN initialization.    */ 

The map file has some lines where it says UNINITIALIZED like

.mem_l2    0    00800000    00016000     UNINITIALIZED
                  00800000    00016000     main.obj (.mem_l2)

I do not exactly know what is wrong here. Do you maybe have some omp-config file for these unit tests? Also, what is the difference between defining these sections in a linker command file and in the omp-config file?

Thank you very much for your help.

  • Examples in the FFTLIB are meant to be built using make not using CCS. The CCS projects are legacy based on MCSDK software which we don`t currently support.

    Majority of the examples in the FFTLIB are pre-built so if you go to the folder C:\ti\fftlib_c66x_2_0_0_2\packages\ti\fftlib\src\fft_dp_1d_r2c\k1\fft_dp_1d_r2c_k1_66_LE_ELF\Release

    and open the map file, you will see where the code and data sections are meant to be loaded.     I have attached the map file for pre-built version here:fft_dp_1d_r2c_k1_66_LE_ELF.map

    Also, here is the linker command file (configPkg/linker.cmd) from the pre-built binary for your reference: (rename to .cmd)

    7802.linker.txt
    /*
     * Do not modify this file; it is automatically generated from the template
     * linkcmd.xdt in the ti.targets.elf package and will be overwritten.
     */
    
    /*
     * put '"'s around paths because, without this, the linker
     * considers '-' as minus operator, not a file name character.
     */
    
    
    -l"C:\nightlybuilds\fftlib\ti\fftlib\src\fft_dp_1d_r2c\k1\fft_dp_1d_r2c_k1_66_LE_ELF\Release\configPkg\package\cfg\fcConfig_pe66.oe66"
    -l"C:\FFTLIB_Tools\framework_components_3_30_00_06\packages\ti\sdo\fc\edmamgr\lib\release\edmamgr.ae66"
    -l"C:\FFTLIB_Tools\framework_components_3_30_00_06\packages\ti\sdo\fc\ecpy\lib\release\ecpy.ae66"
    -l"C:\FFTLIB_Tools\framework_components_3_30_00_06\packages\ti\sdo\fc\ires\edma3chan\lib\release\edma3Chan.ae66"
    -l"C:\FFTLIB_Tools\framework_components_3_30_00_06\packages\ti\sdo\fc\edma3\lib\release\edma3.ae66"
    -l"C:\FFTLIB_Tools\framework_components_3_30_00_06\packages\ti\sdo\fc\rman\lib\release\rman.ae66"
    -l"C:\FFTLIB_Tools\framework_components_3_30_00_06\packages\ti\sdo\fc\ires\nullresource\lib\release\nullres.ae66"
    -l"C:\FFTLIB_Tools\framework_components_3_30_00_06\packages\ti\sdo\fc\utils\lib\release\fcutils.ae66"
    -l"C:\FFTLIB_Tools\framework_components_3_30_00_06\packages\ti\sdo\fc\utils\lib\release\rmm.ae66"
    -l"C:\FFTLIB_Tools\framework_components_3_30_00_06\packages\ti\sdo\fc\utils\lib\release\smgr.ae66"
    -l"C:\FFTLIB_Tools\framework_components_3_30_00_06\packages\ti\sdo\fc\utils\lib\release\rmmp.ae66"
    -l"C:\FFTLIB_Tools\framework_components_3_30_00_06\packages\ti\sdo\fc\dskt2\lib\release\dskt2.ae66"
    -l"C:\FFTLIB_Tools\framework_components_3_30_00_06\fctools\packages\ti\sdo\edma3\rm\lib\c6678-evm\66\release\edma3_lld_rm.ae66"
    -l"C:\FFTLIB_Tools\framework_components_3_30_00_06\packages\ti\sdo\fc\memutils\lib\release\memutils.ae66"
    -l"C:\FFTLIB_Tools\framework_components_3_30_00_06\packages\ti\sdo\fc\utils\osalsupport\lib\release\osal_support.ae66"
    -l"C:\FFTLIB_Tools\bios_6_37_00_20\packages\ti\sysbios\lib\sysbios\instrumented\sysbios.ae66"
    -l"C:\FFTLIB_Tools\framework_components_3_30_00_06\packages\ti\sdo\fc\global\lib\release\fcsettings.ae66"
    -l"C:\FFTLIB_Tools\xdctools_3_25_05_94\packages\ti\targets\rts6000\lib\ti.targets.rts6000.ae66"
    -l"C:\FFTLIB_Tools\xdctools_3_25_05_94\packages\ti\targets\rts6000\lib\boot.ae66"
    
    --retain="*(xdc.meta)"
    
    
    --args 0x0
    -heap  0x0
    -stack 0x4000
    
    MEMORY
    {
        L2SRAM (RWX) : org = 0x800000, len = 0x80000
        MSMCSRAM (RWX) : org = 0xc000000, len = 0x400000
        DDR3 : org = 0x80000000, len = 0x20000000
    }
    
    /*
     * Linker command file contributions from all loaded packages:
     */
    
    /* Content from xdc.services.global (null): */
    
    /* Content from xdc (null): */
    
    /* Content from xdc.corevers (null): */
    
    /* Content from xdc.shelf (null): */
    
    /* Content from xdc.services.spec (null): */
    
    /* Content from xdc.services.intern.xsr (null): */
    
    /* Content from xdc.services.intern.gen (null): */
    
    /* Content from xdc.services.intern.cmd (null): */
    
    /* Content from xdc.bld (null): */
    
    /* Content from ti.targets (null): */
    
    /* Content from ti.targets.elf (null): */
    
    /* Content from xdc.rov (null): */
    
    /* Content from xdc.runtime (null): */
    
    /* Content from ti.targets.rts6000 (null): */
    
    /* Content from ti.sysbios.interfaces (null): */
    
    /* Content from ti.sysbios.family (null): */
    
    /* Content from xdc.services.getset (null): */
    
    /* Content from ti.sdo.fc.global (null): */
    
    /* Content from ti.xdais (null): */
    
    /* Content from ti.sdo.fc.ires (null): */
    
    /* Content from ti.sysbios.hal (null): */
    
    /* Content from ti.sysbios.family.c66 (ti/sysbios/family/c66/linkcmd.xdt): */
    
    /* Content from ti.sysbios.rts (ti/sysbios/rts/linkcmd.xdt): */
    
    /* Content from ti.sysbios (null): */
    
    /* Content from ti.sysbios.knl (null): */
    
    /* Content from ti.sysbios.family.c64p (ti/sysbios/family/c64p/linkcmd.xdt): */
    
    /* Content from ti.sysbios.gates (null): */
    
    /* Content from ti.sysbios.heaps (null): */
    
    /* Content from xdc.runtime.knl (null): */
    
    /* Content from ti.sysbios.xdcruntime (null): */
    
    /* Content from ti.sysbios.family.c62 (null): */
    
    /* Content from ti.sysbios.timers.timer64 (null): */
    
    /* Content from ti.sysbios.family.c64p.tci6488 (null): */
    
    /* Content from ti.sdo.fc.utils.osalsupport (null): */
    
    /* Content from ti.sdo.fc.memutils (null): */
    
    /* Content from ti.sdo.edma3.rm (null): */
    
    /* Content from ti.sdo.fc.dskt2 (null): */
    
    /* Content from ti.sdo.fc.utils (null): */
    
    /* Content from ti.sdo.fc.ires.nullresource (null): */
    
    /* Content from ti.sdo.fc.rman (null): */
    
    /* Content from ti.sdo.fc.edma3 (null): */
    
    /* Content from ti.sdo.fc.ires.edma3chan (null): */
    
    /* Content from ti.sdo.fc.ecpy (null): */
    
    /* Content from ti.sdo.fc.edmamgr (null): */
    
    /* Content from ti.sysbios.utils (null): */
    
    /* Content from ti.catalog.c6000 (null): */
    
    /* Content from ti.catalog (null): */
    
    /* Content from ti.catalog.peripherals.hdvicp2 (null): */
    
    /* Content from xdc.platform (null): */
    
    /* Content from xdc.cfg (null): */
    
    /* Content from ti.platforms.evm6678 (null): */
    
    /* Content from configPkg (null): */
    
    
    /*
     * symbolic aliases for static instance objects
     */
    xdc_runtime_Startup__EXECFXN__C = 1;
    xdc_runtime_Startup__RESETFXN__C = 1;
    TSK_idle = ti_sysbios_knl_Task_Object__table__V + 0;
    
    SECTIONS
    {
        .text: load >> MSMCSRAM
        .ti.decompress: load > L2SRAM
        .stack: load > L2SRAM
        GROUP: load > MSMCSRAM
        {
            .bss:
            .neardata:
            .rodata:
        }
        .cinit: load > MSMCSRAM
        .pinit: load >> L2SRAM
        .init_array: load > L2SRAM
        .const: load >> MSMCSRAM
        .data: load >> L2SRAM
        .fardata: load >> L2SRAM
        .switch: load >> MSMCSRAM
        .sysmem: load > MSMCSRAM
        .far: load >> L2SRAM
        .args: load > L2SRAM align = 0x4, fill = 0 {_argsize = 0x0; }
        .cio: load >> L2SRAM
        .ti.handler_table: load > L2SRAM
        .c6xabi.exidx: load > L2SRAM
        .c6xabi.extab: load >> L2SRAM
        .vecs: load > MSMCSRAM
        .ll2Data: load > L2SRAM
        .ddr3Data: load > DDR3
        .far:twiddle: load > DDR3
        .far:external: load > DDR3
        .far:work: load > L2SRAM
        .ll2_mem: load > L2SRAM
        .ddr_heap: load > DDR3
        .ddr_mem: load > DDR3
        .msmc_mem: load > MSMCSRAM
        xdc.meta: load > MSMCSRAM, type = COPY
    
    }
    

    Hope this helps.

    Regards,

    Rahul

  • Hi Rahul,

    Thank you for your quick answer and the attached files. This example does not use OMP as far as I can see. Do you maybe have the same two files for an FFT routine which uses OMP? That would be very helpful.

    Thanks a lot.

  • Idris,

    I don`t have any addtional linker command files other than the ones that I have shard and pointed to in the FFTLIB.

    Regards,
    Rahul
  • Hi Rahul,

    I modified one provided by some libarch example. Works with this. Pasted below if someone else needs it.

    Best wishes,

    Idris

    SECTIONS
    {
    
        .fclocalfar :
        {
            "/home/idris/ti/framework_components_3_40_02_07/packages/ti/sdo/fc/edmamgr/lib/debug/edmamgr.ae66"      (.fardata)
            "/home/idris/ti/framework_components_3_40_02_07/packages/ti/sdo/fc/ecpy/lib/debug/ecpy.ae66"         (.fardata)
            "/home/idris/ti/framework_components_3_40_02_07/packages/ti/sdo/fc/ires/edma3chan/lib/debug/edma3Chan.ae66"    (.fardata)
            "/home/idris/ti/framework_components_3_40_02_07/packages/ti/sdo/fc/edma3/lib/debug/edma3.ae66"	    (.fardata)
            "/home/idris/ti/framework_components_3_40_02_07/packages/ti/sdo/fc/rman/lib/debug/rman.ae66"	        (.fardata)
            "/home/idris/ti/framework_components_3_40_02_07/packages/ti/sdo/fc/ires/nullresource/lib/debug/nullres.ae66"	    (.fardata)
            "/home/idris/ti/framework_components_3_40_02_07/packages/ti/sdo/fc/global/lib/debug/fcsettings.ae66"   (.fardata)
            "/home/idris/ti/edma3_lld_2_12_05_30C/packages/ti/sdo/edma3/rm/lib/c6678-evm/66/debug/edma3_lld_rm.ae66" (.fardata)
    
            "/home/idris/ti/framework_components_3_40_02_07/packages/ti/sdo/fc/edmamgr/lib/debug/edmamgr.ae66"      (.far)
            "/home/idris/ti/framework_components_3_40_02_07/packages/ti/sdo/fc/ires/edma3chan/lib/debug/edma3Chan.ae66"    (.far)
            "/home/idris/ti/framework_components_3_40_02_07/packages/ti/sdo/fc/edma3/lib/debug/edma3.ae66"	    (.far)
            "/home/idris/ti/framework_components_3_40_02_07/packages/ti/sdo/fc/rman/lib/debug/rman.ae66"	        (.far)
            "/home/idris/ti/framework_components_3_40_02_07/packages/ti/sdo/fc/ires/nullresource/lib/debug/nullres.ae66"	    (.far)
            "/home/idris/ti/framework_components_3_40_02_07/packages/ti/sdo/fc/global/lib/debug/fcsettings.ae66"   (.far)
            "/home/idris/ti/edma3_lld_2_12_05_30C/packages/ti/sdo/edma3/rm/lib/c6678-evm/66/debug/edma3_lld_rm.ae66" (.far)
        } > L2SRAM // DDR3 FAILS
    
    	.fclocalfar: load >> L2SRAM
    
    }