TI论坛
直播中

李造吉

7年用户 186经验值
私信 关注
[问答]

用CCSv5对TMS320c6678进行软件仿真时,printf打印不出数据,请问是什么原因?

因为代码很大所以对cmd文件做了修改
LOCAL_L2_SRAM: o = 0x00800000 l = 0x00080000 /* 512kB LOCAL L2/SRAM */
LOCAL_L1P_SRAM: o = 0x00E00000 l = 0x00008000 /* 32kB LOCAL L1P/SRAM */
LOCAL_L1D_SRAM: o = 0x00F00000 l = 0x00008000 /* 32kB LOCAL L1D/SRAM */
SHRAM: o = 0x0C000000 l = 0x04000000 /* 4MB Multicore shared Memmory */ 从原来的4M扩大到64M
SECTIONS
[
.text > SHRAM
.stack > SHRAM
.bss > SHRAM
.cio > SHRAM
.const > SHRAM
.data > SHRAM
.switch > SHRAM
.sysmem > SHRAM
.far > SHRAM
.args > SHRAM
.ppinfo > SHRAM
.ppdata > SHRAM

/* COFF sections */
.pinit > SHRAM
.cinit > SHRAM

/* EABI sections */
.binit > SHRAM
.init_array > SHRAM
.neardata > SHRAM
.fardata > SHRAM
.rodata > SHRAM
.c6xabi.exidx > SHRAM
.c6xabi.extab > SHRAM
]

这是现实汇编指令
main:
0c632920: 3577 STW.D2T2 B10,*B15--[2]
0c632922: 8577 STDW.D2T1 A11:A10,*B15--[1]
0c632924: 07FD1852 ADDK.S2 -1488,B15
30 printf("heeeferferferfen");
0c632928: 05708E28 MVK.S1 0xffffe11c,A10
0c63292c: 050634E8 MVKH.S1 0xc690000,A10
0c632930: 10173413 CALLP.S2 printf (PC+47520 = 0x0c63e2c0),B3
0c632934: 053C22F4 || STW.D2T1 A10,*+B15[1]
31 printf("heeeferferferfen");
$C$RL0:
0c632938: 9507 MV.L2X A10,B4
0c63293a: BC45 STW.D2T2 B4,*B15[1]
0c63293c: E8202000 .fphead n, l, W, BU, nobr, nosat, 1000001b
0c632940: 10173012 || CALLP.S2 printf (PC+47488 = 0x0c63e2c0),B3

回帖(1)

余少虹

2018-8-3 09:31:18
printf不能打印的话,可能是heap, stack大小不够。
举报

更多回帖

发帖
×
20
完善资料,
赚取积分