Trying to use the Microsoft DeviceEmulator BSP to create a CE5 image
for use with VS2005 DeviceEmulator.

Basically its working but I'm having bother with the touchscreen
driver.

When I click in the emulator window I get the following Data Abort
exception.

Data Abort: Thread=9fd98514 Proc=8c226350 'gwes.exe'
AKY=00000009 PC=024b3cb0(touch.dll+0x00003cb0) RA=024b40a0(touch.dll
+0x000040a0)
BVA=08000000 FSR=00000407

This is captured on the serial debug output.
By use of RETAILMSGs I have tracked this down to the call

RETAILMSG(1, (_T("Calling pfnCallback %x, %x, %x, %x\r\n"),
pfnCallback, SampleFlags, CalX, CalY));
(pfnCallback)( SampleFlags, CalX, CalY);
RETAILMSG(1, (_T("Back from pfnCallback %x\r\n"), pfnCallback));

in TouchPanelpISR in touch\tchmain\tchmain.c in the public touch panel
driver code
It never returns from the (pfnCallBack) call.
I have checked that the address in pfnCallBack is the same here as it
was when it was passed to "TouchPanelEnable"

Any ideas how I can find out whats causing this and fix it?
Has anyone else successfully built a CE5 image using MS DeviceEmulator
BSP?

Thanks
Andrew

Re: data abort in touch driver in DeviceEmulator BSP due to by AJM42

AJM42
Wed May 07 02:34:35 PDT 2008


Got some more information on this.

The problem is due to "_phStubWnd" in tchstub.cpp not being
initialised.
This is not initialised because "CgrTouchStubInitialize" is not being
called.
This means that "TouchPanelDllEntry" is not being called.

Now I know the touch driver is being loaded by gwes since I can see
other debug from it.
Why is "TouchPanelDllEntry" not being called?

Any ideas?

Thanks
Andrew

Re: data abort in touch driver in DeviceEmulator BSP due to by AJM42

AJM42
Mon May 12 01:05:35 PDT 2008

More I look at this the more confused I get!

Looking at touch.dll with dependency walker (and looking at the .def
file supports this), TouchPanelDllEntry is not exported by the Dll.

So surely that means that TouchPanelDllEntry cannot be called from
outside of the Dll?
And I can find no calls to TouchPanelDllEntry in the source code.

So how can TouchPanelDllEntry ever be called?
In my build for the DeviceEmulator it appear this is the case - i.e.
TouchPanelDllEntry is not called.
However, in my build for my target device something is calling
TouchPanelDllEntry since CgrTouchStubInitialise is called.






Re: data abort in touch driver in DeviceEmulator BSP due to by AJM42

AJM42
Mon May 12 03:24:08 PDT 2008

Found the problem.

The sources file in the touch driver for the DeviceEmulator BSP was
missing:

DLLENTRY=TouchPanelDllEntry