none
Compact Flash Driver Support for PCI TI-1420 PCMCIA controller (x86) RRS feed

  • Question

  • I am using Win CE 6.0 R3/CEPC BSP for my x86 target. We have a PCI TI-1420 PCMCIA Controller on the target board which has a Compact Flash PCCARD reader with 256 MB CompactFlash (FAT formatted) installed. I am trying to make it work (access it from  under CE 6.0). I added the components TI PC Card (BSP_PCCARD_TIPPCARD), Compact Flash/PC Card Storage (SYSGEN_ATADISK)  in my OSDesign.  After I boot my NK.bin (debug) successfully on my x86 target, when I try to insert the CF PCCARD, I get the following debug message over COM1.

     

    PCCARD: DEBUGCHK failed in file C:\yzkiqfe\public\COMMON\oak\drivers\pccard\mdd\mdd_both\..\pcmciac.cpp at line 1495 
    DEBUG_BREAK @c0bb1a3b Ignored.
    CPCPcmciaCard::GetConfigureRegisterBase: Can't get PCMCIA register address. return FAILS
    PCCARD: DEBUGCHK failed in file C:\yzkiqfe\public\COMMON\oak\drivers\pccard\mdd\mdd_both\..\pcmciac.cpp at line 1495 
    DEBUG_BREAK @c0bb1a3b Ignored.
    GetCardCRC: CardGetFirstTuple returned fails
    PCCARD: DEBUGCHK failed in file C:\yzkiqfe\public\COMMON\oak\drivers\pccard\mdd\mdd_both\..\pcmciac.cpp at line 1495 
    DEBUG_BREAK @c0bb1a3b Ignored.
    DEVICE!RegReadActivationValues RegQueryValueEx(Drivers\PCCARD\PCMCIA\INSTANCE\PCMCIA1\Prefix) returned 2
    DEVICE!RegReadActivationValues RegQueryValueEx(Drivers\PCCARD\PCMCIA\INSTANCE\PCMCIA1\BusPrefix) returned 2
    CardBus.DLL DLL_PROCESS_ATTACH
    PCCARD: DEBUGCHK failed in file C:\yzkiqfe\public\COMMON\oak\drivers\pccard\mdd\mdd_both\..\pcmciac.cpp at line 969 
    DEBUG_BREAK @c0bb0820 Ignored.
    PCMCIA: DEBUGCHK failed in file C:\yzkiqfe\public\COMMON\oak\drivers\pccard\pcmcia\.\pcmcia.cpp at line 603 
    DEBUG_BREAK @c0bd8b22 Ignored.
    DEVICE!LaunchDevice: Init() failed for device 0xd08bdda0
    DEVICE!I_ActivateDeviceEx: couldn't activate: prefix <nil>, index -1, dll pcmcia.dll, context 0xd05ff6a4
    CardBus.DLL DLL_PROCESS_DETACH
    CPCIEnum::ActivateDevice: ActivateDeviceEx return fails for registry Drivers\PCCARD\PCMCIA\INSTANCE\PCMCIA1 
    DlgMgr: FindDlgItem id 1 returning NULL.
    


    And then a dialog on the target device with title "Unidentified PCCARD Adapter" saying  "Enter the name of the driver for this PCCARD". I tried to enter atadisk.dll in the dialog box but nothing happens.

    Has anyone tried to make a PCMCIA CF work under CE 6.0?


    • Edited by techgeek12345 Monday, September 19, 2011 11:25 PM better readability
    Monday, September 19, 2011 11:25 PM

