To use DriverWizard, follow these steps:
|On Windows 7 and higher you must run DriverWizard as administrator.|
Select your Plug-and-Play card 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 theoption, 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 and install an INF file for your device [Windows]:
On the supported Windows operating systems, the driver for Plug-and-Play devices (such as PCI) 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 windrvr1260.sys driver). The INF file generated by DriverWizard should later be distributed to your Windows customers, 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 (for example, when no driver is installed for your PCI device). Additional information concerning the need for an INF file is provided in
If you don't need to generate and install an INF file (e.g., if you are using DriverWizard on Linux), skip this step.
To generate and install the INF file with DriverWizard, do the following:
When you are done, clickand 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
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
For further information on Preallocating DMA Buffers in Windows,
please refer to
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
On Windows 7 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 [Windows]:
On Windows, you can use DriverWizard to uninstall a previously installed Plug-and-Play PCI) device INF file. This will unregister the device from its current driver and delete the copy of the INF file in the Windows INF directory.
In order for WinDriver to correctly identify the resouces of a
device and communicate with it — including for the purpose of the
DriverWizard device diagnostics outlined in the next step — the
deivce must be registered to work with WinDriver via an INF file (see
If you do not wish to uninstall an INF file, skip this step.
To uninstall the INF file, do the following:
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.
|On Windows 7 and higher, you may need to register an IRQ
with WinDriver before you can assign it to your non-Plug-and-Play
You can also manually define hardware registers, as
|When defining registers, you may check thebox 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
'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!
|Kernel PlugIn Windows Project Notes|
For detailed compilation instructions, refer to
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
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.
As explained above, on Windows you can select to generate project, solution,
and make files for the supported compilers and development environments —
MS Visual Studio, Windows GCC (MinGW/Cygwin).
For integrated development environments (IDEs), such as MS Visual Studio, 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 selected IDE.
You can also build the generated code using any other compiler or development environment that supports the selected code language and target OS. Simply create a new project or make file for your selected compiler/environment, include the generated source files, and run the code.
To build a Kernel PlugIn project (on Windows), follow the instructions in
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