次の方法で共有


USB Debug (Compact 2013)

10/16/2014

USB Debug (USBDBG) is a pair of model device drivers (MDDs) that emulate a serial or Ethernet debugging interface over USB. Many development boards include USB ports to supply power and communicate with the device. By enabling customers to use an existing USB connection for debugging, you, as the OEM developer, can reduce the bill of materials and size of your development board, and thus the cost. To enable this functionality for your customers, you must write a USBDBG platform-specific device driver (PDD) for your development board.

USBDBG provides two MDDs: one emulates a serial port over USB and the other uses the remote network driver interface specification (RNDIS) to emulate an Ethernet port over USB. Both MDDs implement the same communication protocol. Because both use the same protocol, you, the OEM developer, can develop a single platform-dependent device driver (PDD) for a device that communicates with either one or both of the MDDs and provide it as part of the board support package (BSP). Customers who purchase the board, and who use Windows Embedded Compact 2013 to develop applications, can then use Platform Builder to debug their software over a USB connection.

USBDBG has capabilities that are similar to the Ethernet debug library provided by rne_mdd.lib (%_WINCEROOT%\platform\common\src\common\ethdrv\rne_mdd). Therefore, there is no advantage in replacing a functional PDD that you built for the Ethernet debug library with one built for USBDBG. However, for new development, the USBDBG protocol is less complex and supports emulating both serial and Ethernet protocols over a USB connection. For more information about the Ethernet debug library, see Boot Loader Support Libraries.

The following figure shows how the USBDBG PDD supports both MDDs.

USBDBG Architecture

Shows logical architecture of the USBDBG drivers

The RNDIS MDD (UsbDbgRndisMdd) exposes the OAL_KITL_ETH_DRIVER structure to the upper layer allowing the kernel independent transport layer (KITL) or down-load engine (DLE) to detect the attached device as an Ethernet device. The serial MDD (UsbDbgSerMdd) exposes the OAL_KITL_SERIAL_DRIVER structure to the upper layer allowing KITL or DLE to detect the attached device as a serial device.

Both of the MDDs expose the same UsbDbgPdd device driver service-provider interface (DDSI) between the MDD and PDD. Therefore, you can develop a single library that supports both serial and RNDIS protocols, which makes most of the code that you develop for one transport reusable when you develop the other.

To implement this feature, create a PDD for your hardware platform that interfaces with the provided MDDs (oal_usbdbgrndismdd.lib and oal_usbdbgsermdd.lib).

For reference information, see USB Debug Reference.

Source code for the MDDs is available at %_WINCEROOT%\platform\common\src\common\kitldrv\usbdbg\.

In This Section

  • Connect a USBDBG RNDIS Device
    Describes how to connect a Windows Embedded Compact powered device to a host and connect it with Platform Builder by using an emulated RNDIS connection over USB
  • Connect a USBDBG Serial Device
    Describes how to connect a Windows Embedded Compact powered device to a host and connect it with Platform Builder by using an emulated serial connection over USB

See Also

Reference

KITL Functions for Ethernet Drivers
KITL Functions for Serial Drivers

Other Resources

Kernel Independent Transport Layer