Driver Resolver (Windows Embedded CE 6.0)
1/5/2010
In Windows Embedded CE, the integrated development environment (IDE) contains driver resolver logic that determines which drivers in an OS design will be included in the run-time image.
This is accomplished by processing the binary image builder (.bib) and batch (.bat) files associated with the OS design and with the board support package (BSP) to determine what the driver requires to be included in the run-time image.
The .bib files refer to environment variables to track information about the OS design. The most commonly referred to variable is named CE_MODULES, and contains a space-delimited list of the modules and components included in the OS design. The exact contents of this list are dependent on the Sysgen variables currently set in the OS design.
For more information, see Command-Line Driver Dependencies.
The following conditions are necessary for a driver to be included in the run-time image:
- The OS design contains the modules required to support the driver.
- The BSP is compatible with this driver.
When these conditions are satisfied, a driver of the specified type is added to the OS design.
Selecting Default Drivers
Some Catalog items are groups that contain different ways to include the same functionality in your OS design. These ways are known as implementations.
You can choose an implementation that the IDE uses as the default when the associated Catalog item group is added to an OS design.
For example, several implementations are available for the Display driver Catalog item group.
To select a default driver, the following criterion is used:
- The BSP variable for the associated driver is set.
For example, Cepc.bat sets the BSP environment variable BSP_DISPLAY_FLAT to 1. This means that when a display driver is added to a CEPC, the driver selected is the VGA Linear (Flat) Framebuffer display driver.
If no BSP variables are set but there is a valid driver implementation for the BSP, you must select the default driver for the implementation.
To set the default drivers for your BSP, modify the associated Platform.bat file. For example, to set default drivers for a BSP called MyBSP, modify the file %_WINCEROOT%\Platform\MyBSP\MyBSP.bat.
Note
If the BSP author hard codes a BSP environment variable in Platform.bat, the variable becomes part of the definition of the BSP itself. If you did not create the BSP, do not override the BSP variables defined in the associated Platform.bat file.
If you want to replace the default driver in a vendor's BSP, there are two methods that you can use instead:
- Contact the BSP vendor and have them make the appropriate changes to the BSP.
- Create a clone of the BSP and make your changes to the cloned BSP. However, BSPs cloned in this fashion are not supported by the vendor.
Adding Support for a Driver
When your OS design includes a driver that is not currently supported, the IDE uses an icon to indicate that the driver is excluded from the run-time image. To add support for the driver, do the following.
To add support for an unsupported driver
Select the associated Catalog item and then, from the context menu, choose Show Why Item is Excluded from Image.
Follow the instructions in the Excluded Catalog Item dialog box, such as adding the specified Catalog items required to support the driver to the OS design.