All replies

  • What if you insert the card before booting the OS?
    Luca Calligaris lucaDOTcalligarisATeurotechDOTcom www.eurotech.com Check my blog: http://lcalligaris.wordpress.com
    Tuesday, September 20, 2011 5:53 AM
  • Upon booting OS with card inserted I get the following relevant log messages:

    EVICE!RegReadActivationValues RegQueryValueEx(Drivers\BuiltIn\PCI\Instance\PCC_TIPCCARD2\BusPrefix) returned 2
    DeviceFolder::LoadDevice(Drivers\BuiltIn\PCI\Instance\PCC_TIPCCARD2) last 83 TicksDEVICE!RegReadActivationValues RegQueryValueEx(Drivers\BuiltIn\PCI\Instance\PCC_TIPCCARD1\Prefix2
    DEVICE!RegReadActivationValues RegQueryValueEx(Drivers\BuiltIn\PCI\Instance\PCC_TIPCCARD1\BusPrefix) returned 2
    DeviceFolder::LoadDevice(Drivers\BuiltIn\PCI\Instance\PCC_TIPCCARD1) last 70 TicksDEVICE!RegReadActivationValues RegQueryValueEx(Drivers\BuiltIn\PCI\Instance\ICH21\BusPrefix) ret2
    DEVICE!RegReadActivationValues RegQueryValueEx(Drivers\BuiltIn\PCI\Instance\ICH21\Device0\BusPrefix) returned 2
    PCCARD: DEBUGCHK failed in file C:\yzkiqfe\public\COMMON\oak\drivers\pccard\mdd\mdd_both\..\pcmciac.cpp at line 1495 
    DEBUG_BREAK @c0be1a3b Ignored.
    PCCARD: DEBUGCHK failed in file C:\yzkiqfe\public\COMMON\oak\drivers\pccard\mdd\mdd_both\..\pcmciac.cpp at line 1495 
    DEBUG_BREAK @c0be1a3b Ignored.
    PCCARD: DEBUGCHK failed in file C:\yzkiqfe\public\COMMON\oak\drivers\pccard\mdd\mdd_both\..\pcmciac.cpp at line 1495 
    DEBUG_BREAK @c0be1a3b Ignored.
    GetCardCRC: CardGetFirstTuple returned fails
    PCCARD: DEBUGCHK failed in file C:\yzkiqfe\public\COMMON\oak\drivers\pccard\mdd\mdd_both\..\pcmciac.cpp at line 1495 
    DEBUG_BREAK @c0be1a3b Ignored.
    PCCARD: DEBUGCHK failed in file C:\yzkiqfe\public\COMMON\oak\drivers\pccard\mdd\mdd_both\..\pcmciac.cpp at line 1495 
    DEBUG_BREAK @c0be1a3b IgnorDEVICE!RegReadActivationValues RegQueryValueEx(Drivers\BuiltIn\PCI\Instance\ICH21\Device1\BusPrefix) returned 2
    ed.
    PCCARD: DEBUGCHK failed in file C:\yzkiqfe\public\COMMON\oak\drivers\pccard\mdd\mdd_both\..\pcmciac.cpp at line 1495 
    DEBUG_BREAK @c0be1a3b Ignored.
    PCCARD: DEBUGCHK failed in file C:\yzkiqfe\public\COMMON\oak\drivers\pccard\mdd\mdd_both\..\pcmciac.cpp at line 1495 
    DEBUG_BREAK @c0be1a3b Ignored.
    PCCARD: DEBUGCHK failed in file C:\yzkiqfe\public\COMMON\oak\drivers\pccard\m[NOTIFY] HandleSystemEvent 7 /ADD DSK1:
    FSDMGR!MountStore: Attaching new storage device "DSK1:"dd\mdd_both\..\pcmciac.cpp at line 1495 
    DEBUG_BREAK @c0be1a3b Ignored.
    PCCARD: DEBUGCHK failed in file C:\yzkiqfe\public\COMMON\oak\drivers\pccard\mdd\mdd_both\..\pcmciaen.cpp at line 664 
    DEBUG_BREAK @c0be8d65 Ignored.
    PCCARD: DEBUGCHK failed in file C:\yzkiqfe\public\COMMON\oak\drivers\pccard\mdd\mdd_both\..\pcmciac.cpp at line 1495 
    DEBUG_BREAK @c0be1a3b Ignored.
    DEVICE!RegReadActivationValues RegQueryValueEx(Drivers\PCCARD\PCMCIA\INSTANCE\PCMCIA1\Prefix) returned 2
    DEVICE!RegReadActivationValues RegQueryValueEx(Drivers\PCCARD\PCMCIA\INSTANCE\PCMCIA1\BusPrefix) returned 2
    CardBus.DLL DLL_PROCESS_ATTACH
    PCCARD: DEBUGCHK failed in file C:\yzkiqfe\public\COMMON\oak\drivers\pccard\mdd\mdd_both\..\pcmciac.cpp at line 969 
    DEBUG_BREAK @c0be0820 Ignored.
    PCMCIA: DEBUGCHK failed in file C:\yzkiqfe\public\COMMON\oak\drivers\pccard\pcmcia\.\pcmcia.cpp at line 1419 
    DEBUG_BREAK @c0c0a357 Ignored.
    PCMCIA: DEBUGCHK failed in file C:\yzkiqfe\public\COMMON\oak\drivers\pccard\pcmcia\.\pcmcia.cpp at line 581 
    DEBUG_BREAK @c0c08a08 Ignored.
    PCMCIA: DEBUGCHK failed in file C:\yzkiqfe\public\COMMON\oak\drivers\pccard\pcmcia\.\pcmcia.cpp at line 603 
    DEBUG_BREAK @c0c08b22 Ignored.
    DEVICE!LaunchDevice: Init() failed for device 0xd08a3620
    DEVICE!I_ActivateDeviceEx: couldn't activate: prefix <nil>, index -1, dll pcmcia.dll, context 0xd086f6a4
    CardBus.DLL DLL_PROCESS_DETACH
    CPCIEnum::ActivateDevice: ActivateDeviceEx return fails for registry Drivers\PCCARD\PCMCIA\INSTANCE\PCMCIA1 
    DEVICE!RegReadActivationValues RegQueryValueEx(Drivers\BuiltIn\PCI\Instance\ICH21\Device2\BusPrefix) returned 2
    

    How can I further debug this at code level? I have a working KITL connection but I have never debugged it at the source level under CE.

    Tuesday, September 20, 2011 4:38 PM
  • Well debugging is a sort of an art: you can find a lot of information on MSDN and various blogs:

    http://msdn.microsoft.com/en-us/library/ee480184(v=winembedded.60).aspx

    http://blogs.msdn.com/b/ce_base/archive/tags/debugging+and+performance+tools/

    In your case you have basically two options:

    1) since you have a working KITL connection you can create a debug version of the OS and run it: the DEBUGCHK macro asserts an expression and, in a debug build, produces a DebugBreak if the expression is FALSE. The first DEBUGCHK will break into the debugger so you can see the variables values, the call stack: for details you better read the documentation

    2) analyze the code: from the KITL output you see that the first DEBUGCHK happens in %_WINCEROOT%\PUBLIC\COMMON\OAK\DRIVERS\PCCARD\MDD\pcmciac.cpp at line 1495. If you look at the code

    you can find in CPcmciaMemWindow::Init()

     

       DEBUGCHK( FALSE );
    
    

       
    If you look at the CPcmciaMemWindow::Init() in its whole you see that it goes like

    BOOL CPcmciaMemWindow::Init()
    {
        m_uWinIndex = m_pPcmciaCard->CardRequestWindowNoSpecial( &m_WinParms );
        if( m_uWinIndex == ( UINT16 ) - 1 )
        {
            // Fails, try 16-bit access.
            m_WinParms.fAttributes |= WIN_ATTR_16BIT;
            m_b16bitAccess = TRUE;
            m_uWinIndex = m_pPcmciaCard->CardRequestWindowNoSpecial( &m_WinParms );
        }
        if( m_uWinIndex != ( UINT16 ) - 1 )
        {
            // success
       
      //some code which will possibly return TRUE if everything is OK 
        }
        DEBUGCHK( FALSE ); //This is the DEBUGCHK you hit at line 1495
        return FALSE;
    } 
    
    
    

     

     

    So you reach the DEBUGCHK at line 1495 because the m_pPcmciaCard->CardRequestWindowNoSpecial( &m_WinParms ) function fails in both 16 bit and 32 bit access.

    The CPCPcmciaCard::CardRequestWindowNoSpecial is in the same file %_WINCEROOT%\PUBLIC\COMMON\OAK\DRIVERS\PCCARD\MDD\pcmciac.cpp so you have to figure out why it's failing
    looking at the function it calls.


    Luca Calligaris lucaDOTcalligarisATeurotechDOTcom www.eurotech.com Check my blog: http://lcalligaris.wordpress.com
    Wednesday, September 21, 2011 8:59 AM
  • Luca,

    As you suggested I tried the first method (KITL) to debug. I set Enable Kernel Debugger (IMGNODEBUGGER=1) in my OS Design Properties for the Debug build. Then under "Target Device Connectivity Options: Kernel Service Map" I set the Debugger as "KdStub".

    After downloading and booting NK.bin over Ethernet, I started seeing the usual debug messages in my Platform Builder's "Windows CE Debug" Output Windows. However, as my OS was booting, a dialog named "Find Symbol" popped up asking me to enter the path for:

    "D:\DUBLIN2-14\PRIVATE\WINCEOS\COREOS\GWE\MGDI\BASE"

    On my host machine I only found  the following directory:

    INC

    under

    C:\WINCE600\PRIVATE\WINCEOS\COREOS\GWE\MGDI
    Does that mean that I don't have the "Full" Shared source installed? I was under the impression that I had installed all the source code a year back but apparently I did not.

    If I hit "Cancel" the OS appears to boot further and then finally stops with following debug messages:

    4294818628 PID:400002 TID:2f0000e Grow Gdi handle table from 0 to 64
    4294818629 PID:400002 TID:2f0000e LogFontFromRegistry(SYSTEM\GDI\SysFnt), lfHeight = -12
    4294818913 PID:400002 TID:2f0000e OSAXST1: >>> Loading Module 'ddi_xgi.dll' (0x83591678) at address 0xD2B40000-0xD2BA9000 in Process 'NK.EXE' (0x8251CCA0)
    4294818935 PID:400002 TID:2f0000e *** FAILED TO INITIALIZE DISPLAY DRIVER (ddi_xgi.dll)! ***
    4294818935 PID:400002 TID:2f0000e *** MAKE SURE DISPLAY DRIVER CONFIGURATION SETTINGS ARE CORRECT! ***
    4294818935 PID:400002 TID:2f0000e Unknown: DEBUGCHK failed in file D:\Dublin2-14\private\winceos\COREOS\gwe\mgdi\base\.\driver.cpp at line 118 

    Any ideas what am I missing from my setup?

     

     

    Wednesday, September 21, 2011 6:50 PM
  • There's nothing wrong with your 'PRIVATE' code: the shared source program does not include all the code and GWES is one of the missing pieces.

    For your knowledge MSFT has also a 'premium' shared source program which includes more code GWES, FILESYS, ... : you can access if you meet the criteria (see http://www.microsoft.com/resources/sharedsource/ccp.mspx)  for example if you're an MVP.

    It looks lilke your display driver does not like debug mode: you're stuck to the same problem you describe here: http://social.msdn.microsoft.com/Forums/en-US/winembplatdev/thread/506f24cd-1ef0-49eb-a467-1b900d568920/#64185a6c-bb3a-4814-a446-e6620095d148.

    For the moment, in order to debug your real problem, use the NULL DDI_NOP display driver


    Luca Calligaris lucaDOTcalligarisATeurotechDOTcom www.eurotech.com Check my blog: http://lcalligaris.wordpress.com
    Thursday, September 22, 2011 12:58 PM