To use DriverWizard, follow these steps:
![]() | |
| On Windows 8, 7, and Vista 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 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. |
On Windows 8/7/Vista/Server 2008/Server 2003/XP, 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 8/7/Vista/Server 2008/Server 2003/XP, and installed on their PCs.
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, 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.
![]() | |
|
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 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 [Windows]:
On Windows, you can use DriverWizard to uninstall a previously installed
Plug-and-Play (PCI/PCMCIA) 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
Plug-and-Play
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.
You can also manually define hardware registers, as
demonstrated in
![]() | |
| 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
![]() | |
|
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
|
'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!
INTCSR hardware register. Note, however, that
interrupt acknowledgment information is hardware-specific.
|
![]() | Kernel PlugIn Windows Project Notes |
|---|---|
|
Compile and run the generated code:
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
toolbar icon or from the wizard's
menu (see
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,
workspace/solution, and make files for the supported compilers and development
environments — MS Visual Studio 2005/2008/2010/2012, Windows GCC (MinGW/Cygwin), MS eMbedded Visual C++, or MS Platform Builder.
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
|