next up previous contents
Next: 6. Developing a Driver Up: 5. Using DriverWizard Previous: 5.2 DriverWizard Walkthrough   Contents

Subsections


5.3 DriverWizard Notes


5.3.1 Logging WinDriver API Calls

You have the option to log all the WinDriver API calls using the DriverWizard, with the API calls input and output parameters. You can select this option by selecting the Log API calls option from the Tools menu or by clicking on the Log API calls toolbar icon in the DriverWizard's opening window.


5.3.2 DriverWizard Logger

The wizard logger is the empty window that opens along with the Device Resources dialogue box when you open a new project. The logger keeps track of all of the input and output during the diagnostics stage, so that you may analyze your device's physical performance at a later time. You can save the log for future reference. When saving the project, your log is saved as well. Each log is associated with one project.


5.3.3 Automatic Code Generation

After you have finished diagnosing your device and have ensured that it runs according to your specifications, you are ready to write your driver.


5.3.3.1 Generating the Code

Generate code by selecting this option either via the DriverWizard's Generate Code toolbar icon or from the wizard's Project | Generate Code menu. DriverWizard will generate the source code for your driver, and place it along with the project file (xxx.wdp, where "xxx" is the project name). The files are saved in a directory DriverWizard creates for every development environment and operating system selected in the code generation dialogue box.


5.3.3.2 The Generated USB C Code

In the source code directory you now have a new xxx_diag.c source file (where xxx is the name you selected for your DriverWizard project). This file implements a diagnostic USB application, which demonstrates how to use WinDriver's USB API to locate and communicate with your USB device(s), including detection of Plug and Play events (device insertion/removal, etc.), performing read/write transfers on the pipes, resetting the pipes and changing the device's active alternate setting.
The generated application supports handling of multiple identical USB devices.


5.3.3.3 The Generated Visual Basic and Delphi Code

The generated DriverWizard Visual Basic and Delphi code includes similar functions and provides similar functionality as the generated C code described in section 5.3.3.2.

The generated Delphi code implements a console application (like the C code), while the Visual Basic code implements a GUI application.


5.3.3.4 The Generated C# and Visual Basic .NET Code

The generated DriverWizard C# and Visual Basic .NET code provides similar functionality as the generated C code [5.3.3.2], but from a GUI .NET program.


5.3.4 Compiling the Generated Code


5.3.4.1 Windows and Windows CE Compilation:

As explained above, on Windows you can select to generate project and workspace/solution files for any of the supported integrated development environments (IDEs) - MSDEV/Visual C++ 5/6, MSDEV .NET 2003/2005, Borland C++ Builder, Visual Basic 6.0, Borland Delphi, MS eMbedded Visual C++ or MS Platform Builder - and you can also select to automatically invoke your selected IDE from the wizard. You can then proceed to immediately build and run the code from your IDE.

You can also build the generated code from any other IDE that supports the selected code language and target OS. Simply create a new project file for your selected IDE, then add the generated source files to your project and compile and run the code.

****************************************************************************************
  NOTES
 
  • For Windows 98/Me/2000/XP/Server 2003/Vista, the generated IDE files are located under an x86$\backslash$ directory - for 32-bit projects, or amd64$\backslash$ directory - for 64-bit projects.
  • For Windows CE, note that the generated Windows Mobile code is targeted at the Windows Mobile 5.0/6.0 ARMV4I SDK.
****************************************************************************************


5.3.4.2 Linux Compilation

Use the makefile that was created for you by DriverWizard in order to build the generated code using your favourite compiler, preferably GCC.


5.3.5 Bus Analyzer Integration - Ellisys Visual USB

DriverWizard provides native support for the Ellisys Explorer 200 USB analyzer on Windows XP and higher (32-bit only). This support enables you to:

To capture USB traffic:

  1. Select Tools | Start USB Analyzer Capture to start capturing USB data.
  2. To finish the data capture, select Tools | Stop USB Analyzer Capture.
    A dialogue box will appear notifying you where DriverWizard stored the analyzer trace. Click Yes to run Ellisys's Visual Analyzer with the captured data.

To capture a discrete control trasfer check the Trace USB transaction in Ellisys Visual USB check box in the control transfers dialogue box.

Figure 5.11: Ellisys Visual USB Integration
Image ellisys_integration


next up previous contents
Next: 6. Developing a Driver Up: 5. Using DriverWizard Previous: 5.2 DriverWizard Walkthrough   Contents