我开始了一个新的线程,因为它使它更容易遵循。我相信代码是和谐2.04。至少当固件运行好一段时间时,它看起来可能是突然出乎意料的产品:1)SypRealSubExpRyLeR2(Simple),SysHelrOrthRebug TCP/IP堆栈:堆删除失败!SysHyrRoRyTrror TCP/IP堆栈:堆创建失败,类型:1SysSyrRoRyTrror TCP/IP堆栈:初始化失败1 -中止!之后,以太网变得不可访问,并且电缆必须被拔掉并被复制以恢复。对于一般的例外,我有用于TBL再填充的SENDATA总线错误加载/获取地址错误,ECP地址通常位于这个函数中:一个总线,地址是iMaMtxPcTeCKAcKeldFor()。我已经看了好几天,但是除了它在项目代码和ReunIalaleDead中有时被取消初始化之外,还没有结论它发生的原因。但是仅仅做了100次,BOT就产生了问题。在问题发生前从2小时到48小时。如果有人对可能的原因有任何想法,或者我能尝试什么,请告诉我。
以上来自于百度翻译
以下为原文
I am star
ting a new thread for this as it makes it easier to follow.
I believe the code is H
ARMony 2.04. At least it appears that way
Device PIC32MZ2048EFG100
When the firmware runs for a good while, it may suddenly out of the blue produce:
1) _general_exception_handler
2) _simple_tlb_refill_exception_handler
or:
SYS_ERROR_ERROR TCP/IP Stack: Heap Delete fail!
SYS_ERROR_ERROR TCP/IP Stack: Heap creation failed, type: 1
SYS_ERROR_ERROR TCP/IP Stack: Initialization failed 1 - Aborting!
after which the Ethernet becomes unreachable and the cable must be unplugged and replugged to recover.
For the _general_exception_handler
I have seen
data bus error
load/fetch address error
For TBL refill, the ECP address usually sits in this function:
_EnetPoolFreeDcptList()
Disassembly of section .text._EnetPoolFreeDcptList:
9d08bc08 <_EnetPoolFreeDcptList>:
9d08bc08: 27bdffe0 addiu sp,sp,-32
9d08bc0c: afbf001c sw ra,28(sp)
9d08bc10: afb20018 sw s2,24(sp)
9d08bc14: afb10014 sw s1,20(sp)
9d08bc18: afb00010 sw s0,16(sp)
9d08bc1c: 00808021 move s0,a0
9d08bc20: 00a08821 move s1,a1
9d08bc24: 00c09021 move s2,a2
9d08bc28 <.LBB347>:
9d08bc28: 8e040008 lw a0,8(s0)
9d08bc2c <.LVL19>:
9d08bc2c: 8e02000c lw v0,12(s0)
/////////////////////////////////////////////////
ECP address = 9d08bc30 for tbl_refill
////////////////////////////////////////////////
9d08bc30: 54820004 bnel a0,v0,9d08bc44 <.LBB350>
9d08bc34: 8c820000 lw v0,0(a0)
9d08bc38: ae00000c sw zero,12(s0)
9d08bc3c <.LBE347>:
9d08bc3c: 0b422f12 j 9d08bc48 <.LBE350>
9d08bc40: ae000008 sw zero,8(s0)
9d08bc44 <.LBB350>:
9d08bc44: ae020008 sw v0,8(s0)
9d08bc48 <.LBE350>:
9d08bc48: 10800007 beqz a0,9d08bc68 <.LVL21>
9d08bc4c: 8fbf001c lw ra,28(sp)
9d08bc50: 5220fff6 beqzl s1,9d08bc2c <.LVL19>
9d08bc54: 8e040008 lw a0,8(s0)
9d08bc58: 0220f809 jalr s1
9d08bc5c: 02402821 move a1,s2
9d08bc60 <.LVL20>:
9d08bc60: 0b422f0b j 9d08bc2c <.LVL19>
9d08bc64: 8e040008 lw a0,8(s0)
9d08bc68 <.LVL21>:
9d08bc68: 8fb20018 lw s2,24(sp)
9d08bc6c <.LVL22>:
9d08bc6c: 8fb10014 lw s1,20(sp)
9d08bc70 <.LVL23>:
9d08bc70: 8fb00010 lw s0,16(sp)
9d08bc74 <.LVL24>:
9d08bc74: 03e00008 jr ra
9d08bc78: 27bd0020 addiu sp,sp,32
For the general exception, data buss, the address is in
_MACTxPacketAckCallback()
9d09179c <_MACTxPacketAckCallback>:
9d09179c: 14a00010 bnez a1,9d0917e0 <.LVL361>
9d0917a0: 24050001 li a1,1
9d0917a4: 27bdffe8 addiu sp,sp,-24
9d0917a8: afbf0014 sw ra,20(sp)
9d0917ac: afb00010 sw s0,16(sp)
9d0917b0: 00c08021 move s0,a2
9d0917b4 <.LBB575>:
////////////////////////////////////////////
address points here: 9d0917b4
////////////////////////////////////////////
9d0917b4: 9483fffe lhu v1,-2(a0)
9d0917b8: 8cc20068 lw v0,104(a2)
9d0917bc: 00832023 subu a0,a0,v1
9d0917c0 <.LVL358>:
9d0917c0: 0040f809 jalr v0
9d0917c4: 24061040 li a2,4160
9d0917c8 <.LVL359>:
9d0917c8: 8e02012c lw v0,300(s0)
9d0917cc: 24420001 addiu v0,v0,1
9d0917d0: ae02012c sw v0,300(s0)
9d0917d4 <.LBE575>:
9d0917d4: 8fbf0014 lw ra,20(sp)
9d0917d8: 8fb00010 lw s0,16(sp)
9d0917dc <.LVL360>:
9d0917dc: 27bd0018 addiu sp,sp,24
9d0917e0 <.LVL361>:
9d0917e0: 03e00008 jr ra
9d0917e4: 00000000 nop
I have looked at this for several days but have no conclusion as to why it is happening except that the stack gets de-initalised sometimes in the project code and re-initalised.
But just doing that a few 100 times has bot produced the problem.
It may take from 2 hours to 48 hours before the problem occurs.
If anyone has any ideas of the possible cause, or what else I can try, please let me know.
Best regards
X