嵌入式开发者社区
标题:
C6678free函数的使用问题
[打印本页]
作者:
白色涟漪裙
时间:
2016-9-1 23:08
标题:
C6678free函数的使用问题
我在创龙的6678开饭板上,在STK_SPI 例程的主函数里面添加了如下的代码:
unsigned char* imgout_data=NULL;
imgout_data =(unsigned char *)malloc(row1*(col1+col2));
if(imgout_data)
{
free(imgout_data);
}
单步调试到执行free(imgout_data)的时候,console显示了如下的信息:
Nested exception happened! IRP=0xc13c8e4, ITSR=0x840e
NRP=0xc03c8e4, NTSR=0x1800e, EFR=0x40000000, IERR=0x0, TSCH= 0x173, TSCL= 0x7245e885,
请教各位大神,这个问题怎么解决?
我的cmd文件对于堆栈的设置情况如下:
-heap 0x10000000//0x800
-stack 0x100000//0x1000
MEMORY
{
/* Local L2, 1MB*/
VECTORS: o = 0x00800000 l = 0x00000200
LL2_RW_DATA: o = 0x00800200 l = 0x5FE00
/* Shared L2 2MB*/
SL2: o = 0x0C000000 l = 0x00400000
/* External DDR3, upto 2GB per core */
DDR3_CODE: o = 0x80000000 l = 0x01000000 /*set memory protection attribitue as execution only*/
DDR3_R_DATA: o = 0x81000000 l = 0x01000000 /*set memory protection attribitue as read only*/
DDR3_RW_DATA: o = 0x82000000 l = 0x10000000 /*set memory protection attribitue as read/write*/
}
SECTIONS
{
vecs > VECTORS
.text > SL2
.cinit > SL2
.const > SL2
.switch > SL2
.stack > SL2//LL2_RW_DATA
GROUP
{
.neardata
.rodata
.bss
} > LL2_RW_DATA
.far > LL2_RW_DATA
.fardata > LL2_RW_DATA
.cio > LL2_RW_DATA
.sysmem > DDR3_RW_DATA
}
我以前不做软件,有很多问题不明白,还望大家赐教,谢谢!
作者:
希望缄默
时间:
2016-9-3 16:23
map 文件发出来看看
作者:
白色涟漪裙
时间:
2016-9-4 12:05
-heap 0x10000000//0x800
-stack 0x100000//0x1000
MEMORY
{
/* Local L2, 1MB*/
VECTORS: o = 0x00800000 l = 0x00000200
LL2_RW_DATA: o = 0x00800200 l = 0x5FE00
/* Shared L2 2MB*/
SL2: o = 0x0C000000 l = 0x00400000
/* External DDR3, upto 2GB per core */
DDR3_CODE: o = 0x80000000 l = 0x01000000 /*set memory protection attribitue as execution only*/
DDR3_R_DATA: o = 0x81000000 l = 0x01000000 /*set memory protection attribitue as read only*/
DDR3_RW_DATA: o = 0x82000000 l = 0x10000000 /*set memory protection attribitue as read/write*/
}
SECTIONS
{
vecs > VECTORS
.text > SL2
.cinit > SL2
.const > SL2
.switch > SL2
.stack > SL2//LL2_RW_DATA
GROUP
{
.neardata
.rodata
.bss
} > LL2_RW_DATA
.far > LL2_RW_DATA
.fardata > LL2_RW_DATA
.cio > LL2_RW_DATA
.sysmem > DDR3_RW_DATA
}
作者:
希望缄默
时间:
2016-9-5 08:39
白色涟漪裙 发表于 2016-9-4 12:05
-heap 0x10000000//0x800
-stack 0x100000//0x1000
MEMORY
map 文件你这是 cmd 文件
欢迎光临 嵌入式开发者社区 (https://www.51ele.net/)
Powered by Discuz! X3.4