How to Install WinDriver

NOTE
The instructions on this page are for the latest WinDriver version released for the target operating system. To install an older version of WinDriver, refer to the installation instructions in the WinDriver User’s Manual for your WinDriver version.

At the end of the installation, you may be prompted to reboot your computer.

NOTE

The WinDriver installation defines a WD_BASEDIR environment variable, which is set to point to the location of your WinDriver directory, as selected during the installation. This variable is used during the DriverWizard code generation — it determines the default directory for saving your generated code and is used in the include paths of the generated project/make files. This variable is also used from the sample Kernel PlugIn projects and makefiles.

If the installation fails with an ERROR_FILE_NOT_FOUND error, inspect the Windows registry to see if the RunOnce key exists in HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion. This registry key is required by Windows Plug-and-Play in order to properly install drivers using INF files. If the RunOnce key is missing, create it; then try installing the INF file again.

The following steps are for registered users only:

To register your copy of WinDriver with the license you received from Jungo Connectivity, follow these steps:

Start DriverWizard: Start | Programs | WinDriver | DriverWizard.

Select the Register WinDriver option from the File menu, and insert the license string you received from Jungo Connectivity.

For PCI, refer to the documentation of WDC_DriverOpen() in the WinDriver User's Manual.When using the low-level WD_xxx API instead of the WDC_xxx API (which is used by default), refer to the documentation of WD_License() in the WinDriver User's Manual.

The following instructions apply to platform developers who build Windows CE kernel images using Windows CE Platform Builder or using MS Visual Studio 2005/2008 with the appropriate Windows CE 6.0 plugin. The instructions use the notation “Windows CE IDE” to refer to either of these platforms.

We recommend that you read Microsoft’s documentation and understand the Windows CE and device driver integration procedure before you perform the installation.

NOTE
When defining ID values, take care to use the correct format, as specified in the project_wd.reg comments — decimal for USB devices and hexadecimal for PCI devices.

Compile your Windows CE platform (Sysgen stage).

Integrate the driver into your platform:

Run the Windows CE IDE and open your platform.

Select Open Build Release Directory from the Build menu.

Copy the WinDriver CE kernel file — WinDriver\redist\<TARGET_CPU>\windrvr1221.dll — to the %_FLATRELEASEDIR% subdirectory on the target development platform (should be the current directory in the new command window).

Append the contents of WinDriver\samples\wince_install\project_wd.reg to the %_FLATRELEASEDIR%\project.reg registry file.

Copy the contents of the WinDriver\samples\wince_install\project_wd.bib file to the FILES section of the binary image builder file — %_FLATRELEASEDIR%\project.bib. Then uncomment the line that matches the target platform (see the “TODO” comments in the copied text).

NOTE
This step is only necessary if you want the WinDriver CE kernel file (windrvr1221.dll) to be a permanent part of the Windows CE image (NK.BIN), which is the case if you select to transfer the file to your target platform using a boot disk. If you prefer to have the file windrvr1221.dll loaded on demand via the CESH/PPSH services, you do not need to perform this step until you build a permanent kernel.

Select Make Image from the Build menu, and name the new image NK.BIN.

Download your new kernel to the target platform and initialize it either by selecting Attach Device from the Target menu, or by using a boot disk. For Windows CE 4.x, the menu is called Download/Initialize rather than Attach Device.

The following instructions apply to driver developers who do not build the Windows CE kernel, but only download their drivers, built using MS eMbedded Visual C++or MS Visual Studio 2005/2008 to a ready-made Windows CE platform.

Modify the registry according to the entries documented in the file WinDriver\samples\wince_install\project_wd.reg. This can be done using the Windows CE Pocket Registry Editor on the hand-held CE computer, or by using the Remote CE Registry Editor Tool supplied with MS eMbedded Visual C++ or MS Visual Studio 2005/2008. Note that in order to use the Remote CE Registry Editor tool you will need to have Windows CE Services installed on your Windows host platform.

On many versions of Windows CE, the operating system’s security scheme prevents the loading of unsigned drivers at boot time, therefore the WinDriver kernel module has to be reloaded after boot. To load WinDriver on the target Windows CE platform every time the OS is started, copy the WinDriver\redist\Windows_Mobile_5_ARMV4I\wdreg.exe utility to the Windows\StartUp\ directory on the target PC.

Restart your target CE computer. The WinDriver CE kernel will automatically load. You will have to do a warm reset rather than just suspend/resume (use the reset or power button on your target CE computer).

