问题描述:
- 移植代码至工程中,先是编译出现内存不够的问题,然后将程序中占大量内存的数据结构按照AWR1843demo中的例程分配方式(dss_data_path.c的MmwDemo_dataPathConfigBuffers方法中用到的MMW_ALLOC_BUF分配到L3内存的末端(POINT_CLOUD_L3 : size 1048576 (0x100000), free 224520 (0x36d08)))
- 接下来通过编译,出现问题是在运行到music代码中会出现:
[Cortex_R4_0] Debug: Launched the Initialization Task
[C674X_0] Heap MAX_VEL_L1 : size 16384 (0x4000), free 6144 (0x1800)
Heap MAX_VEL_L3 : size 1048576 (0x100000), free 0 (0x0)
[Cortex_R4_0] Debug: Initialized the mmWave module
[C674X_0] Heap POINT_CLOUD_L1 : size 16384 (0x4000), free 1000 (0x3e8)
[Cortex_R4_0] Debug: Synchronized the mmWave module
[C674X_0] Heap POINT_CLOUD_L3 : size 1048576 (0x100000), free 224520 (0x36d08)
Heap MAX_VEL_L2 : size 94208 (0x17000), free 13296 (0x33f0)
Heap POINT_CLOUD_L2 : size 94208 (0x17000), free 6240 (0x1860)
[Cortex_R4_0] Set LDO Bypass
Debug: MMWave has been configured for MRR.
Debug: Sensor will start momentarily.[C674X_0] A0=0x0 A1=0x1
A2=0x0 A3=0x7f3824
A4=0x8eee0870 A5=0x81e7f4
A6=0xbd A7=0x3feb7532
A8=0x8169a0 A9=0x81f2ec
A10=0x1800040 A11=0x1800040
A12=0x18000a0 A13=0x7f1744
A14=0x7f3820 A15=0x0
A16=0xa A17=0xa
A18=0x8 A19=0x2
A20=0xa A21=0x0
A22=0x817078 A23=0x40249f00
A24=0xfffffffe A25=0x3fefffff
A26=0x2d0 A27=0xbe4f93de
A28=0xffffffff A29=0xfffffc00
A30=0xa18 A31=0xa18
B0=0x3fa7f4f0 B1=0x7fa3a0
B2=0x3fa7f4f0 B3=0x7fa3f4
B4=0x818030 B5=0x81e9fa
B6=0x10 B7=0x10
B8=0xa B9=0x0
B10=0x1800040 B11=0x818030
B12=0x1f B13=0x7f3970
B14=0x0 B15=0x818030
B16=0x1800040 B17=0x3f7f130e
B18=0x8165b0 B19=0x81cf60
B20=0x8165b0 B21=0x81cf60
B22=0x0 B23=0x81db0f
B24=0x1 B25=0x7f4150
B26=0xcca2d2d1 B27=0x81f5dc
B28=0x2 B29=0x81fb20
B30=0x81fac8 B31=0x818030
NTSR=0x7fe47a
ITSR=0x81db6e
IRP=0x7f1736
SSR=0x81fab8
AMR=0x0
RILC=0x81fab8
ILC=0x0
Exception at 0x3fa7f4f0
EFR=0x2 NRP=0x3fa7f4f0
Internal exception: IERR=0x1
Instruction fetch exception
{module#23}: line 256: error {id:0xb0000, args:[0x818030, 0x818030]}
xdc.runtime.Error.raise: terminating execution
- 错误出现的位置一般是在我添加代码的一段中中(如果屏蔽其他代码,错误会消失。)
尝试方法:在dss_mrr_linker.cmd中的.fastCode中分配部分music_module的代码段在L1中运行,还是会出现上面的问题。(错误会出现在不同的代码位置)
user4585882:
d=====( ̄▽ ̄*)b
Chris Meng:
回复 user4585882:
你好,
Exception at 0x3fa7f4f0
这个地址应该不在DSP的memory map里吧。代码跑飞了?
你添加代码后,是否有观察过相关task的heap,stack是否有超过设定值的风险。