Kitl.dll (Compact 7)
3/12/2014
Windows Embedded CE 6.0 uses the kernel independent transport layer (KITL) transport for communication between the development computer and the target device over any hardware for which the OEM supplies an appropriate transport.
The KITL Ethernet transport on the device reuses much of the Ethernet debug (EDBG) code. To map to the new KITL names, the header file %_WINCEROOT%\public\common\oak\inc\halether.h has been included. It maps the KITL functions to the EDBG functions.
Kitl.dll links with the following libraries:
- kitlcore.lib (replacement for kitl.lib and location of the KitlDllMain function)
- nkstub.lib (if the KITL uses NKGLOBAL functions)
- oemstub.lib (if the KITL uses OEMGLOBAL functions)
Moving the KITL source code from the OAL into kitl.dll is typically a fairly straightforward process. Kitl.dll must export the following new functions:
- OEMKitlStartup
This function is called from the kernel when the KITLIoctl(IOCTL_KITL_STARTUP, NULL, 0, NULL, 0, NULL) function is invoked by the OAL.
This function is equivalent to the OALKitlStart function, but it has been renamed to follow the convention for public OEM functions. The Windows Embedded CE 6.0 kernel requires that you use the new function name OEMKitlStartup. - OEMKitlIoctl
This function handles all KITL-related IOCTLs when KITL is removed from the OAL. In most cases, you can use the common version of this function, which is implemented in oal_kitl.lib. - OEMKitlInit
This function is called by the KitlInit function to initialize the KITL device and the KITLTRANSPORT structure.
To create and build Kitl.dll
Copy the makefile from the src\oal\oallib folder to the src\kitl folder.
Create the Sources file based on the kernkitl Sources file that you copied earlier.
To do this, use the following commands:
TARGETNAME=KITL TARGETTYPE=DYNLINK DLLENTRY=KitlDllMain DEFFILE=
Delete entries for EXEENTRY and EXEBASE.
Delete nk.lib and oal_log.lib, if present.
Except for oal_kitl.lib (or oal_kitl_x86.lib on x86-based platforms), delete all OAL libraries.
Rename kitl.lib to kitlcore.lib.
Then, add the following TARGETLIBS: kitlcore.lib, oemstub.lib, and nkstub.lib.
$(_SYSGENOAKROOT)\lib\$(_CPUDEPPATH)\nkstub.lib \. $(_SYSGENOAKROOT)\lib\$(_CPUDEPPATH)\oemstub.lib \. $(_PLATCOMMONLIB)\$(_CPUDEPPATH)\kitlcore.lib \.
These libraries are in addition to any other libraries required by your KITL implementation. If you are porting to Compact 7, delete vbridge.lib.
If you are porting from Windows CE 5.0 to Windows Embedded CE 6.0 and not continuing to Compact 7, add:
$(_SYSGENOAKLIB)\$(_CPUDEPPATH)\vbridge.lib \.
Except for ddk_io.lib and vbridge.lib, delete all .lib files that don’t have KITL in their name.
Rename OALKitlStart to OEMKitlStartup.
Initialize two KITL function pointers in OEMKitlInit.
To do this, use the following code example:
pKitl->pfnPowerOn = OALKitlPowerOn; pKitl->pfnPowerOff = OALKitlPowerOff;
This step is required only if your OAL implements these functions.
In the src\kitl directory, run build -c and troubleshoot errors by following the same procedure that you used when building oal.exe.