To use DriverWizard:
![]() | |
| On Windows 7 and Vista you must run DriverWizard as administrator. |
Select your from the list of devices detected by DriverWizard.
For non-Plug-and-Play cards, select .
To generate code for a PCI device that is not currently attached to the
computer, select .
![]() | |
| When selecting the option, DriverWizard allows you to define the device's resources. By specifying the I/O and/or Memory ranges, you may further define run-time registers (the offsets are relative to BARs). In addition, the IRQ must be specified if you want to generate code that acknowledges interrupts via run-time registers. Note, that the IRQ number and the size of the I/O and Memory ranges are irrelevant, since these will be automatically detected by DriverWizard when you install a physical device. |
Generate an INF file for DriverWizard:
On Windows 7/Vista/Server 2008/Server 2003/XP/2000, the driver for Plug-and-Play devices (such as
PCI and PCMCIA) is installed by installing an INF file for
the device. DriverWizard enables you to generate an INF file that registers
your device to work with WinDriver (i.e., with the windrvr6.sys
driver). The INF file generated by DriverWizard should later be distributed
to your customers who are using Windows 7 / Vista / Server 2008 / Server 2003 / XP /
2000, and installed on their
PCs.
The INF file that you generate in this step is also designed to enable DriverWizard to diagnose your device on Windows 7 / Vista / Server 2008 / Server 2003 / XP / 2000 (for example, when no driver is installed for your PCI/PCMCIA device). Additional information concerning the need for an INF file is provided in section 15.1.1.
If you do not need to generate an INF file (e.g., if you are using DriverWizard on Linux), skip this step and proceed to the next one.
To generate the INF file with DriverWizard, follow the steps below:
When you are done, click and choose the directory in which you wish to store the generated INF file. DriverWizard will then automatically generate the INF file for you.
You can choose to automatically install the INF file by checking the
option in the
DriverWizard's INF generation dialogue.
If the automatic INF file installation fails, DriverWizard will notify
you and provide manual installation instructions (refer also the manual
INF file installation instructions in section 15.1).
![]() | |
|
Handling of PCI Message-Signaled Interrupts (MSI) and Extended Message-Signaled Interrupts (MSI-X) requires specific
configuration in the device's INF file, as explained in
section 9.2.6.1 of the manual. On Windows Vista and higher, if your hardware supports MSI or MSI-X, the option in the DriverWizard's INF generation dialogue will be enabled and checked by default. When this option is checked, the generated DriverWizard INF file for your device will include support for MSI/MSI-X handling. However, when this option is not checked, PCI interrupts will be handled using the legacy level-sensitive interrupts method, regardless of whether the hardware and OS support MSI/MSI-X. |
Uninstall the INF file of your device:
You can use the option to uninstall the
INF file of your Plug-and-Play device (PCI/PCMCIA). Once you uninstall the INF
file, the device will no longer be registered to work with the
windrvr6.sys, and the INF file will be deleted from the Windows
root directory.
If you do not need to uninstall an INF file, skip this step and proceed to the next one.
DriverWizard will automatically detect your Plug-and-Play hardware resources: I/O ranges, memory ranges, and interrupts.
For non-Plug-and-Play hardware, define your hardware's resources manually.
You can also manually define hardware registers, as demonstrated in Figure 4.5 below.
![]() | |
| When defining registers, you may check the box in the window. Registers marked as will automatically be read for any register read/write operation performed from DriverWizard. The read results will be displayed in the wizard's Log window. |
Read and write to the I/O ports, memory space and your defined registers, as demonstrated in Figure 4.6.
![]() | |
| When accessing memory mapped ranges, be aware that Linux PowerPC uses big-endian for handling memory storage, as opposed to the PCI bus that uses little-endian. For more information regarding little/big-endian issues, refer to section 9.3. |
'Listen' to your hardware's interrupts.
![]() | |
For level-sensitive interrupts, such as legacy PCI interrupts, you
must use DriverWizard to define the interrupt status register and
assign the read/write command(s) for acknowledging (clearing) the
interrupt, before attempting to listen to the interrupts with the
wizard, otherwise the OS may hang! Figure 4.8 below demonstrates how to define an
interrupt acknowledgment command for a defined INTCSR
hardware register. Note, however, that interrupt acknowledgment
information is hardware-specific.
|

![]() | |
| To compile the generated Kernel PlugIn code, the Windows Driver Kit (WDK) must be installed. |
Compile and run the generated code:
For detailed compilation instructions, refer to section 4.2.4.
You have the option to log all the WinDriver API calls using DriverWizard, with the API calls input and output parameters. You can select this option by selecting the option from the menu or by clicking on the toolbar icon in DriverWizard's opening window.
After you have finished diagnosing your device and have ensured that it runs according to your specifications, you are ready to write your driver.
Generate code by selecting this option either via DriverWizard's toolbar icon or from the wizard's 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.
In the source code directory you now have a new
xxx_lib.h file, which contains type
definitions and functions declarations for the API created for you by the
DriverWizard, and an xxx_lib.c source file,
which contains the implementation of the generated device-specific API.
In addition, you will find an xxx_diag.c
source file, which includes a main() function and implements a
sample diagnostics application that utilizes the generated DriverWizard API to
communicate with your device.
The code generated by DriverWizard is composed of the following elements and files, where xxx represents your DriverWizard project name:
After creating your code, compile it with your favorite compiler, and see it work!
Change the function main() of the program so that the
functionality suits your needs.
The generated DriverWizard Visual Basic and Delphi code includes similar functions and provides similar functionality as the generated C code described in section 4.2.3.2.
The generated Delphi code implements a console application (like the C code), while the Visual Basic code implements a GUI application.
The generated DriverWizard C# code provides similar functionality as the generated C code [4.2.3.2], but from a GUI .NET program.
As explained above, on Windows you can select to generate project and workspace/solution files for any of the supported integrated development environments (IDEs) – MS Visual Studio 5.0/6.0/2003/2005/2008/2010, 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.
![]() | |
|
![]() | |
| To build a Kernel PlugIn project (on Windows), follow the instructions in section 12.7.1. |
As explained above, you can use DriverWizard to generate an Xcode project and a related makefile. You can easily build the generated code using either of the following methods:
![]() | |
| In the following instructions, <project_dir> signfies the path to the location in which you saved your project (for example, ~/WinDriver/wizard/my_projects/JungoDriver), and xxx signfies your selected project name (for example, JungoDriver). |
make to build the code.
The build will create an xxx application under a <project_dir>/macos/build/Release or <project_dir>/macos/build/Debug sub-directory – depending on how you selected to build the project (for example, ~/WinDriver/wizard/my_projects/JungoDriver/macos/build/Release/JungoDriver).
You can also build the generated code using any other IDE/compiler that is supported on Mac OS X. Simply create a new project or make file for your selected IDE/compiler, add the generated source files to your project/makefile, and build the code.
![]() | |
| To build a Kernel PlugIn project, follow the instructions in section 12.7.2. |
Use the makefile that was created for you by DriverWizard in order to build the generated code using your favorite compiler, preferably GCC.
![]() | |
| To build a Kernel PlugIn project, follow the instructions in section 12.7.3. |