Compile and run the sample programs to make sure that WinDriver CE is loaded and is functioning correctly (see the WinDriver User's Manual for an explanation on how to check your installation).

Windows CE Installation Note:

The WinDriver installation on the host Windows PC defines a WD_BASEDIR environment variable, which is set to point to the location of your WinDriver directory, as selected during the installation. This variable is used during the DriverWizard code generation — it determines the default directory for saving your generated code, and is used in the include paths of the generated project/make files.

Note that if you install the WinDriver Windows toolkit on the same host PC, the installation will override the value of the WD_BASEDIR variable from the Windows CE installation.

Installation Instructions for Linux

System Requirements

Any of the following processor architectures, with a 2.6.x or higher Linux kernel:

32-bit x86

64-bit x86 AMD64 or Intel EM64T (x86_64)

PowerPC 32-bit or 64-bit (PCI only)

NOTE
Jungo Connectivity strives to support new Linux kernel versions as close as possible to their release. To find out the latest supported kernel version, refer to the WinDriver Release Notes.

A GCC compilerNOTE: The version of the GCC compiler should match the compiler version used for building the running Linux kernel.

Any 32-bit or 64-bit development environment (depending on your target configuration) supporting C for user mode

In Linux, kernel modules must be compiled with the same header files that the kernel itself was compiled with. Since WinDriver installs the kernel modules, it must compile with the header files of the Linux kernel during the installation process.

Therefore, before you install WinDriver for Linux, verify that the Linux source code and the file version.h are installed on your machine:

Install Linux kernel source code:

If you have yet to install Linux, install it, including the kernel source code, by following the instructions for your Linux distribution.

If Linux is already installed on your machine, check whether the Linux source code was installed. You can do this by looking for ‘linux’ in the /usr/src directory. If the source code is not installed, either install it, or reinstall Linux with the source code, by following the instructions for your Linux distribution.

Install version.h:

The file version.h is created when you first compile the Linux kernel source code. Some distributions provide a compiled kernel without the file version.h. Look under /usr/src/linux/include/linux/ to see whether you have this file. If you do not, follow these steps:

Become super user:$ su

Change directory to the Linux source directory:# cd /usr/src/linux

Type# make xconfig

Save the configuration by choosing Save and Exit.

Type# make dep

Exit super user mode:# exit

To run GUI WinDriver applications (e.g., DriverWizard; Debug Monitor) you must also have version 6.0 of the libstdc++ library — libstdc++.so.6 — and version 12.0 of the libpng library — libpng12.so.0. If you do not have these files, install the relevant packages for your Linux distribution (e.g., libstdc++6 and libpng12-0).

Before proceeding with the installation, you must also make sure that you have a ‘linux’ symbolic link. If you do not, create one by typing/usr/src$ ln -s <target kernel> linux
For example, for the Linux 3.0 kernel type/usr/src$ ln -s linux-3.0/ linux

Installation

On your development Linux machine, change directory to your preferred installation directory, for example to your home directory:$ cd ~/

NOTE
The path to the installation directory must not contain any spaces.

The configuration script creates a makefile based on the running kernel. You may select to use another installed kernel source, by executing the script with the --with-kernel-source=<path> option, where <path> is the full path to the kernel source directory — e.g., /usr/src/linux.

If the Linux kernel version is 2.6.26 or higher, the configuration script generates makefiles that use kbuild to compile the kernel modules. You can force the use of kbuild on earlier versions of Linux, by executing the configuration script with the --enable-kbuild flag.

For a full list of the configuration script options, use the --help option:./configure --help

<WinDriver directory>/redist$ make

Become super user:<WinDriver directory>/redist$ su

Install the driver:<WinDriver directory>/redist# make install

Create a symbolic link so that you can easily launch the DriverWizard GUI:$ ln -s <full path to WinDriver>/wizard/wdwizard
/usr/bin/wdwizard

Change the read and execute permissions on the file wdwizard so that ordinary users can access this program.

Change the user and group IDs and give read/write permissions to the device file /dev/windrvr1221 depending on how you wish to allow users to access hardware through the device. Due to security reasons, by default the device file is created with permissions only for the root user. Change the permissions by modifying your /etc/udev/permissions.d/50-udev.permissions file. For example, add the following line to provide read and write permissions:windrvr1221:root:root:0666

Define a new WD_BASEDIR environment variable and set it to point to the location of your WinDriver directory, as selected during the installation. This variable is used in the make and source files of the WinDriver samples and generated DriverWizard code, and is also used to determine the default directory for saving your generated DriverWizard project. If you do not define this variable you will be instructed to do so when attempting to build the sample/generated code using the WinDriver makefiles.

Exit super user mode:# exit

You can now start using WinDriver to access your hardware and generate your driver code!

TIP
Use the WinDriver/util/wdreg script to load the WinDriver kernel module.
To automatically load WinDriver on each boot, add the following to the target Linux boot file (/etc/rc.d/rc.local):<path to wdreg>/wdreg windrvr1221

The following steps are for registered users only:

To register your copy of WinDriver with the license you received from Jungo Connectivity, follow these steps:

Start DriverWizard:$ <path to WinDriver>/wizard/wdwizard

Select the Register WinDriver option from the File menu, and insert the license string you received from Jungo Connectivity.

For PCI, refer to the documentation of WDC_DriverOpen() in the WinDriver User's Manual.When using the low-level WD_xxx API instead of the WDC_xxx API (which is used by default), refer to the documentation of WD_License() in the WinDriver User's Manual.

CAUTION
Since /dev/windrvr1221 gives direct hardware access to user programs, it may compromise kernel stability on multi-user Linux systems. Please restrict access to the DriverWizard and the device file /dev/windrvr1221 to trusted users.

For security reasons the WinDriver installation script does not automatically perform the steps of changing the permissions on /dev/windrvr1221 and the DriverWizard executable (wdwizard).

We use WinDriver PCI for 32-bit Windows, 64-bit Windows, 32-bit x86 Linux, and 64-bit x86 Linux. We have also used it for 32-bit x86 Solaris and 64-bit SPARC Solaris. This tool kit allows us to use a common driver interface for these platforms and greatly simplifies our software API architecture. Basic driver is very easy, advanced features like the kernel plug-in allow optimization of interrupt handling, etc.

Rich WadeAlta Data Technologies

The WinDriver worked out well for us. It took very little time to get the driver working. We have implemented DMA and interrupt.

Tak-kwong NgElectronics Engineer | NASA Langley Research Center

I started using the WinDriver Kit after looking at several other possibilities. All others that I looked at were targeted for Software Engineers with deep background on driver development, which for me being hardware-centric was a big obstacle. When I found the Jungo Tools I initially looked at the online video showing how to drive the kit. When I tried out the real software I was amazed that within ten minutes I had my first driver working and could interact with my custom FPGA-based board.