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.

C6747代码段text不能正常分配到L2RAM

因为代码段过大,分配到ShareRAM会报Error。
<Linking>
warning: creating output section "text" without a SECTIONS specification
"E:\\myDSPProject\\Power\\Source\\linker.cmd", line 36: error: placement fails
for object ".text", size 0x11158 (page 0). Available ranges:
SHAREDRAM size: 0x1ffff unused: 0x5d9b max hole: 0x5d91
error: errors encountered during linking; "./Debug/Power.out" not built

L2RAM配置了64K Cache,还剩较大空间,因此将各段分配到L2RAM,这时编译报warning:
<Linking>
warning: creating output section "text" without a SECTIONS specification

为什么text不能正确分配空间?

附:

MEMORY
{
VECS:            o = 0x80000000       l = 0x00000f00
ARMRAM:      o = 0xFFFF0080       l = 0x00001f80
BOOT:            o = 0x00800000       l = 0x00004000
L2RAM:          o = 0x00804000       l = 0x0082C000      //64K Cache away
/* L2ROM:      o = 0x11700000       l = 0x00100000 */
SHAREDRAM:         o = 0x80000f00          l = 0x0001ffff
SDRAM:         o = 0xC0000000       l = 0x20000000
}

SECTIONS
{ ".vectors"         >                    VECS
   .bss                 >                    SHAREDRAM        --- [L2RAM]
   .cinit                >                     SHAREDRAM       --- [L2RAM]
   .cio                  >                     SHAREDRAM       --- [L2RAM]
   .const             >                     SHAREDRAM       --- [L2RAM]
    .stack            >                     SHAREDRAM       --- [L2RAM]
    .text                >                     SHAREDRAM       --- [L2RAM]
    .sysmem      >                     SHAREDRAM       --- [L2RAM]
    .switch          >                     SHAREDRAM       --- [L2RAM]
    .far                 >                     SHAREDRAM       --- [L2RAM]
    .data              >                    SHAREDRAM        --- [L2RAM]

    .para_tab     >                     SDRAM
    .input            >                     SDRAM, align(4096)
     ……
}

  • 你好,

    看一下map文件中各个段的段长是多少, 总的有没有超过定义的L2RAM段长. 或者试试只把.text段分配到L2RAM