none
Errors when compiling touch driver (copied from _WINCEROOT%\Public\Common\Oak\Drivers\Touch) RRS feed

  • Question

  • Hi,

    If compile the touch driver (located in _WINCEROOT%\Public\Common\Oak\Drivers\Touch) it compiles just fine there. If I copy it to my bsp then it will not compile there. One of the files includes marshall.hpp from public section and there are lots of errors in this file. I have tried to copy marshall.hpp to my bsp and change it there but tons of other errors in public section started to appear in another files. Do you know a posssible reason for that?

     

    BUILD: [01:0000000628:ERRORE] Error(s) in directory "C:\WINCE700\platform\Template6\src\drivers\touch\tchstreammdd\".
    BUILD: [01:0000000629:ERRORE] c:\wince700\public\common\ddk\inc\marshal.hpp(121) : error C3861: 'CeOpenCallerBuffer': identifier not found
    BUILD: [01:0000000630:ERRORE] c:\wince700\public\common\ddk\inc\marshal.hpp(132) : error C3861: 'CeAllocAsynchronousBuffer': identifier not found
    BUILD: [01:0000000631:ERRORE] c:\wince700\public\common\ddk\inc\marshal.hpp(154) : error C2065: 'ARG_O_BIT' : undeclared identifier
    BUILD: [01:0000000632:ERRORE] c:\wince700\public\common\ddk\inc\marshal.hpp(177) : error C3861: 'CeFlushAsynchronousBuffer': identifier not found
    BUILD: [01:0000000633:ERRORE] c:\wince700\public\common\ddk\inc\marshal.hpp(199) : error C3861: 'CeFreeAsynchronousBuffer': identifier not found
    BUILD: [01:0000000634:ERRORE] c:\wince700\public\common\ddk\inc\marshal.hpp(203) : error C3861: 'CeCloseCallerBuffer': identifier not found
    BUILD: [01:0000000635:ERRORE] c:\wince700\public\common\ddk\inc\marshal.hpp(366) : error C3861: 'CeAllocDuplicateBuffer': identifier not found
    BUILD: [01:0000000636:ERRORE] c:\wince700\public\common\ddk\inc\marshal.hpp(375) : error C3861: 'CeFreeDuplicateBuffer': identifier not found
    BUILD: [01:0000000637:ERRORE] c:\wince700\public\common\ddk\inc\marshal.hpp(405) : error C3861: 'CeAllocAsynchronousBuffer': identifier not found
    BUILD: [01:0000000638:ERRORE] c:\wince700\public\common\ddk\inc\marshal.hpp(414) : error C3861: 'CeFreeAsynchronousBuffer': identifier not found
    BUILD: [01:0000000639:ERRORE] c:\wince700\public\common\ddk\inc\marshal.hpp(423) : error C3861: 'CeFlushAsynchronousBuffer': identifier not found
    BUILD: [01:0000000640:ERRORE] c:\wince700\platform\template6\src\drivers\touch\tchstreammdd\tchmdd.cpp(543) : error C2065: 'ARG_O_PTR' : undeclared identifier
    BUILD: [01:0000000641:ERRORE] NMAKE : fatal error U1077: 'C:\WINCE700\sdk\bin\i386\ARM\cl.EXE' : return code '0x2'
    BUILD: [01:0000000642:INFO  ] Stop.
    BUILD: [01:0000000643:ERRORE]  clean TargetCompilePass  -nologo BUILDMSG=Stop.  BUILDROOT=C:\WINCE700\platform\Template6 CLEANBUILD=1 NOLINK=1 NOPASS0=1 failed - rc = 2.
    BUILD: [00:0000000644:INFO  ] Will Build C:\WINCE700\platform\Template6\src\drivers\touch\oldtouch\basic\tchbasic.c because target: obj\ARMV7\debug\tchbasic.obj is missing.
    BUILD: [00:0000000645:PROGC ] Building COMPILE Pass in C:\WINCE700\platform\Template6\src\drivers\touch\oldtouch\basic\ directory.

     

    Thanks


    • Edited by Jker Wednesday, October 5, 2011 1:09 PM
    Wednesday, October 5, 2011 1:08 PM

