Hello,
I wrote an application at mod5270. It worked very good yesterday, Now the applicaton from time to time restarts and I don't know why. Is there any instrument or documentation wich describes how to interpret Trap informations?
If somebody knows how to continue to solve the problem, please let me know.
Thank You,
-------------------Trap information-----------------------------
Exception Frame/A7 =02194798
Trap Vector =Access Error (2)
Format =03
Status register SR =2004
Fault Status =0C
Faulted PC =02033248
-------------------Register information-------------------------
A0=02194E68 A1=00000001 A2=02031988 A3=02194DFC
A4=00000000 A5=00000000 A6=02194E50 A7=02194798
D0=00000008 D1=00000208 D2=0000000A D3=00000000
D4=00000010 D5=000000D5 D6=000000D6 D7=000000D7
SR=2004 PC=02033248
-------------------RTOS information-----------------------------
The OSTCBCur current task control block = 0219270C
This looks like a valid TCB
The current running task is: Main,#32
-------------------Task information-----------------------------
Task | State |Wait| Call Stack
Idle,#3F|Ready | |0200C28C,0200BF60,0
Main,#32|Running | |02033248,0
TCP ,#28|Semaphore |04A2|0200CB62,0201975A,0200BF60,0
IP ,#27|Fifo |000F|0200D918,02010A94,0200BF60,0
Esnd,#26|Timer |0005|0200C54A,02025DF6,0200BF60,0
HTTP,#2D|Semaphore |0000|0200CB62,02016CA2,0201A0BA,0200BF60,0
User,#2A|Semaphore |0062|0200CB62,0201B8A8,02015B30,0200BF60,0
mod5270 failure debugging
- Chris Ruff
- Posts: 222
- Joined: Thu Apr 24, 2008 4:09 pm
- Location: topsail island, nc
- Contact:
Re: mod5270 failure debugging
If you are lucky the following will point you right at the error in your code
open a command prompt box
cd\nburn
setenv<enter>
cd mod5270
cd yourProject
when you are in the directory that your file <yourProject.elf> is in
type in
m68k-elf-add2line -e yourProjectName.elf 0x02033248
the 0x02033248 is the faulted PC from your earlier email
there's about 5 places this exercise could be wrong on your system, but assuming you actually manage to invoke addr2line you still only have a small chance that the error line will be popped out of addr2line.
The most likely scenario is that you have a pointer pointing at the wrong thing or an automatic (stack) variable is being overrun. It really doesn't matter that your code ran fine at one point or another. The fact that it resets basically proves that you are stepping on (most likely) the stack or somebody else's memory (uC/OS fer instance)
Chris
open a command prompt box
cd\nburn
setenv<enter>
cd mod5270
cd yourProject
when you are in the directory that your file <yourProject.elf> is in
type in
m68k-elf-add2line -e yourProjectName.elf 0x02033248
the 0x02033248 is the faulted PC from your earlier email
there's about 5 places this exercise could be wrong on your system, but assuming you actually manage to invoke addr2line you still only have a small chance that the error line will be popped out of addr2line.
The most likely scenario is that you have a pointer pointing at the wrong thing or an automatic (stack) variable is being overrun. It really doesn't matter that your code ran fine at one point or another. The fact that it resets basically proves that you are stepping on (most likely) the stack or somebody else's memory (uC/OS fer instance)
Chris
Real Programmers don't comment their code. If it was hard to write, it should be hard to understand