TI中文支持网
TI专业的中文技术问题搜集分享网站

6747栈溢出的问题

我的linkercmd的配置如下所示,将.stack段放在L2RAM中,程序每次都会发生栈数据溢出的情况,将.stack段放在shareram中,程序会偶尔发生栈数据溢出的情况,为什么?可以确认程序的逻辑是正确的,VC同样的程序跑起来没有问题

-stack 0x00004000 /* Stack Size */
-heap 0x00004000 /* Heap Size */
MEMORY
{
VECS: o = 0x11800000 l = 0x00000200

DSPL2ROM: o = 0x00700000 l = 0x00100000
DSPL2RAM: o = 0x00800000 l = 0x00040000
DSPL1PRAM: o = 0x00E00000 l = 0x00008000
DSPL1DRAM: o = 0x00F00000 l = 0x00008000

DSPL2RAM2: o = 0x11800200 l = 0x0003fe00
DSPL1PRAM2: o = 0x11E00000 l = 0x00008000
DSPL1DRAM2: o = 0x11F00000 l = 0x00008000

SHAREDRAM: o = 0x80000000 l = 0x00020000
SDRAM: o = 0xC1000000 l = 0x02fe0000

}

SECTIONS
{ ".vectors" > VECS
.bss > DSPL2RAM2
.cinit > SDRAM
.data > DSPL2RAM2
.cio > DSPL2RAM2
.const > DSPL2RAM2
.stack > DSPL2RAM2
.sysmem > DSPL2RAM2
.text > DSPL2RAM2
.switch > DSPL2RAM2
.far > DSPL2RAM2
.calcbuffer > SHAREDRAM
.compxbuf > SHAREDRAM

.bufs > SHAREDRAM
.buffer > SHAREDRAM
.buffertemp > SHAREDRAM
.compxbuffer> SHAREDRAM
}

Tony Tang:

guo wang

MEMORY{ VECS: o = 0x11800000 l = 0x00000200

DSPL2ROM: o = 0x00700000 l = 0x00100000 DSPL2RAM: o = 0x00800000 l = 0x00040000 DSPL1PRAM: o = 0x00E00000 l = 0x00008000 DSPL1DRAM: o = 0x00F00000 l = 0x00008000

DSPL2RAM2: o = 0x11800200 l = 0x0003fe00 DSPL1PRAM2: o = 0x11E00000 l = 0x00008000 DSPL1DRAM2: o = 0x11F00000 l = 0x00008000

SHAREDRAM: o = 0x80000000 l = 0x00020000 SDRAM: o = 0xC1000000 l = 0x02fe0000

}

自己不觉得这cmd文件有问题吗?同一个空间写两遍。ROM, L1写到memory里干什么? 

Shine:

DSPL2RAM, DSPL2RAM2属于同一块物理地址。

赞(0)
未经允许不得转载:TI中文支持网 » 6747栈溢出的问题
分享到: 更多 (0)