none
PMIC dll is not loading RRS feed

  • Question

  • Hello,

    I have enabled PMIC in my source but pmicpdk_mc13892.dll is not at all getting loaded.

    Working on WEC7...

    Any suggestions ??

    Regards,

    Seetharam


    Seeth

    Thursday, November 8, 2012 12:06 PM

All replies

  • what does "enabled PMIC" mean?

    Did you add the driver to your bib file?

    Did you add registry settings to your reg file?

    Did you check to see if the driver and registry settings are in your OS?

    Are there any debug messages?

    How do you know that it isn't getting loaded?


    Bruce Eitman (eMVP)
    Senior Engineer
    Bruce.Eitman AT Eurotech DOT com
    My BLOG http://geekswithblogs.net/bruceeitman

    Eurotech Inc.
    www.Eurotech.com

    Thursday, November 8, 2012 12:31 PM
    Moderator
  • Hello Bruce,

    I have added driver entry in bib file and reg file as well.

    I see them in ce.bib and regini.ini. 

    I used regedit.exe after loading the OS to see the registry, pmicPdk_mc13892.dll is present under drivers->Builtin structure.

    No debug messages, its not getting loaded when I checked using KITL.

    Regards,

    Seetharam


    Seeth

    Thursday, November 8, 2012 12:50 PM
  • can you post the Bib file and reg file entries for the driver here? we can have a look

    Vinoth.R

    www.e-consystems.com

    http://vinoth-vinothblog.blogspot.com

    Thursday, November 8, 2012 3:27 PM
  • Reg and/Or Bib file settings for the mentioned dll not loading is wrong.

    There is no other reason that we can guess.

    --- Misbah


    Senior Design Engineer T.E.S Electroni Solutions (Bangalore-India) www.tes-dst.com email-misbah.khan@tes-dst.com

    Sunday, November 11, 2012 8:59 PM
  • Hey all, 

    I am copying my reg and bib settings for the same...

    IF BSP_NOPMIC !
    ; @XIPREGION IF PACKAGE_OEMDRIVERS
    [HKEY_LOCAL_MACHINE\Drivers\BuiltIn\PMI]
       "Prefix"="PMI"
       "Dll"="pmicpdk_mc13892.dll"
       "Index"=dword:1
       "Order"=dword:2
      ; "Flags"=dword:8
       "IClass"="{A32942B7-920C-486b-B0E6-92A702A99B35}"    ; PMCLASS_GENERIC_DEVICE
    ; @XIPREGION IF PACKAGE_OEMDRIVERS
    ENDIF BSP_NOPMIC 

    ; PMIC Stream Interface Driver and SDK DLLs
    ;
    IF BSP_NOPMIC !

        pmicPdk_mc13892.dll  $(_FLATRELEASEDIR)\pmicPdk_mc13892.dll      NK  SHK
    pmicSdk_mc13892.dll  $(_FLATRELEASEDIR)\pmicSdk_mc13892.dll      NK  SHK

    ENDIF BSP_NOPMIC !

    Please check them out,, 

    Regards,

    Seetharam



    Seeth

    Monday, November 12, 2012 5:08 AM
  • Your driver DLL name you have mentioned is " pmicPdk_mc13892.dll"

    in your bib file. But the same you have mentioned in reg file as "Dll"="pmicpdk_mc13892.dll"

    Check the two names.

    The DLL name should remain same in the sources file, bib file and the reg file.

    Hope this will help.

    --- Misbah


    Senior Design Engineer T.E.S Electroni Solutions (Bangalore-India) www.tes-dst.com email-misbah.khan@tes-dst.com

    Monday, November 12, 2012 6:23 AM
  • Hey Misbah,

    I have tried changing the name in reg file according to bib file but the same result..

    I have a doubt on Prefix name.. 

    Does it matter ??

    I am using the same name in dll entry and everywhere else but still same result..

    Seetharam



    Seeth

    Monday, November 12, 2012 6:53 AM
  • Lets check one by one :-

    1. What is the name of the driver DLL while compiling in sources file ?

    Give the exact name in bib file and reg file. Check the same DLL is being generated after compiling or not ?

    2. Prifix in reg file should remain same what you have mentioned in your driver def file and your driver source file (function entry points eg XXX_Init)

    3. Check is the variable in project batch file "BSP_NOPMIC" is reset as

    set BSP_NOPMIC= ?

    Double check all this parameters. Your problem lies there only .

    --- Misbah


    Senior Design Engineer T.E.S Electroni Solutions (Bangalore-India) www.tes-dst.com email-misbah.khan@tes-dst.com

    Monday, November 12, 2012 7:23 AM
  • 1. pmicPdk_mc13892.dll is the name of my dll in sources file.. Tried giving the same name in reg and bib files.. And same dll is getting created after compiling when I checked release directory...

    2. My def file looks like this... I guess prefix matches with the def file... 

    LIBRARY PMICPDK

    EXPORTS
       PMI_Init
       PMI_Deinit
       PMI_Open
       PMI_Close
       PMI_PowerUp

    3. BSP_NOPMIC=  , this is the setting in batch file... 

    Seetharam


    Seeth


    • Edited by Seeth Monday, November 12, 2012 8:09 AM
    Monday, November 12, 2012 8:07 AM
  • Increase the driver load order from 2 to a higher value in reg file.

    How are you confirming yourself that driver is not getting loaded ?

    It can be that it is getting loaded but unloaded immediately due to error ?

    Give print messages in driver's Entry function such as XXX_Init and XXX_Exit

    Also give print messages under DLLmain as :

    BOOL WINAPI DllEntry(HINSTANCE DllInstance, ULONG Reason, LPVOID Reserved)
    {
        RETAILMSG( 1, (TEXT("Driver: DllEntry\n")));
        switch (Reason) {
            case DLL_PROCESS_ATTACH:
            {
               
                RETAILMSG( 1, (TEXT("Driver: DLL_PROCESS_ATTACH\n")));
                /* If dpCurSettings is not implemented, this line should be removed.*/
                DEBUGREGISTER((HINSTANCE)DllInstance);
                //RETAILREGISTERZONES((HINSTANCE)DllInstance);
                
                //DisableThreadLibraryCalls((HMODULE)DllInstance);
            }
            break;

            case DLL_PROCESS_DETACH:
            {   
                RETAILMSG( 1, (TEXT("Driver: DLL_PROCESS_DETACH\n")));
            }
            break;

        }

        return TRUE;
    }

    See what is happening ?

    --- Misbah


    Senior Design Engineer T.E.S Electroni Solutions (Bangalore-India) www.tes-dst.com email-misbah.khan@tes-dst.com


    • Edited by Misbah Khan Monday, November 12, 2012 8:43 AM
    Monday, November 12, 2012 8:40 AM
  • Hi,

    Driver is not even getting loaded and unloaded, this I confirmed using KITL. I confirmed that its not at all loading using KITL itself.

    And I changed the order to 10 still the same result.

    I am not getting any prints in either Attach or init functions.

    I am trying to write a new driver with different Prefix, a sample driver. Then planning to copy the files of pmic driver.

    Seetharam


    Seeth

    Monday, November 12, 2012 8:44 AM
  • Check the log output. It should tell you something about what goes wrong of why .

    Try loading your driver dynamically (just a test program that uses activatedevice() to load your driver)

    Just a wild guess but the if the dll is part of a XIP region (XIP_REGION block specified in provided reg snippet), then is the dll is located in the correct Memory region (NANDIMAGE/NK config.bib)?


    -- Good luck, Erwin Zwart, Check out my blog: http://GuruCE.com/blog GuruCE Microsoft Embedded Partner http://GuruCE.com Consultancy, training and development services.

    Monday, November 12, 2012 11:23 AM
  • Yes, good idea try loading dynamically the driver using ActivatedeviceEx

    Also try removing "; @XIPREGION IF PACKAGE_OEMDRIVERS" it from reg file for testing.

    --- Misbah


    Senior Design Engineer T.E.S Electroni Solutions (Bangalore-India) www.tes-dst.com email-misbah.khan@tes-dst.com

    Monday, November 12, 2012 11:55 AM