Adding KITL Initialization Code (Windows Embedded CE 6.0)


The kernel independent transport layer (KITL) consists of several components, which compile to form Kitl.dll. The following illustration shows how the KITL components call each other through various methods and function pointers:


The kernel debugger contains a KITLTRANSPORT structure with function pointers to either OAL_KITL_ETH_DRIVER for the Ethernet KITL driver interface (as shown in the illustration) or OAL_KITL_SERIAL_DRIVER for the serial KITL driver interface. For some function pointers such as pfnEncode and pfnSend, Oal_kitl.lib will contain an implementation. For other functions such as pfnSend_Frame and pfnGet_Frame, OAL_KITL_ETH_DRIVER points to implementations in the KITL driver. The KITL driver is named Driver.c in the illustration, but it could be any name, for example Ne2000.c or Dec21140.c.

The common KITL library (OAL_kitl.lib) is provided to make it easier for you to implement KITL. You can use the code in %_WINCEROOT\Platform\Common\Src\Common\Kitl to implement your own Kitl.dll. An implementation consists of two components:

  1. The driver library (shown in the illustration as Driver.c) that implements the functions in the OAL_KITL_ETH_DRIVER or OAL_KITL_SERIAL_DRIVER structure
  2. The KITL/kernel interface code (shown in the illustration as Kitl.c) that implements the kernel interface and initializes the OAL_KITL_ETH_DRIVER structure and other structures that OAL_kitl.lib uses

The following illustration shows how KITL is loaded by functions in the board support package OAL (OAL.lib), the kernel (Kitlcore.lib), the common KITL library (OAL_kitl.lib), the BSP (Kitl.c), and the BSP KITL driver.


When you use the common KITL library (OAL_kitl.lib), you only need to implement the OEMKitlStartup function. For more information, see OEMKitlStartup.

The common KITL library provides functions for the OAL_KITL_ETH_DRIVER and OAL_KITL_SERIAL_DRIVER structures that are specific to the Ethernet, serial, or USB transport but not specific to the BSP. You must implement the following functions in your driver:

You may also implement the following optional functions in your driver:

Sample implementations are available at the following locations:

  • %_WINCEROOT%\Platform\Common\Src\Common\Ethdrv\
  • %_WINCEROOT%\Platform\Common\Src\x86\Common\Kitl\Kitlser_x86.c
  • %_WINCEROOT%\Platform\MainstoneIII\Src\Common\Usbfn\Rndiskitl\Rndis_pdd.c

Community Additions