Command-Line Driver Dependencies
The command-line driver dependency model is the foundation that the IDE driver dependency model is based on.
If you want to include or exclude a specific driver from your platform, you must understand the dependencies for that driver. Toward this end, you must know what Sysgen and BSP variables you must set or clear in order include or exclude the driver.
Often, performing a search of Platform.bib is the best place to begin. While Platform.bib contains information about the features that depend on the driver, Cesysgen.bat contains information about the Sysgen variables that set these features. The default BSP environment variable values are specified in the BSP's batch file, such as Cepc.bat, but you can override them.
The following code example, from %_WINCEROOT%\Platform\CEPC\Files\Platform.bib, shows the nested conditionals around a USB driver, Uhci.dll, that govern its inclusion in a CEPC-based workspace.
; @CESYSGEN IF CE_MODULES_DEVICE
...
; @CESYSGEN IF CE_MODULES_USBD
; USB drivers
IF BSP_NOUSB !
IF IMG_NOUSB !
IF BSP_USB_UHCI
uhci.dll $(_FLATRELEASEDIR)\uhci.dll NK SH
ENDIF
...
; @CESYSGEN ENDIF CE_MODULES_USBD
...
; @CESYSGEN ENDIF CE_MODULES_DEVICE
The first two lines specify that the environment variable CE_MODULES contains 'device' and 'usbd'. Cesysgen.bat, which governs these lines, contains the Sysgen variables that govern the contents of CE_MODULES.
The following code example shows an excerpt from the Cesysgen.bat file of an IABASE-based platform. In this situation, Cesysgen.bat contains the following lines, which specify that CE_MODULES always contains 'device', and that when SYSGEN_USB is set, CE_MODULES also contains 'usbd'. This means that the driver is not included unless SYSGEN_USB is set.
set CE_MODULES=%CE_MODULES% nk filesys device ...
if "%SYSGEN_USB%"=="1" set CE_MODULES=%CE_MODULES% usbhost usbd
Finally, the following code example shows the innermost nested conditionals from the preceding Platform.bib example. These ensure that the driver is only included if the environment variables BSP_NOUSB and IMG_NOUSB are not set, and BSP_USB_UHCI is set.
IF BSP_NOUSB !
IF IMG_NOUSB !
IF BSP_USB_UHCI
In summary, there are four environment variables that must be set or unset in order for a CEPC-based workspace to include the Uhci.dll driver. The following table shows these settings.
Environment variable | Value |
---|---|
SYSGEN_USB | Set |
BSP_NOUSB | Not set |
IMG_NOUSB | Not set |
BSP_USB_UHCI | Set |
See Also
Driver Dependencies | Feature Management | IDE Driver Dependencies | Build System
Last updated on Friday, October 08, 2004
© 1992-2003 Microsoft Corporation. All rights reserved.