程序多数情况下能够正常运行并实现与PC之间的TCP通信,但是在测试过程中发现了如下三种现象导致程序挂掉:
错误提示1:
[C66xx_0] QMSS successfully initialized[C66xx_0] CPPI successfully initialized[C66xx_0] PA successfully initialized[C66xx_0][C66xx_0] TCP/IP Stack 'Hello World!' Application
[C66xx_0][C66xx_0] Network Added: If-1:192.168.2.103
[C66xx_0] 68 A5=0x1
A6=0x4b4a4948 A7=0x4f4e4d4c
A8=0xc02f7ac A9=0x1
A10=0xc02f868 A11=0xc02f834
A12=0x20 A13=0x0
A14=0x0 A15=0x0
A16=0x804786 A17=0x4ce
A18=0x40 A19=0x7f540769
A20=0x0 A21=0x0
A22=0x0 A23=0x0
A24=0x0 A25=0x0
A26=0x0 A27=0x2005000
A28=0x0 A29=0x43
A30[C66xx_0] =0x42 A31=0x1
B0=0x2b2a2928 B1=0x2f2e2d2c
B2=0x23222120 B3=0x27262524
B4=0x33323130 B5=0x37363534
B6=0x3b3a3938 B7=0x3f3e3d3c
B8=0xc394c58 B9=0x0
B10=0x1 B11=0x0
B12=0x0 B13=0x0
B14=0xc396dd8 B15=0xc02f710
B16=0xaa55 B17=0x0
B18=0x3 B19=0x0
B20=0x0 B21=0x2[C66xx_0] e2
B22=0xf B23=0x0
B24=0x0 B25=0x3000
B26=0x3000 B27=0x0
B28=0x0 B29=0x3
B30=0x2 B31=0xc3445e0
NTSR=0x1020f
ITSR=0x420f
IRP=0xc344614
SSR=0x0
AMR=0x0
RILC=0x0
ILC=0x0
Exception at 0x27262524
EFR=0x2 NRP=0x27262524
Internal exception: IERR=0x1
Instruction f[C66xx_0] etch exception
ti.sysbios.family.c64p.Exception: line 248: E_exceptionMin: pc = 0x0c344614, sp = 0x0c02f710.
To see more exception detail, use ROV or set 'ti.sysbios.family.c64p.Exception.ena[C66xx_0] blePrint = true;'
xdc.runtime.Error.raise: terminating execution
错误提示2:
仿真器无法stop,必须使用System Reset,CPU Reset无响应。这种情况是程序执行后发生的,但是打印出的信息是正常的,如下:
[C66xx_0] QMSS successfully initialized[C66xx_0] CPPI successfully initialized[C66xx_0] PA successfully initialized[C66xx_0][C66xx_0] TCP/IP Stack 'Hello World!' Application
[C66xx_0][C66xx_0] Network Added: If-1:192.168.2.103
此时是正常的printf结果。
C66xx_0: Trouble Halting Target CPU: (Error -1060 @ 0x0) Device is not responding to the request. Reset the device, and retry the operation. If error persists, confirm configuration, power-cycle the board, and/or try more reliable JTAG settings (e.g. lower TCLK). (Emulation package 5.0.747.0)
错误提示3:
[C66xx_0] xxx [C66xx_0] QMSS successfully initialized[C66xx_0] Error opening Tx channel 0
[C66xx_0] Failed to initialize CPPI subsystem[C66xx_0][C66xx_0] 0:48 0:96 0:128 0:256 [C66xx_0] 0:512 0:1536 0:3072 [C66xx_0] (0/0 mmAlloc: 0/0/0, mmBulk: 0/0/0)
[C66xx_0][C66xx_0] ti.sysbios.heaps.HeapMem: line 294: out of memory: handle=0x1086ea50, size=24
ti.sysbios.heaps.HeapMem: line 294: out of memory: handle=0x1086ea50, size=1024
ti.sysbios.heaps.HeapMem: line 294: out of memory: handle=0x1086ea50, size=40
xdc.runtime.Error.ra[C66xx_0] ise: terminating execution
出现这种情况时,修改了cfg文件中section的定义,heapmem指定到了DDR3中,以及最后一个.far:NDK…也是指定到了DDR3,程序挂掉之后发现DDR3的内存区没有刷新,读写也正常,这是不是说明DDR3的初始化没有问题呢?
还有就是heapmem的长度初始是设置的0x300000,我试着将其改小好像无法正常通信。这个长度是必须这么多吗?因为涉及到其他的数据存放,网络数据只能是选择放置在DDR3中。
请各位大牛专家指点一下问题产生的原因,不甚感激!
Andy Yin1:
错误提示1 是代码运行到了一个非法的地址,出现取指错误;错误提示2可能是由于代码运行到一个死循环之类导致一直无法响应外部命令;错误提示3是动态分配memory是heap不够。
你是在EVM上测试还是自己设计的板子上测试的,DDR初始化是怎么做的,不做你的修改的话,代码能一直运行正常么?
fei lau:
回复 Andy Yin1:
我将所有的段都放置在共享内存和L2中好像没有这个现象,这些结果都是在自研板上发生的错误,那是不是说明DDR3的配置有问题?
错误2中,有时候的现象是刚开始能ping通,但是响应不了stop后,就无法ping通了。
heap不够是指heapmem的大小吗?就是0x300000那个?
Andy Yin1:
回复 fei lau:
heap对应heapmem,如果是自研板的话,并且放在SL2或LL2没有文件,建议先使用memory test 程序进行DDR自检测试确保DDR测试验证通过。
STK: http://www.deyisupport.com/question_answer/dsp_arm/c6000_multicore/f/53/t/47664.aspx
DDR3 spreadsheet 生成寄存器参数:http://www.deyisupport.com/question_answer/dsp_arm/c6000_multicore/f/53/t/53384.aspx
user2002070:
回复 Andy Yin1:
我也遇到同样的问题,希望能和你交流一下,可以和你私信交流吗?