USB Debugging and Profiling Techniques – ELCE 2012

Kishon Vijay Abraham and Basak Partha, respectively software design engineer and tech lead at Texas Instruments, provide an overview of techniques that can be used to debug Linux USB drivers on the host PC or/and the device itself.

Abstract:

The widespread integration of USB into embedded applications presents many developers with the challenge of debugging problems, that are difficult to detect and isolate when a USB device misbehaves. This paper discusses about the various USB debugging techniques which includes debugging at the host PC, at the device and in the cable and discuss when each of the above techniques will be handy. This paper will also discuss about the various facilities provided within Linux kernel to aid in USB debugging e.g sysfs, trace points etc. and the various user space tools available to help USB debugging e.g USBMON. This paper also discusses about the profiling techniques at various levels in the usb stack. This paper will be of interest to the Software Developers and Testers who develop and debug USB drivers.

USB Generic Linux System Architecture
USB Generic Linux System Architecture

Their talk is divided into the following sections:

  • Introduction
  • USB Generic Linux System Architecture
  • USB Mass Storage Architecture
  • Challenges in debugging – Encoded data, timing issues, out-of spec signaling errors, potocol errors…
  • USB Debugging Techniques – Main section with details about sysfs/debugfs, usbmon, dynamic debug interface, tracepoint, protocol analyzer (e.g. Elisys/Lecroy/total Phase analyzer tools)
  • Gadget Zero – USB gadget drivers used only for testing
  • Other profiling tools – IOzone (Mass Storage profiling), FFSB (Flexible Filesystem Benchmark) and dd


You can download the slides for this presentation. Beside the kernel USB documentation, they recommend using Virtual USB Analyzer, a free and open source GUI tool capable of displaying usbmon data, as well as XML data from hardware analyzers such as the Ellisys USB Explorer 200.

Share this:
FacebookTwitterHacker NewsSlashdotRedditLinkedInPinterestFlipboardMeWeLineEmailShare

Support CNX Software! Donate via cryptocurrencies, become a Patron on Patreon, or purchase goods on Amazon or Aliexpress

ROCK 5 ITX RK3588 mini-ITX motherboard

Leave a Reply

Your email address will not be published. Required fields are marked *

Khadas VIM4 SBC
Khadas VIM4 SBC