11.3  Windows CE Driver Distribution

11.3.1  Distribution to New Windows CE Platforms

[Note]
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 Windows CE 6.0 plugin. The instructions use the notation 'Windows CE IDE' to refer to either of these platforms.

To distribute the driver you developed with WinDriver to a new target Windows CE platform, follow these steps:

  1. Modify the project registry file to add an entry for your target device:
    • If you select to use the WinDriver component (refer to step 2), modify WinDriver\samples\wince_install\<TARGET_CPU>\WinDriver.reg (e.g., WinDriver\samples\wince_install\ARMV4I\WinDriver.reg).
    • Otherwise, modify WinDriver\samples\wince_install\project_wd.reg.
  2. You can simplify the driver integration into your Windows CE platform by following the procedure described in this step before the Sysgen platform compilation stage.

    Note:

    • The procedure described in this step is relevant only for developers who use Windows CE 4.x-5.x with Platform Builder.
      Developers who use Windows CE 6.x with MS Visual Studio 2005/2008 should skip to the next step (refer to step 3).
    • This procedure provides a convenient method for integrating WinDriver into your Windows CE platform. If you select not to use this method, you will need to perform the manual integration steps described in step 4 below, after the Sysgen stage.
    • The procedure described in this step also adds the WinDriver kernel module (windrvr6.dll) to your OS image. This is a necessary step if you want the WinDriver CE kernel file (windrvr6.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 floppy disk. However, if you prefer to have the file windrvr6.dll loaded on demand via the CESH/PPSH services, you need to perform the manual integration method described in step 4 instead of performing the procedure described in the present step.
    1. Run the Windows CE IDE and open your platform.
    2. From the File menu select Manage Catalog Items.... and then click the Import... button and select the WinDriver.cec file from the relevant WinDriver\samples\wince_install\<TARGET_CPU> directory (e.g., WinDriver\samples\wince_install\ARMV4I). This will add a WinDriver component to the Platform Builder Catalog.
    3. In the Catalog view, right-click the mouse on the WinDriver Component node in the Third Party tree and select Add to OS design.
  3. Compile your Windows CE platform (Sysgen stage).
  4. If you did not perform the procedure described in step 2 above, perform the following steps after the Sysgen stage in order to manually integrate the driver into your platform. Note: If you followed the procedure described in step 2, skip this step and go directly to step 5.
    1. Run the Windows CE IDE and open your platform.
    2. Select Open Release Directory from the Build menu.
    3. Copy the WinDriver CE kernel file – WinDriver\redist\<TARGET_CPU\windrvr6.dll – to the %_FLATRELEASEDIR% sub-directory on the target development platform (should be the current directory in the new command window).
    4. Append the contents of the project_wd.reg file in the WinDriver\samples\wince_install directory to the project.reg file in the %_FLATRELEASEDIR% sub-directory.
    5. Append the contents of the project_wd.bib file in the WinDriver\samples\wince_install directory to the project.bib file in the %_FLATRELEASEDIR% sub-directory.

      This step is only necessary if you want the WinDriver CE kernel file (windrvr6.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 floppy disk. If you prefer to have the file windrvr6.dll loaded on demand via the CESH/PPSH services, you do not need to carry out this step until you build a permanent kernel.

  5. Select Make Run-Time Image from the Build menu and name the new image NK.BIN.
  6. Download your new kernel to the target platform and initialize it either by selecting Download/Initialize from the Target menu or by using a floppy disk.
  7. Restart your target CE platform. The WinDriver CE kernel will automatically load.
  8. Install your hardware control application/DLL on the target.
    If your hardware control application/DLL uses wdapi1021.dll (as is the case for the sample and generated DriverWizard WinDriver projects), also copy this DLL from the WinDriver\redist\WINCE\<TARGET_CPU> directory on the Windows host development PC to the target's Windows directory.

11.3.2  Distribution to Windows CE Computers

[Note]
Unless otherwise specified, 'Windows CE' references in this section include all supported Windows CE platforms, including Windows Mobile.
  1. Copy WinDriver's kernel module – windrvr6.dll – from the WinDriver\redist\WINCE\<TARGET_CPU> directory on the Windows host development PC to the Windows directory on your target Windows CE platform.
  2. Add WinDriver to the list of device drivers Windows CE loads on boot:
    • 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++ (Windows CE 4.x – 5.x) / MS Visual Studio 2005/2008 (Windows Mobile or Windows CE 6.x). 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 Windows Mobile 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 Mobile 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.
  3. 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).
  4. Install your hardware control application/DLL on the target.
    If your hardware control application/DLL uses wdapi1021.dll (as is the case for the sample and generated DriverWizard WinDriver projects), also copy this DLL from the WinDriver\redist\WINCE\<TARGET_CPU> directory on the development PC to the target's Windows directory.