使用load symbol后,单步汇编运行,在下面语句进入了死循环,这个是什么原因?
ffa51d: 4a7e B #0xffa51d
ffa51f: 20_01802d NOP || RPTCC #45, AC0 == #0
ffa523: 00e2b0 RPTCC #176, overflow(AC2)
ffa526: 9309 SWITCH AR1,{,,}
ffa528: be60_45ef MOV HI(AC2),*SP(#30h) || MOV RPTC,AR7
ffa52c: 15b9ae ASUB #185,AR2
每次load后的情况也不一样:
1.
ffff54: 5e80_5f80 NOP_16 || NOP_16
ffff58: eaffa51d .ivec #0xffa51d, C54X_STK
ffff5c: 5e80_5f80 NOP_16 || NOP_16
ffff60: eaffa51d .ivec #0xffa51d, C54X_STK
ffff64: 5e80_5f80 NOP_16 || NOP_16
ffff68: eaffa51d .ivec #0xffa51d, C54X_STK
ffff6c: 5e80_5f80 NOP_16 || NOP_16
ffff70: eaffa51d .ivec #0xffa51d, C54X_STK
ffff74: 5e80_5f80 NOP_16 || NOP_16
2.这种运行到这一块跳出这个错误
Trouble Reading Register PC:
(Error -1143 @ 0x6)
Device core was hung. The debugger has forced the device to a ready state and recovered debug control, but your application's state is now corrupt. You should have limited access to memory and registers, but you may need to reset the device to debug further.
(Emulation package 5.1.232.0)
d6b26d ADD *SP(#59h),AR5,T2
00589b: a0f3 MOV *AR7(short(#1)),AC0
00589d: 7ea8cab9 OR #43210,AR1,AR3
0058a1: f983f1c2 ADD uns(*AR4+) << #-15,AC3,AC0
0058a5: 52 .byte 0x52
0058a6: b5cf1d56 PSH *+AR6(#1d56h)
0058aa: 0121d5 RPTCC #213, AC1 < #0
0058ad: 7992ff14 MPYK #-27905,AC0,AC1
0058b1: 8d537ccab2 MOV *AR2(short(#1)),BKC || MOV AR2,*AR6(T0)
0058b6: 0fdb66_37b9 RPTB #0x013421 || NOT AR3,AR1
0058bb: 2d4b XOR T0,AR3
0058bd: 44 .byte 0x44
3.
58df53: 0000ad_0b0000 RPTCC #173, AC0 == #0 || RPTBLOCAL #0x58df59
58df59: ad0b MOV *AR0(T0),AR5
58df5b: 0000ad_0b0000 RPTCC #173, AC0 == #0 || RPTBLOCAL #0x58df61
58df61: ad0b MOV *AR0(T0),AR5
58df63: 0000ad_0b0000 RPTCC #173, AC0 == #0 || RPTBLOCAL #0x58df69
58df69: ad0b MOV *AR0(T0),AR5
58df6b: 0000ad_0b0000 RPTCC #173, AC0 == #0 || RPTBLOCAL #0x58df71
58df71: ad0b MOV *AR0(T0),AR5
58df73: 0000ad_0b0000 RPTCC #173, AC0 == #0 || RPTBLOCAL #0x58df79
58df79: ad0b MOV *AR0(T0),A
小程序能引导正确的,load symbol后,都可以调到程序的正确位置上。只要程序稍微大一点,就出现引导不成功现象。
这几个是load symbol后出错的点,求官方人员解答一下,谢谢
Shine:
这是ROM里的bootloader源码,试试在main函数处设置断点,直接运行,再跟代码。