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.

C5515 EVM开发板编译知识链接“.stack”出错

Other Parts Discussed in Thread: TMS320C5515

环境:CCS 6.2.0编译器,TMS320C5515 EVM开发板

问题:

1, 在SARAM中定义一个64K的数组的话,实际占用RAM空间为128K,能不能通过设置DSP处理器的RAM单字节对其???即64K数组占用64KRAM。

2.在源文件中定义大数组时会出现要求".stack" 和and ".sysstack"必须在同一页的错误,怎样解决这个问题?? 修改cmd文件吗? 下面是错误的详细描述。

当在在源文件中定义

// 全局数组,SPACE_SIZE = 80K
Uint8 heap0_base[SPACE_SIZE ];

当SPACE_SIZE  = 80K时会出现链接错误如下图:

编译出的map 文件中关于".stack" 和and ".sysstack"的描述如下左图,如果将数组的大小由80K改为64K,编译能正常通过,map文件如下右图。

其中;

// CMD 文件的定义如下:
MEMORY
{
  PAGE 0:  /* ---- Unified Program/Data Address Space ---- */
    MMR     (RW) : origin = 0000000h length = 0000C0h /* MMRs */
    VEC     (RX) : origin = 00000C0h length = 000300h /* on-chip ROM vectors */
    DARAM   (RW) : origin = 0000400h length = 00FBFFh /* on-chip DARAM  */
    SARAM   (RW) : origin = 0010000h length = 03FFFFh /* on-chip SARAM  */

  PAGE 2:  /* -------- 64K-word I/O Address Space -------- */
    IOPORT (RWI) : origin = 0x000000, length = 0x020000
}
 
SECTIONS
{
    vectors(NOLOAD)
    vector      : > VEC    ALIGN = 256  /* Interrupt vectors */

    .text       : > DARAM /*ALIGN = 4   /* Code */

	.cinit 		: > SARAM               /* Auto-initialization tables */
	.const 		: > SARAM               /* Constant data */
	.switch     : > SARAM               /* Switch statement tables */

    .data       : > SARAM               /* Initialized vars */
    .cio        : > SARAM               /* C I/O buffers */

    .stack      : > SARAM /*ALIGN = 4   /* Primary system stack */
    .sysstack   : > SARAM /*ALIGN = 4   /* Secondary system stack */
    .bss        : > SARAM /*fill = 0*/  /* Global & static vars */
    .sysmem     : > SARAM               /* Dynamic memory(malloc) */

    .ioport     : >  IOPORT PAGE 2      /* Global & static ioport vars */
}