All replies

  • Try to add %_WINCEROOT%\public\common\ddk\inc to the INCLUDE directive of the sources file in C:\WINCE700\platform\Template6\src\drivers\touch\tchstreammdd


    Luca Calligaris lucaDOTcalligarisATeurotechDOTcom www.eurotech.com Check my blog: http://lcalligaris.wordpress.com
    Wednesday, October 5, 2011 1:13 PM
  • In addition, if you're trying to build your 'own' touch driver in the BSP tree you do not need to copy the MDD code in your BSP, you simply link the PDD (the specific code for your touch which is under the BSP) with the MDD library. For example, the sources file in the PDD code may look like:

     

    TARGETNAME=yourtouch
    RELEASETYPE=PLATFORM
    TARGETTYPE=DYNLINK
    
    DLLENTRY=_DllMainCRTStartup
    
    
    TARGETLIBS= \
        $(_COMMONSDKROOT)\lib\$(_CPUINDPATH)\coredll.lib \
        $(_COMMONOAKROOT)\lib\$(_CPUINDPATH)\ceddk.lib \
        $(_PLATLIB)\$(_CPUDEPPATH)\cspddk.lib \
    
    SOURCELIBS= \
        $(_COMMONOAKROOT)\lib\$(_CPUINDPATH)\tchstreammdd.lib \
    
    DEFFILE=$(_COMMONOAKROOT)\inc\tchstream.def
    
    
    SOURCES= \
        bsppddtouch.cpp
    
    INCLUDES= \
        $(INCLUDES);



     

     


    Luca Calligaris lucaDOTcalligarisATeurotechDOTcom www.eurotech.com Check my blog: http://lcalligaris.wordpress.com
    Wednesday, October 5, 2011 1:36 PM
  • Thanks for the info.

    I still have a couple of questions:

    1. What is cspddk.lib? I have never seen it used before in my BSP.

    2. Is there an example of Touch Gesture PDD implementation anywhere (any info on this subject)? I have already developed a physical layer for my hardware and now need to know how to connect it to the MDD part.

    Thursday, October 6, 2011 8:57 AM
  • Now I am trying to load the driver. I have the following registry settings:

    [HKEY_LOCAL_MACHINE\Drivers\TOUCH]
    "Dll"="touch1.dll"
    "Order"=dword:2
    "Prefix"="TSC"
    "Index"=dword:1
    "Flags"=dword:8
    ; IClass = touch driver class and power managed touch device
    "IClass"=multi_sz:"{25121442-08CA-48dd-91CC-BFC9F790027C}",
                          "{7119776D-9F23-4e4e-9D9B-9AE962733770}"
    "Priority256"=dword:6D    ; touch ist priority = 109
    [HKEY_LOCAL_MACHINE\HARDWARE\DEVICEMAP\TOUCH]
    "DriverName"="tchproxy.dll"
    "CalibrationData"="511,410 254,192 254,624 764,624 768,196"
    "MaxCalError"=dword:7
    [HKEY_LOCAL_MACHINE\System\GWE\TouchProxy]
    "tchcaldll"="tchcaldll.dll"

    But it seems that TouchProxy cannot load touch1.dll which I have l linked with  tchstreammdd.lib.

    Here is a debug output:

    PID:00400002 TID:0044000A OSAXST1: >>> Loading Module 'tchproxy.dll' (0xC0411F38) at address 0xEF860000-0xEF86A000 in Process 'NK.EXE' (0x91CFAAD0)
    PID:00400002 TID:0044000A OSAXST1: >>> Loading Module 'tchcaldll.dll' (0xC04121AC) at address 0xEF850000-0xEF858000 in Process 'NK.EXE' (0x91CFAAD0)
    PID:00400002 TID:0044000A OSAXST1: >>> Loading Module 'touch1.dll' (0xC04126EC) at address 0xEF6E0000-0xEF6EA000 in Process 'NK.EXE' (0x91CFAAD0)
    PID:00400002 TID:0044000A touch DllMain
    PID:00400002 TID:0044000A ERROR! DEVMGR: Failed to load 'Drivers\Touch'. dwStatus=0x1
    PID:00400002 TID:0044000A OSAXST1: <<< Unloading Module 'touch1.dll' (0xC04126EC) at address 0xEF6E0000-0xEF6EA000 in Process 'NK.EXE' (0x91CFAAD0)
    PID:00400002 TID:0044000A touch DllMain
    PID:00400002 TID:0044000A TchProxy: ERROR! Touch Driver not activated, and failed to activate it. GetLastError=0x32
    PID:00400002 TID:0044000A Oom Low             Pages: 0177  Bytes: 00177000


    • Edited by Jker Thursday, October 6, 2011 11:06 AM
    Thursday, October 6, 2011 11:05 AM
  • It looks like your DllMain is called, so start by checking the return value from it.
    Bruce Eitman (eMVP)
    Senior Engineer
    Bruce.Eitman AT Eurotech DOT com
    My BLOG http://geekswithblogs.net/bruceeitman

    Eurotech Inc.
    www.Eurotech.com
    Thursday, October 6, 2011 12:21 PM
    Moderator
  • It works fine if I load it directly (without tchproxy.dll). But it only fails to be loaded by tchproxy.dll.
    Thursday, October 6, 2011 1:30 PM
  • with 'load directly' do you mean by the device manager (as I describe in http://lcalligaris.wordpress.com/2011/01/14/touch-screen-stream-interface/)?

    according to the debug output you posted

    PID:00400002 TID:0044000A TchProxy: ERROR! Touch Driver not activated, and failed to activate it. GetLastError=0x32
    

    the failure happens when tchproxy calls ActivateDeviceEx to load the touch driver. Setting a breakpoint there and follow the calls should reveal where ERROR_NOT_SUPPORTED comes from


    Luca Calligaris lucaDOTcalligarisATeurotechDOTcom www.eurotech.com Check my blog: http://lcalligaris.wordpress.com
    Thursday, October 6, 2011 2:45 PM
  • Yes, it works if loaded by the device manager without tchproxy.dll being included in the image. In this case it (touch1.dll) acts like a simple stream driver, which only controls a hardware layer. What it basically does is that it starts a new thread, which in case of interrupt reads coordinates of fingers. Is there anything that I have to change in my code so that it can be linked with MDD and later loaded by tchproxy.dll? Is there a skeleton PDD touch screen driver with stubs? So I could at least start with this. That would be extremely helpful.

    before this:

    PID:00400002 TID:0044000A TchProxy: ERROR! Touch Driver not activated, and failed to activate it. GetLastError=0x32

    it unloads my stream driver:

    PID:00400002 TID:0044000A OSAXST1: >>> Loading Module 'touch1.dll' (0xC04126EC) at address 0xEF6E0000-0xEF6EA000 in Process 'NK.EXE' (0x91CFAAD0)
    PID:00400002 TID:0044000A touch DllMain
    PID:00400002 TID:0044000A ERROR! DEVMGR: Failed to load 'Drivers\Touch'. dwStatus=0x1
    PID:00400002 TID:0044000A OSAXST1: <<< Unloading Module 'touch1.dll' (0xC04126EC) at address 0xEF6E0000-0xEF6EA000 in Process 'NK.EXE' (0x91CFAAD0)

    And then it tries to activate something....

    Unfortunately I cannot set any breakpoints and debug. The bsp provides this functionality only for ethernet connection, but my board doesn't have an ethernet chip at all.

    Thursday, October 6, 2011 3:45 PM
  • I just noticed in your log output the line:

     

    PID:00400002 TID:0044000A ERROR! DEVMGR: Failed to load 'Drivers\Touch'. dwStatus=0x1
     


    where 1 == ERROR_INVALID_FUNCTION as if the device manager check of the entry points exported by the DLL fails.

    Coupling this message with

    PID:00400002 TID:0044000A TchProxy: ERROR! Touch Driver not activated, and failed to activate it. GetLastError=0x32

    where 0x32 = ERROR_NOT_SUPPORTED

    It looks like the whole thing is failing in DeviceContent::LoadLib (%_WINCEROOT%\private\winceos\COREOS\device\devcore\devinit.cpp)

    		
    

    Apparently because the touch .def file does not export the 'Seek'entry point.

    Can you enable ZONE_WARNING debug zone in the device

     

     

     


    Luca Calligaris lucaDOTcalligarisATeurotechDOTcom www.eurotech.com Check my blog: http://lcalligaris.wordpress.com
    Friday, October 7, 2011 2:02 PM