OSR Dev Blog

USB 2.0 Debugging
(By: OSR Staff | Published: 11-Apr-06| Modified: 19-Jan-11)

Most people don't realize it, but debugging over USB 2.0 has been supported for a while. When you read the details, however, you might have second thoughts as to whether you think it's worth the bother.

Support for debugging a target system via USB 2.0 is natively in Windows versions starting with Vista.

To make USB-based debugging work, you need a special cable that's referred to as a "USB debugger cable" -- The only one that folks here at OSR have seen is the PLX Net20DC. You can google for the part number, but somebody here found them for sale at www.semiconductorstore.com (search for Net20DC in the store, click "order online" to see the price) for $89 each (YIKES!).

Enable USB debugging on the target with the following BCDEdit commands:

bcdedit -debug on
bcdedit -dbgsettings usb targetname:

You must plug the USB debugger cable into PORT 1 of the root hub on the target machine. Which USB port on your target machine is port 1 of the root hub?  You mean you don't know??  Well, you might want to use the USBVIEW utility from the DDK to help you figure out which port is port 1.

On the host machine, you start by plugging BOTH ends of the cable into USB 2.0 ports on the host machine to get the driver loaded. Then unplug one end and plug it into Port 1 of the root hub on the target (as mentioned above).

But wait... there's more to consider!  For USB debugging to work, not only do you need to find physical Port 1 of your root hub,but also (a) your EHCI (USB 2.0) host controller has to include debugging support, and (b) The BIOS has to make that support available.  Though I have heard of people getting debugging to work over USB 2.0, I've never seen it myself.  And I've known many, many, many people who have tried to get it to work but were unsuccessful (after spending hours on the task). Just something to consider before you give debugging over USB 2.0 a try.

This article was printed from OSR Online http://www.osronline.com

Copyright 2017 OSR Open Systems Resources, Inc.