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.

使用C6713编译工程,CMD文件出现问题



使用c6713编译工程时出现以下错误,这是CMD文件的什么问题呢???

CMD 文件如下:

MEMORY  
{
    VECS:    o = 00000000h    l = 00200h
    ROM_PMEM   :    o = 00000200h   l = 2a900h
    ROM_CINIT  :    o = 0002ab00h   l = A00h
    ROM_EXT_PMEM:   o = 2b500h        l = 03000h
    BMEM:            o = 0002F500h    l = 0A000h
    SDARM1    :    o = 01840000h   l =0x10000h

}

/************************************end map0*************************************/
SECTIONS
{
    .vectors    >    VECS
    .text        >   ROM_PMEM
    .my_text    :    ROM_EXT_PMEM
    .tables     >    BMEM
    .data       >    BMEM
    .bss        >    BMEM
    .cinit        :    ROM_CINIT
    .const        :    ROM_CINIT
    .switch        :   ROM_CINIT
    .cio        >    SDARM1
    .far        >    SDARM1
    .to_arm     >   SDARM1
    .from_arm    >   SDARM1
    .stack        >    SDARM1
    .sysmem        >    SDARM1
    
    .my_sect_DATA    :    SDARM1
    .my_sect_CODE    :    SDARM1
}

  •    
    46,47,51分别是哪几句?

    另外,SDARM1    :    o = 01840000h   l =0x10000h 是L2 Registers.

  • 你所说的那几条就是上面CMD文件里面的语句,还有就是你的意思是说不能把CMD文件中SDARM1的段放在L2 Registers中嘛?????

  • 46,47,51行分别对应cmd文件中的哪几句?

    这块做L2 registers用,不要分配段在这块地址。

  • 现在CMD文件如下,出现的错误如图,


    其中的Line19就是下面标注的位置

    MEMORY
    {
    VECS : o = 00000000h l = 00000200h
    ROM_PMEM : o = 00000200h l = 0002a900h
    ROM_CINIT : o = 0002AB00h l = 00000A00h
    ROM_EXT_PMEM : o = 0002b500h l = 00003000h
    BMEM : o = 00030000h l = 0x0000A000h

    L2 : o = 01840000h l = 00010000h

    }

    SECTIONS
    {
    .vectors > VECS
    .text > ROM_PMEM
    .my_text > ROM_EXT_PMEM
    .tables > BMEM
    .data > BMEM
    .bss > BMEM
    .cinit > ROM_CINIT
    .const > ROM_CINIT
    .switch > ROM_CINIT

    .cio > L2
    .far > L2
    .to_arm > L2
    .from_arm > L2
    .stack > L2
    .sysmem > L2
    .my_sect_DATA > L2
    .my_sect_CODE > L2
    }

    那如果L2registers不能用的话,那些空间是可以用的呢????????

  • 01840000这段地址属于L2 registers, 不能放用户代码。

  • 哪些地址可以放,可以看一下数据手册上的Table 3. TMS320C6713 Memory Map Summary
    http://www.ti.com/lit/ds/symlink/tms320c6713.pdf 

  • 谢谢你的回复,现在修正CMD文件如下,又出现下面的错误,但查看.map文件并没有看到分配的空间使用完,不知道这个是什么问题呢????

    CMD文件如下:

    MEMORY 
    {
        L2RAM          :     o = 00000000h  l = 00030000h
      
        L2CACHE        :     o = 00030000h   l = 00010000h
       
        EXTERAM        :     o = 80000000h   l = 01000000h
    }

    SECTIONS
    {
        .vectors > L2RAM
     .text  >   L2RAM
        .tables  > L2CACHE
        .data    > L2RAM
        .bss  > L2CACHE
        .cinit  > L2CACHE
        .const  > EXTERAM
        .switch  >   EXTERAM 
        .cio     > EXTERAM
        .far  > EXTERAM
     .stack  > EXTERAM
     .sysmem  > L2CACHE
     .my_sect_DATA > EXTERAM
     .my_sect_CODE > EXTERAM
    }

    编译错误如下:

    "c:\ti\c6000\cgtools\bin\cl6x" -@"Debug.lkf"
    >>   error: can't allocate .sysmem (sz: 00007000 page: 0) in L2CACHE (avail:
                00006024)
    >>   error: errors in input - ./Debug/DSPFile.out not built

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

    .map文件部分如下:

    MEMORY CONFIGURATION

                      name            origin    length      used    attr    fill
             ----------------------  --------  ---------  --------  ----  --------
             L2RAM                   00000000   00030000  0002a6a0  RWIX
             L2CACHE                 00030000   00010000  00009fdc  RWIX
             EXTERAM                 80000000   01000000  00007ed3  RWIX

    望工程师指点下。。。。

  • 从map文件看,L2CACHE还剩0x10000-0x9fdc=0x6024大小的空间,但.system段的大小是0x7000,所以放不下会报这样的错。

  • 之前我是把heap段大小分配是0x7000,现在我把heap空间改为0x6000时,编译出现一堆错误,,这个是为什么???错误部分大致如下:

    >> error: relocation overflow occured at address 0x00000468 in section
    '.my_sect_CODE' of input file
    'E:\C2_receiver\hgtest_0183_ok_20150122\Receiver__RX3007_CCS2.0\Debug\uart.obj'. The 32-bit PC-relative displacement -536837358 at this location is too large to fit into the 21-bit PC-Relative field; the destination address is too far away from the instruction. You may need to add a mask to the assembly instruction or use other target specific assembly features if you really only need the lowest 21 bits of this symbol. Please see the section on Relocation in the Assembly User's Guide.

    >> error: symbol referencing errors - './Debug/DSPFile.out' not built

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