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.

求助:开启L1D cache,程序跑飞



各位好,

*****************************************************************************************************

我的环境:C6670、SYS/BIOSv6.33.6.50

*****************************************************************************************************

程序功能大致为:以太网收包,进入中断,然后通过mailbox将收到的MAC包post到一个Task里,在该Task里打印出整个MAC包。

*****************************************************************************************************

cfg文件:

map文件:

.*****************************************************************************************************

遇到的问题是:

如果我在代码中,关掉L1D cache,即

CACHE_setL1DSize(CACHE_L1_0KCACHE);

则程序运行正常。

但是如果开启L1D cache,即

CACHE_setL1DSize(CACHE_L1_32KCACHE);

则程序收到几个MAC包,并打印后,就出现如下error

A0=0x1 A1=0x0
A2=0x0 A3=0x34022e18
A4=0x0 A5=0x0
A6=0x400 A7=0x0
A8=0x0 A9=0x108e7584
A10=0x8 A11=0x108c4bd0
A12=0x0 A13=0x2
A14=0x1 A15=0x0
A16=0x8007f59c A17=0x1
A18=0x2900d00 A19=0x0
A20=0x0 A21=0x0
A22=0x0 A23=0x1
A24=0x0 A25=0x0
A26=0x840f7740 A27=0x0
A28=0x840f7740 A29=0x49
A30=0x300 A31=0x0
B0=0x200 B1=0x1
B2=0x0 B3=0x0
B4=0x400 B5=0xc01a3f4
B6=0x400 B7=0x0
B8=0x0 B9=0x0
B10=0x100 B11=0x1800044
B12=0x18000a4 B13=0x1
B14=0x108f1370 B15=0x108e7970
B16=0xb020135 B17=0x1010008
B18=0x20 B19=0x20008
B20=0x13000d B21=0x70001
B22=0xd B23=0x0
B24=0x0 B25=0x3000
B26=0x0 B27=0x840f7740
B28=0x60 B29=0x0
B30=0x108c2234 B31=0x1f
NTSR=0x1020f
ITSR=0xd
IRP=0x8001222c
SSR=0x0
AMR=0x0
RILC=0x0
ILC=0x0
Exception at 0x0
EFR=0x2 NRP=0x0
Internal exception: IERR=0x1
Instruction fetch exception
ti.sysbios.family.c64p.Exception: line 248: E_exceptionMin: pc = 0x00000000, sp = 0x108e7970.
To see more exception detail, use ROV or set 'ti.sysbios.family.c64p.Exception.enablePrint = true;'
xdc.runtime.Error.raise: terminating execution

请各位帮忙分析一下!!

1. 在这里,为什么L1D的cache与否会影响到程序的运行?

2. 还有在跑程序的时候,经常遇到如上的exception error,一般如何debug呢?TI有相关的资料、培训等吗?感觉这种问题非常难找到bug!