Adding a Driver to an Existing BSP

To add a device driver to an existing BSP definition using the BSP Wizard, you must already have created the device driver files, and they must reside either in the BSP directory or at a different location in Platform Builder.

For information about adding a boot loader to an existing BSP definition, see Adding a Boot Loader to a BSP Definition.

If you are cloning a BSP or creating a BSP definition in the BSP Wizard and want information on how to add drivers to the BSP, proceed to the second procedure of this topic. To illustrate the procedures better, Microsoft assumes that you have a MyIrda driver in the BSP directory.

To add a driver to an existing BSP

  1. From the Platform menu, choose BSP Wizard.

  2. In the Welcome dialog box, choose Next.

  3. In the Choose Your Task dialog box, select the Add driver(s) to an existing BSP check box, select a BSP from the list that you want to add the driver to, and then choose Next.

  4. In the Catalog Feature (.cec) File Information dialog box, in the Catalog feature (.cec) file name field, type any name for the .cec file that will define your BSP in the Catalog.

  5. In the Catalog feature (.cec) file directory field, type any directory name on a local drive.

    - or -

    Choose the Browse button to select a directory where the .cec file should be stored.

    - or -

    Choose the default directory location provided by the BSP wizard.

  6. To advance to the BSP Customization dialog box, choose Next.

To select or add a device driver type and complete the wizard

  1. In the BSP Customization dialog box, select the Add Driver button to add a new device driver to the BSP definition.

  2. In the Driver Properties dialog box, choose the Type property sheet, select the appropriate device type from the list, and then proceed to step 8.

    In this example, because you are adding a Fast IrDA driver called MyIRDA, choose the Fast Infrared (FIR) Devices type.

    Note   When you select the device type, be sure to select the correct device type for your driver. Based on your selection, Platform Builder detects the OS dependency information for this driver.

  3. If the device type for your driver does not exist in the Type property sheet, choose the New Type button to add a new device type.

  4. To add a new device type to the BSP definition, in the Driver Type Properties dialog box, choose the General tab, and then type the name of the new device type you want to create.

    For example, you can type Imaging device.

  5. In the appropriate fields, type the vendor and device description and select the appropriate check box to determine whether a BSP can support only one driver of this type or multiple drivers of this type.

  6. Choose the OS Modules tab and select or add the modules that are required to support this driver.

    For example, a display driver requires that your image contain the device and display modules.

  7. Choose OK to close the Driver Type Properties dialog box.

    Note   To save the new device type that you just created, you must add a device driver instance of this type to the BSP definition.

  8. In the Driver Properties dialog box, choose the General tab, and in the Name field, type a name for the device driver.

    In this example, type MyIrDA.

  9. In the Vendor field, type your company's name, and in the Version field, type a version number for this driver.

  10. In the Size field, type the approximate size, in bytes, of this driver in a release configuration of the OS image, and then in the Description field, type a description for your driver.

  11. Choose the Variables tab and add any variables associated with this driver, choose the Add button, and then type the variables and values in the appropriate fields.

    For example, the ATI display driver sets the following variables.

    Setting Description
    BSP_DISPLAY_ATI=1 Informs the build system that the ATI display driver has been selected.
    PB_REQUIRES_SYSGEN=ddi_ati Informs the build system that this driver must start the Sysgen process when Build Selected Features is selected. The value that the variable is set to is the value that is passed to the Sysgen process.
  12. Choose the Build Info tab, and then choose the Browse button.

    - or -

    Type the full path name in the Full path to the build file that builds this driver field for the sources or dirs file that will be used to build this device driver.

    In this example, the full pathname is %_WINCEROOT%\Platform\MyClonedBSP\drivers\MyIrDA.

  13. In the Registry file to copy to the flat release directory field, type the registry file associated with your driver, and then choose OK to close the Driver Properties dialog box.

    Platform Builder copies this registry file to the release directory and merges it with the other .reg files. You may leave this field blank if you do not have a registry file to accompany your driver.

  14. Choose the Add Driver button to add multiple device drivers to the BSP definition, and then choose Next.

  15. In the Congratulations dialog box, choose Import your BSP and/or Driver into the Catalog now, and then choose the Finish button to complete the process and close BSP Wizard.

You have now added the device driver to the BSP and the BSP or driver is displayed in the Catalog.

Note   You can add more components to the BSP using this procedure, but you must provide a new .cec file name every time you change the definition of a BSP in the Catalog.

See Also

BSP Wizard Overview | Creating a New BSP Definition | Cloning an Existing BSP | Adding a Boot Loader to a BSP Definition

 Last updated on Friday, October 08, 2004

© 1992-2003 Microsoft Corporation. All rights reserved.