Hi,

I have a bug in my driver which results in an Undefined instruction
exception

AKY=00000049
PC=02ea26c0
RA=02ea2614
BVA=08140690
FSR=000000f5

What does the FSR mean? The instruction at the PC address is

02ea26c0 E59F3060 ldr r3,[pc,#0x60] which seems valid instruction

When these come up i was wondering which are the key addresses to look at to
find out
what is causing it. I'm using PXA255 with WinCE V5.0.

Thanks

Re: How to debug an exception by Bruce

Bruce
Tue Oct 25 20:47:29 CDT 2005


I believe that you want to use the RA value, in your case 02ea2614, as your
Exception Address (EA)


Look up EA in your makeimg output. It falls between two modules code starts
(CS). The one with the lower number is the module with the problem. Then
the offset into the module is EA-CS=MO. Look MO up in <module.map> in your
target folder. Similar to looking it up in the makeimg output, it will give
you the function that caused the exception, and the function offset (FO).
Do the math again MO-FO=IO. Now figure out which c/c++ file contains the
function, look up the function in the corresponding .COD file, and find
IO-8. That is the assembly instruction that caused the exception, look up a
few lines an you will see the c code.


If you don't have the .COD files, set the environment variable WINCECOD=1
and rebuild.



--
Bruce Eitman (eMVP)
Senior Engineer
beitman AT applieddata DOT net

Applied Data Systems
www.applieddata.net
An ISO 9001:2000 Registered Company
Microsoft WEP Gold-level Member


"ms" <ms@discussions.microsoft.com> wrote in message
news:%23Wttx8a2FHA.2316@tk2msftngp13.phx.gbl...
> Hi,
>
> I have a bug in my driver which results in an Undefined instruction
> exception
>
> AKY=00000049
> PC=02ea26c0
> RA=02ea2614
> BVA=08140690
> FSR=000000f5
>
> What does the FSR mean? The instruction at the PC address is
>
> 02ea26c0 E59F3060 ldr r3,[pc,#0x60] which seems valid instruction
>
> When these come up i was wondering which are the key addresses to look at
> to
> find out
> what is causing it. I'm using PXA255 with WinCE V5.0.
>
> Thanks
>
>



RE: How to debug an exception by Woojung_DOT_Huh_AT_smsc_DOT_com>

Woojung_DOT_Huh_AT_smsc_DOT_com>
Wed Oct 26 08:31:02 CDT 2005

FSR is "Fault Status Register"

FSR=000000f5 means
Domain Number = 0xF
Status = 0x05 (Section Translation Fault)

Woojung


"ms" wrote:

> Hi,
>
> I have a bug in my driver which results in an Undefined instruction
> exception
>
> AKY=00000049
> PC=02ea26c0
> RA=02ea2614
> BVA=08140690
> FSR=000000f5
>
> What does the FSR mean? The instruction at the PC address is
>
> 02ea26c0 E59F3060 ldr r3,[pc,#0x60] which seems valid instruction
>
> When these come up i was wondering which are the key addresses to look at to
> find out
> what is causing it. I'm using PXA255 with WinCE V5.0.
>
> Thanks
>
>
>

Re: How to debug an exception by ms

ms
Wed Oct 26 13:50:53 CDT 2005

This is a multi-part message in MIME format.

------=_NextPart_000_0027_01C5DA66.937D9F10
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

Thanks Bruce, i tried to do what you've said

RA=3D02ea2614

in makeimg output i have i2c.dll at 02ea1000
and serial.dll at 02eb1000

So taking the lower one, i knew the problem is in i2c.dll anyway=20

EA-CS=3DMO 02ea2614-02ea1000 =3D 1614=20

In i2c.map file i have=20

0001:000015f4 SendStart
0001:00001730 SendAddress

MO-FO =3D 1614-15f4 =3D 0x20 =3D IO

IO-8 =3D0x18
in i2c.cod file, this is where i am confused, there is no 0x18 offset,
snippet of SendStart in i2c.cod below, it starts at ee0

Where have i gone wrong?

00ee0 |SendStart| PROC

; 410 : {

00ee0 |$L37615|
00ee0 e1a0c00d mov r12, sp
00ee4 e92d0001 stmdb sp!, {r0}
00ee8 e92d5000 stmdb sp!, {r12, lr}
00eec e24dd00c sub sp, sp, #0xC
00ef0 |$M37613|

; 411 : BOOL retval;
; 412 :=20
; 413 : retval =3D TRUE;

00ef0 e3a03001 mov r3, #1
00ef4 e58d3000 str r3, [sp]

; 414 : EnterCriticalSection(&RegCrit);

00ef8 e59f010c ldr r0, [pc, #0x10C]
00efc eb000000 bl EnterCriticalSection

; 415 : =20
; 416 : pI2C_reg->IDBR =3D DeviceAdd | WRITE_BIT;

00f00 e59f3110 ldr r3, [pc, #0x110]
00f04 e5933000 ldr r3, [r3]
00f08 e2832008 add r2, r3, #8
00f0c e59d3014 ldr r3, [sp, #0x14]
00f10 e5823000 str r3, [r2]















"Bruce Eitman (eMVP)" <beitmannospam@NOSPAM_applieddata.NOSPAM_net> =
wrote in message news:eNHe68c2FHA.1416@TK2MSFTNGP09.phx.gbl...
>=20
> I believe that you want to use the RA value, in your case 02ea2614, as =
your
> Exception Address (EA)
>=20
>=20
> Look up EA in your makeimg output. It falls between two modules code =
starts
> (CS). The one with the lower number is the module with the problem. =
Then
> the offset into the module is EA-CS=3DMO. Look MO up in <module.map> =
in your
> target folder. Similar to looking it up in the makeimg output, it =
will give
> you the function that caused the exception, and the function offset =
(FO).
> Do the math again MO-FO=3DIO. Now figure out which c/c++ file =
contains the
> function, look up the function in the corresponding .COD file, and =
find
> IO-8. That is the assembly instruction that caused the exception, =
look up a
> few lines an you will see the c code.
>=20
>=20
> If you don't have the .COD files, set the environment variable =
WINCECOD=3D1
> and rebuild.
>=20
>=20
>=20
> --=20
> Bruce Eitman (eMVP)
> Senior Engineer
> beitman AT applieddata DOT net
>=20
> Applied Data Systems
> www.applieddata.net
> An ISO 9001:2000 Registered Company
> Microsoft WEP Gold-level Member
>=20
>=20
> "ms" <ms@discussions.microsoft.com> wrote in message=20
> news:%23Wttx8a2FHA.2316@tk2msftngp13.phx.gbl...
> > Hi,
> >
> > I have a bug in my driver which results in an Undefined instruction
> > exception
> >
> > AKY=3D00000049
> > PC=3D02ea26c0
> > RA=3D02ea2614
> > BVA=3D08140690
> > FSR=3D000000f5
> >
> > What does the FSR mean? The instruction at the PC address is
> >
> > 02ea26c0 E59F3060 ldr r3,[pc,#0x60] which seems valid =
instruction
> >
> > When these come up i was wondering which are the key addresses to =
look at=20
> > to
> > find out
> > what is causing it. I'm using PXA255 with WinCE V5.0.
> >
> > Thanks
> >
> >=20
>=20
>
------=_NextPart_000_0027_01C5DA66.937D9F10
Content-Type: text/html;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=3DContent-Type content=3D"text/html; =
charset=3Diso-8859-1">
<META content=3D"MSHTML 6.00.2800.1515" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY>
<DIV><FONT face=3DArial size=3D2>Thanks Bruce, i tried to do what you've =

said</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>RA=3D02ea2614</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>in makeimg output i have i2c.dll at=20
02ea1000</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>and&nbsp;&nbsp; serial.dll at =
02eb1000</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>So taking the lower one, i knew the =
problem is in=20
i2c.dll anyway </FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>EA-CS=3DMO&nbsp;&nbsp; =
02ea2614-02ea1000 =3D 1614=20
</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>In i2c.map file i have </FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>0001:000015f4&nbsp;&nbsp; =
SendStart</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>0001:00001730&nbsp; =
SendAddress</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>MO-FO =3D 1614-15f4 =3D 0x20 =3D =
IO</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>&nbsp;IO-8 =3D0x18</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>in i2c.cod file, this is where i am =
confused, there=20
is no 0x18 offset,</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>snippet of SendStart in i2c.cod below, =
it starts at=20
ee0</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>Where have i gone wrong?</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>00ee0&nbsp;&nbsp; |SendStart| =
PROC</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>; 410&nbsp; : {</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>&nbsp; 00ee0&nbsp;&nbsp; =
|$L37615|<BR>&nbsp;=20
00ee0&nbsp;e1a0c00d&nbsp; =
mov&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=20
r12, sp<BR>&nbsp; 00ee4&nbsp;e92d0001&nbsp;=20
stmdb&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; sp!, {r0}<BR>&nbsp;=20
00ee8&nbsp;e92d5000&nbsp; stmdb&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; sp!, =
{r12,=20
lr}<BR>&nbsp; 00eec&nbsp;e24dd00c&nbsp;=20
sub&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; sp, sp, =
#0xC<BR>&nbsp;=20
00ef0&nbsp;&nbsp; |$M37613|</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>; 411&nbsp; : &nbsp;BOOL retval;<BR>; =
412&nbsp; :=20
<BR>; 413&nbsp; : &nbsp;retval =3D TRUE;</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>&nbsp; 00ef0&nbsp;e3a03001&nbsp;=20
mov&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; r3, #1<BR>&nbsp;=20
00ef4&nbsp;e58d3000&nbsp; =
str&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=20
r3, [sp]</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>; 414&nbsp; :=20
&nbsp;EnterCriticalSection(&amp;RegCrit);</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>&nbsp; 00ef8&nbsp;e59f010c&nbsp;=20
ldr&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; r0, [pc, =
#0x10C]<BR>&nbsp;=20
00efc&nbsp;eb000000&nbsp;=20
bl&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=20
EnterCriticalSection</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>; 415&nbsp; :&nbsp;&nbsp;&nbsp;&nbsp; =
<BR>;=20
416&nbsp; :&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; pI2C_reg-&gt;IDBR =3D&nbsp; =
DeviceAdd |=20
WRITE_BIT;</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>&nbsp; 00f00&nbsp;e59f3110&nbsp;=20
ldr&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; r3, [pc, =
#0x110]<BR>&nbsp;=20
00f04&nbsp;e5933000&nbsp; =
ldr&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=20
r3, [r3]<BR>&nbsp; 00f08&nbsp;e2832008&nbsp;=20
add&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; r2, r3, #8<BR>&nbsp; =

00f0c&nbsp;e59d3014&nbsp; =
ldr&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=20
r3, [sp, #0x14]<BR>&nbsp; 00f10&nbsp;e5823000&nbsp;=20
str&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; r3, =
[r2]</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>"Bruce Eitman (eMVP)" &lt;</FONT><A=20
href=3D"mailto:beitmannospam@NOSPAM_applieddata.NOSPAM_net"><FONT =
face=3DArial=20
size=3D2>beitmannospam@NOSPAM_applieddata.NOSPAM_net</FONT></A><FONT =
face=3DArial=20
size=3D2>&gt; wrote in message </FONT><A=20
href=3D"news:eNHe68c2FHA.1416@TK2MSFTNGP09.phx.gbl"><FONT face=3DArial=20
size=3D2>news:eNHe68c2FHA.1416@TK2MSFTNGP09.phx.gbl</FONT></A><FONT =
face=3DArial=20
size=3D2>...</FONT></DIV><FONT face=3DArial size=3D2>&gt; <BR>&gt; I =
believe that you=20
want to use the RA value, in your case 02ea2614, as your<BR>&gt; =
Exception=20
Address (EA)<BR>&gt; <BR>&gt; <BR>&gt; Look up EA in your makeimg =
output.&nbsp;=20
It falls between two modules code starts<BR>&gt; (CS).&nbsp; The one =
with the=20
lower number is the module with the problem.&nbsp; Then<BR>&gt; the =
offset into=20
the module is EA-CS=3DMO.&nbsp; Look MO up in &lt;module.map&gt; in =
your<BR>&gt;=20
target folder.&nbsp; Similar to looking it up in the makeimg output, it =
will=20
give<BR>&gt; you the function that caused the exception, and the =
function offset=20
(FO).<BR>&gt; Do the math again MO-FO=3DIO.&nbsp; Now figure out which =
c/c++ file=20
contains the<BR>&gt; function, look up the function in the corresponding =
.COD=20
file, and find<BR>&gt; IO-8.&nbsp; That is the assembly instruction that =
caused=20
the exception, look up a<BR>&gt; few lines an you will see the c =
code.<BR>&gt;=20
<BR>&gt; <BR>&gt; If you don't have the .COD files, set the environment =
variable=20
WINCECOD=3D1<BR>&gt; and rebuild.<BR>&gt; <BR>&gt; <BR>&gt; <BR>&gt; -- =
<BR>&gt;=20
Bruce Eitman (eMVP)<BR>&gt; Senior Engineer<BR>&gt; beitman AT =
applieddata DOT=20
net<BR>&gt; <BR>&gt; Applied Data Systems<BR>&gt; &nbsp;</FONT><A=20
href=3D"http://www.applieddata.net"><FONT face=3DArial=20
size=3D2>www.applieddata.net</FONT></A><BR><FONT face=3DArial =
size=3D2>&gt; An ISO=20
9001:2000 Registered Company<BR>&gt; Microsoft WEP Gold-level =
Member<BR>&gt;=20
<BR>&gt; <BR>&gt; "ms" &lt;</FONT><A=20
href=3D"mailto:ms@discussions.microsoft.com"><FONT face=3DArial=20
size=3D2>ms@discussions.microsoft.com</FONT></A><FONT face=3DArial =
size=3D2>&gt; wrote=20
in message <BR>&gt; </FONT><A=20
href=3D"news:%23Wttx8a2FHA.2316@tk2msftngp13.phx.gbl"><FONT face=3DArial =

size=3D2>news:%23Wttx8a2FHA.2316@tk2msftngp13.phx.gbl</FONT></A><FONT =
face=3DArial=20
size=3D2>...<BR>&gt; &gt; Hi,<BR>&gt; &gt;<BR>&gt; &gt; I have a bug in =
my driver=20
which results in an Undefined instruction<BR>&gt; &gt; exception<BR>&gt; =

&gt;<BR>&gt; &gt; AKY=3D00000049<BR>&gt; &gt; PC=3D02ea26c0<BR>&gt; &gt; =

RA=3D02ea2614<BR>&gt; &gt; BVA=3D08140690<BR>&gt; &gt; =
FSR=3D000000f5<BR>&gt;=20
&gt;<BR>&gt; &gt; What does the FSR mean? The instruction at the PC =
address=20
is<BR>&gt; &gt;<BR>&gt; &gt; 02ea26c0 E59F3060&nbsp; ldr&nbsp;&nbsp;=20
r3,[pc,#0x60]&nbsp; which seems valid instruction<BR>&gt; &gt;<BR>&gt; =
&gt; When=20
these come up i was wondering which are the key addresses to look at =
<BR>&gt;=20
&gt; to<BR>&gt; &gt; find out<BR>&gt; &gt; what is causing it. I'm using =
PXA255=20
with WinCE V5.0.<BR>&gt; &gt;<BR>&gt; &gt; Thanks<BR>&gt; &gt;<BR>&gt; =
&gt;=20
<BR>&gt; <BR>&gt; </FONT></BODY></HTML>

------=_NextPart_000_0027_01C5DA66.937D9F10--


Re: How to debug an exception by ms

ms
Wed Oct 26 13:51:54 CDT 2005

Hi Woojung, where did you get that info from
on the Fault status register?

"Woojung" <Woojung_DOT_Huh_AT_smsc_DOT_com> wrote in message
news:7B2973CE-39A5-40DB-82DE-BA41EC318FE1@microsoft.com...
> FSR is "Fault Status Register"
>
> FSR=000000f5 means
> Domain Number = 0xF
> Status = 0x05 (Section Translation Fault)
>
> Woojung
>
>
> "ms" wrote:
>
> > Hi,
> >
> > I have a bug in my driver which results in an Undefined instruction
> > exception
> >
> > AKY=00000049
> > PC=02ea26c0
> > RA=02ea2614
> > BVA=08140690
> > FSR=000000f5
> >
> > What does the FSR mean? The instruction at the PC address is
> >
> > 02ea26c0 E59F3060 ldr r3,[pc,#0x60] which seems valid instruction
> >
> > When these come up i was wondering which are the key addresses to look
at to
> > find out
> > what is causing it. I'm using PXA255 with WinCE V5.0.
> >
> > Thanks
> >
> >
> >



Re: How to debug an exception by Dean

Dean
Wed Oct 26 14:50:33 CDT 2005

See the private tree for exception handling code (mdarm.c, armtrap.s). FSR
is a dump of the Fault Status Register which is defined in the ARM
architecture documents.

--
Dean Ramsier - eMVP
BSQUARE Corporation


"ms" <ms@discussions.microsoft.com> wrote in message
news:OF0FY5l2FHA.4076@TK2MSFTNGP09.phx.gbl...
> Hi Woojung, where did you get that info from
> on the Fault status register?
>
> "Woojung" <Woojung_DOT_Huh_AT_smsc_DOT_com> wrote in message
> news:7B2973CE-39A5-40DB-82DE-BA41EC318FE1@microsoft.com...
>> FSR is "Fault Status Register"
>>
>> FSR=000000f5 means
>> Domain Number = 0xF
>> Status = 0x05 (Section Translation Fault)
>>
>> Woojung
>>
>>
>> "ms" wrote:
>>
>> > Hi,
>> >
>> > I have a bug in my driver which results in an Undefined instruction
>> > exception
>> >
>> > AKY=00000049
>> > PC=02ea26c0
>> > RA=02ea2614
>> > BVA=08140690
>> > FSR=000000f5
>> >
>> > What does the FSR mean? The instruction at the PC address is
>> >
>> > 02ea26c0 E59F3060 ldr r3,[pc,#0x60] which seems valid instruction
>> >
>> > When these come up i was wondering which are the key addresses to look
> at to
>> > find out
>> > what is causing it. I'm using PXA255 with WinCE V5.0.
>> >
>> > Thanks
>> >
>> >
>> >
>
>



Re: How to debug an exception by Bruce

Bruce
Wed Oct 26 16:03:38 CDT 2005

I think that you found a bug in my instructions. Using RA, I don't think
that you need to subtract 8.

But try again with the PC value.

--
Bruce Eitman (eMVP)
Senior Engineer
beitman AT applieddata DOT net

Applied Data Systems
www.applieddata.net
An ISO 9001:2000 Registered Company
Microsoft WEP Gold-level Member


"ms" <ms@discussions.microsoft.com> wrote in message
news:eA3Mz4l2FHA.3272@TK2MSFTNGP09.phx.gbl...
Thanks Bruce, i tried to do what you've said

RA=02ea2614

in makeimg output i have i2c.dll at 02ea1000
and serial.dll at 02eb1000

So taking the lower one, i knew the problem is in i2c.dll anyway

EA-CS=MO 02ea2614-02ea1000 = 1614

In i2c.map file i have

0001:000015f4 SendStart
0001:00001730 SendAddress

MO-FO = 1614-15f4 = 0x20 = IO

IO-8 =0x18
in i2c.cod file, this is where i am confused, there is no 0x18 offset,
snippet of SendStart in i2c.cod below, it starts at ee0

Where have i gone wrong?

00ee0 |SendStart| PROC

; 410 : {

00ee0 |$L37615|
00ee0 e1a0c00d mov r12, sp
00ee4 e92d0001 stmdb sp!, {r0}
00ee8 e92d5000 stmdb sp!, {r12, lr}
00eec e24dd00c sub sp, sp, #0xC
00ef0 |$M37613|

; 411 : BOOL retval;
; 412 :
; 413 : retval = TRUE;

00ef0 e3a03001 mov r3, #1
00ef4 e58d3000 str r3, [sp]

; 414 : EnterCriticalSection(&RegCrit);

00ef8 e59f010c ldr r0, [pc, #0x10C]
00efc eb000000 bl EnterCriticalSection

; 415 :
; 416 : pI2C_reg->IDBR = DeviceAdd | WRITE_BIT;

00f00 e59f3110 ldr r3, [pc, #0x110]
00f04 e5933000 ldr r3, [r3]
00f08 e2832008 add r2, r3, #8
00f0c e59d3014 ldr r3, [sp, #0x14]
00f10 e5823000 str r3, [r2]















"Bruce Eitman (eMVP)" <beitmannospam@NOSPAM_applieddata.NOSPAM_net> wrote in
message news:eNHe68c2FHA.1416@TK2MSFTNGP09.phx.gbl...
>
> I believe that you want to use the RA value, in your case 02ea2614, as
> your
> Exception Address (EA)
>
>
> Look up EA in your makeimg output. It falls between two modules code
> starts
> (CS). The one with the lower number is the module with the problem. Then
> the offset into the module is EA-CS=MO. Look MO up in <module.map> in
> your
> target folder. Similar to looking it up in the makeimg output, it will
> give
> you the function that caused the exception, and the function offset (FO).
> Do the math again MO-FO=IO. Now figure out which c/c++ file contains the
> function, look up the function in the corresponding .COD file, and find
> IO-8. That is the assembly instruction that caused the exception, look up
> a
> few lines an you will see the c code.
>
>
> If you don't have the .COD files, set the environment variable WINCECOD=1
> and rebuild.
>
>
>
> --
> Bruce Eitman (eMVP)
> Senior Engineer
> beitman AT applieddata DOT net
>
> Applied Data Systems
> www.applieddata.net
> An ISO 9001:2000 Registered Company
> Microsoft WEP Gold-level Member
>
>
> "ms" <ms@discussions.microsoft.com> wrote in message
> news:%23Wttx8a2FHA.2316@tk2msftngp13.phx.gbl...
> > Hi,
> >
> > I have a bug in my driver which results in an Undefined instruction
> > exception
> >
> > AKY=00000049
> > PC=02ea26c0
> > RA=02ea2614
> > BVA=08140690
> > FSR=000000f5
> >
> > What does the FSR mean? The instruction at the PC address is
> >
> > 02ea26c0 E59F3060 ldr r3,[pc,#0x60] which seems valid instruction
> >
> > When these come up i was wondering which are the key addresses to look
> > at
> > to
> > find out
> > what is causing it. I'm using PXA255 with WinCE V5.0.
> >
> > Thanks
> >
> >
>
>


Re: How to debug an exception by Woojung_DOT_Huh_AT_smsc_DOT_com>

Woojung_DOT_Huh_AT_smsc_DOT_com>
Wed Oct 26 16:31:07 CDT 2005

Dean got an answer.

"Dean Ramsier" wrote:

> See the private tree for exception handling code (mdarm.c, armtrap.s). FSR
> is a dump of the Fault Status Register which is defined in the ARM
> architecture documents.
>
> --
> Dean Ramsier - eMVP
> BSQUARE Corporation
>
>
> "ms" <ms@discussions.microsoft.com> wrote in message
> news:OF0FY5l2FHA.4076@TK2MSFTNGP09.phx.gbl...
> > Hi Woojung, where did you get that info from
> > on the Fault status register?
> >
> > "Woojung" <Woojung_DOT_Huh_AT_smsc_DOT_com> wrote in message
> > news:7B2973CE-39A5-40DB-82DE-BA41EC318FE1@microsoft.com...
> >> FSR is "Fault Status Register"
> >>
> >> FSR=000000f5 means
> >> Domain Number = 0xF
> >> Status = 0x05 (Section Translation Fault)
> >>
> >> Woojung
> >>
> >>
> >> "ms" wrote:
> >>
> >> > Hi,
> >> >
> >> > I have a bug in my driver which results in an Undefined instruction
> >> > exception
> >> >
> >> > AKY=00000049
> >> > PC=02ea26c0
> >> > RA=02ea2614
> >> > BVA=08140690
> >> > FSR=000000f5
> >> >
> >> > What does the FSR mean? The instruction at the PC address is
> >> >
> >> > 02ea26c0 E59F3060 ldr r3,[pc,#0x60] which seems valid instruction
> >> >
> >> > When these come up i was wondering which are the key addresses to look
> > at to
> >> > find out
> >> > what is causing it. I'm using PXA255 with WinCE V5.0.
> >> >
> >> > Thanks
> >> >
> >> >
> >> >
> >
> >
>
>
>

Re: How to debug an exception by ms

ms
Wed Oct 26 16:48:44 CDT 2005

Ok, i think it is IO from the start of the function so if the function
starts
at EE0 then i need to add 0x20( ie the IO) to the start address of the
function.

which gives me for RA

416 : pI2C_reg->IDBR = DeviceAdd | WRITE_BIT;
>
> 00f00 e59f3110 ldr r3, [pc, #0x110]

although i can't see why this is an undefined instruction

for PC i get

ldr r3, [pc,#0x60] which again can't see why this would be undefined
instruction


"Bruce Eitman (eMVP)" <beitmannospam@NOSPAM_applieddata.NOSPAM_net> wrote in
message news:u8mI%23Cn2FHA.3880@TK2MSFTNGP12.phx.gbl...
> I think that you found a bug in my instructions. Using RA, I don't think
> that you need to subtract 8.
>
> But try again with the PC value.
>
> --
> Bruce Eitman (eMVP)
> Senior Engineer
> beitman AT applieddata DOT net
>
> Applied Data Systems
> www.applieddata.net
> An ISO 9001:2000 Registered Company
> Microsoft WEP Gold-level Member
>
>
> "ms" <ms@discussions.microsoft.com> wrote in message
> news:eA3Mz4l2FHA.3272@TK2MSFTNGP09.phx.gbl...
> Thanks Bruce, i tried to do what you've said
>
> RA=02ea2614
>
> in makeimg output i have i2c.dll at 02ea1000
> and serial.dll at 02eb1000
>
> So taking the lower one, i knew the problem is in i2c.dll anyway
>
> EA-CS=MO 02ea2614-02ea1000 = 1614
>
> In i2c.map file i have
>
> 0001:000015f4 SendStart
> 0001:00001730 SendAddress
>
> MO-FO = 1614-15f4 = 0x20 = IO
>
> IO-8 =0x18
> in i2c.cod file, this is where i am confused, there is no 0x18 offset,
> snippet of SendStart in i2c.cod below, it starts at ee0
>
> Where have i gone wrong?
>
> 00ee0 |SendStart| PROC
>
> ; 410 : {
>
> 00ee0 |$L37615|
> 00ee0 e1a0c00d mov r12, sp
> 00ee4 e92d0001 stmdb sp!, {r0}
> 00ee8 e92d5000 stmdb sp!, {r12, lr}
> 00eec e24dd00c sub sp, sp, #0xC
> 00ef0 |$M37613|
>
> ; 411 : BOOL retval;
> ; 412 :
> ; 413 : retval = TRUE;
>
> 00ef0 e3a03001 mov r3, #1
> 00ef4 e58d3000 str r3, [sp]
>
> ; 414 : EnterCriticalSection(&RegCrit);
>
> 00ef8 e59f010c ldr r0, [pc, #0x10C]
> 00efc eb000000 bl EnterCriticalSection
>
> ; 415 :
> ; 416 : pI2C_reg->IDBR = DeviceAdd | WRITE_BIT;
>
> 00f00 e59f3110 ldr r3, [pc, #0x110]
> 00f04 e5933000 ldr r3, [r3]
> 00f08 e2832008 add r2, r3, #8
> 00f0c e59d3014 ldr r3, [sp, #0x14]
> 00f10 e5823000 str r3, [r2]
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
> "Bruce Eitman (eMVP)" <beitmannospam@NOSPAM_applieddata.NOSPAM_net> wrote
in
> message news:eNHe68c2FHA.1416@TK2MSFTNGP09.phx.gbl...
> >
> > I believe that you want to use the RA value, in your case 02ea2614, as
> > your
> > Exception Address (EA)
> >
> >
> > Look up EA in your makeimg output. It falls between two modules code
> > starts
> > (CS). The one with the lower number is the module with the problem.
Then
> > the offset into the module is EA-CS=MO. Look MO up in <module.map> in
> > your
> > target folder. Similar to looking it up in the makeimg output, it will
> > give
> > you the function that caused the exception, and the function offset
(FO).
> > Do the math again MO-FO=IO. Now figure out which c/c++ file contains
the
> > function, look up the function in the corresponding .COD file, and find
> > IO-8. That is the assembly instruction that caused the exception, look
up
> > a
> > few lines an you will see the c code.
> >
> >
> > If you don't have the .COD files, set the environment variable
WINCECOD=1
> > and rebuild.
> >
> >
> >
> > --
> > Bruce Eitman (eMVP)
> > Senior Engineer
> > beitman AT applieddata DOT net
> >
> > Applied Data Systems
> > www.applieddata.net
> > An ISO 9001:2000 Registered Company
> > Microsoft WEP Gold-level Member
> >
> >
> > "ms" <ms@discussions.microsoft.com> wrote in message
> > news:%23Wttx8a2FHA.2316@tk2msftngp13.phx.gbl...
> > > Hi,
> > >
> > > I have a bug in my driver which results in an Undefined instruction
> > > exception
> > >
> > > AKY=00000049
> > > PC=02ea26c0
> > > RA=02ea2614
> > > BVA=08140690
> > > FSR=000000f5
> > >
> > > What does the FSR mean? The instruction at the PC address is
> > >
> > > 02ea26c0 E59F3060 ldr r3,[pc,#0x60] which seems valid instruction
> > >
> > > When these come up i was wondering which are the key addresses to look
> > > at
> > > to
> > > find out
> > > what is causing it. I'm using PXA255 with WinCE V5.0.
> > >
> > > Thanks
> > >
> > >
> >
> >
>