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.cmd file for C6748 on OMAP L-138 EVM

Other Parts Discussed in Thread: OMAP-L138

linker_dsp_back.cmd:


-l rts67plus.lib
/*-l ..\..\Plat\driver.lib*/

-stack           0x00000800
-heap            0x00000800

MEMORY
{  
 DSP_L2_RAM_txt:     ORIGIN = 0x00800000 LENGTH = 0x00020000
 DSP_L2_RAM_data:    ORIGIN = 0x00830000 LENGTH = 0x00020000
 DSP_L1P_RAM:     ORIGIN = 0x00E00000 LENGTH = 0x00007000  /*32K -4K*/
 DSP_L1D_RAM:     ORIGIN = 0x00F00000 LENGTH = 0x00007000  /*32K -4K*/
    shared_ram:      ORIGIN = 0x80000000  LENGTH = 0x00020000
  
}

SECTIONS
{
 .vecs       > DSP_L1P_RAM
 .text_L1P   > DSP_L1P_RAM
    .text    > DSP_L2_RAM_txt    
    .const      > DSP_L1P_RAM
    .bss        > DSP_L1D_RAM
    .bss_L2     > DSP_L2_RAM_data
    .far        > DSP_L1D_RAM
    .switch     > DSP_L1D_RAM
    .stack      > DSP_L1D_RAM
    .data       > DSP_L1P_RAM
    .cinit      > DSP_L1P_RAM
    .sysmem     > DSP_L1P_RAM
    .cio        > DSP_L1P_RAM
}

 

linker_dsp.cmd:

-l rts67plus.lib
/*-l ..\..\Plat\driver.lib*/

-stack           0x00000800
-heap            0x00000800

MEMORY
{  
 DSP_L2_RAM_txt:     ORIGIN = 0x00800000 LENGTH = 0x00020000
 DSP_L2_RAM_data:    ORIGIN = 0x00830000 LENGTH = 0x00020000     
 DSP_L1P_RAM:     ORIGIN = 0x00E00000 LENGTH = 0x00007000  /*32K -4K*/
 DSP_L1D_RAM:     ORIGIN = 0x00F00000 LENGTH = 0x00007000  /*32K -4K*/
 shared_ram:      ORIGIN = 0x80000000 LENGTH = 0x00020000               
  
}

SECTIONS
{
 .vecs       > DSP_L2_RAM_txt
 .text_L1P   > DSP_L2_RAM_txt
    .text    > DSP_L2_RAM_txt    
    .const      > DSP_L2_RAM_txt
    .bss        > DSP_L2_RAM_txt
    .bss_L2     > DSP_L2_RAM_txt
    .far        > DSP_L2_RAM_txt
    .switch     > DSP_L2_RAM_txt
    .stack      > DSP_L2_RAM_txt
    .data       > DSP_L2_RAM_txt
    .cinit      > DSP_L2_RAM_txt
    .sysmem     > DSP_L2_RAM_txt
    .cio        > DSP_L2_RAM_txt
}

1.when i use  linker_dsp_back.cmd,the interrupt of C6748 can not  responsed,but when i us linker_dsp.cmd  the interrupt of C6748 is OK  why???

2. when i use  linker_dsp_back.cmd  and i set  CSR=0x03, the programe will run error   address,  Why??

thank for help

 

 

  • I see a few issues with your linker command file(s):

    1. The CPU can only fetch instructions from L1P.  It cannot read/write data.  Therefore it is ok to have .text_L1P and .vecs in the L1P, but you should not have any of the other sections allocated there (i.e. .const, .data, .cinit, .sysmem, .cio).  Furthermore, you would need to take some special steps to put code in L1P.  Lots more details are found in this article: Putting code in L1PSRAM
    2. Each section of internal RAM (L1P, L1D, L2) actually has 2 addresses.  You are using the address that is only visible by the CPU.  If you instead use the other address (e.g. 0x11800000 for L2) then it would be accessibly by EDMA and other masters.  It's important to make this change or else later on when you try to program the EDMA you will end up with hard-to-find failures!
    3. You're including the wrong RTS library.  For the C6748 / OMAP-L138 you should include rts6740.lib.  The rts67plus.lib would be appropriate for devices such as C6727.

    Brad