Adding the Windows-based Desktop NDIS Miniport Driver to the Run-Time Image Build (Windows Embedded CE 6.0)


Before building the Windows-based desktop NDIS miniport driver in Platform Builder, add it to your Workspace.

  1. Navigate to the directory containing your Windows desktop-based NDIS miniport driver, and copy all .c and .h files to %_WINCEROOT%\Platform\%_TGTPLAT%\Drivers\CENDISMiniport.

    Replace CENDISMiniport with an appropriate directory name for your Windows Embedded CE-based NDIS miniport driver.

  2. Add an entry for the CENDISMiniport directory to the Dirs file in %_WINCEROOT%\Platform\%_TGTPLAT%\Drivers.

  3. Add a Sources file to %_WINCEROOT%\Platform\%_TGTPLAT%\Drivers\CENDISMiniport.

    In the following sources file example for the E100BEX driver, miniport_test is the name of the OS design created with Platform Builder, and CEPC is %_TGTPLAT%.

    # if define LBFO then undefine OFFLOAD
    # if define OFFLOAD then undefine LBFO, LBFO and OFFLOAD cannot both be defined
    # default LBFO and OFFLOAD are not defined
    $(_PROJECTSDKROOT)\lib\x86\retail\coredll.lib    \
    $(_PROJECTOAKROOT)\lib\x86\retail\ceddk.lib    \
    $(_PROJECTOAKROOT)\lib\x86\retail\netmui.lib    \
    SOURCES = \
       mp_main.c  \
       offload.c  \
       mp_init.c  \
       mp_req.c   \
       mp_nic.c   \
       mp_dbg.c   \
       eeprom.c   \
       physet.c   \
    #  WINCETARGETFILE0 must match the def file name.
  4. Add a Makefile file to %_WINCEROOT%\Platform\%_TGTPLAT%\Drivers\CENDISMiniport.

    The following code example shows a Makefile file. All Windows Embedded CE-based Makefile files are identical.

    !INCLUDE $(_MAKEENVROOT)\makefile.def
  5. Expose the NDIS miniport driver entry point by adding a .def file to %_WINCEROOT%\Platform\%_TGTPLAT%\Drivers\CENDISMiniport.

    The following code example shows a .def file from the E100BEX driver.

    LIBRARY         e100bex
    EXPORTS         DriverEntry
  6. Add an entry for the E100BEX driver to the MODULES section of the Project.bib file.

    The following code example shows the MODULES section entry for the E100BEX driver.

    e100bex.dll       $(_FLATRELEASEDIR)\e100bex.dll            NK  SH
  7. Add registry keys to Project.reg.

    The following registry example shows the registry keys for the E100BEX driver.

       "DisplayName"="Intel 82559"
  8. From the IDE Build menu, choose Open Build Release Directory.

  9. Navigate to the directory containing your Windows Embedded CE NDIS miniport driver.

    Be sure your NDIS miniport driver is in %_WINCEROOT%\Platform\%_TGTPLAT%\Drivers\CENDISMiniport.

  10. Build the Windows Embedded CE NDIS miniport driver with the Build tool.

    For more information about the Build tool, see Build Tool. Microsoft recommends using the -c parameter with the Build tool to delete all object files.

Community Additions