Command-Line Driver Dependencies (Windows CE 5.0)
The command-line driver dependency model is the foundation that the integrated development environment (IDE) driver dependency model is based on.
To include or exclude a specific driver in your OS design, you must understand the dependencies for that driver. To do that, you must know which Sysgen and board support package (BSP) variables you must set or clear to include or exclude the driver.
Often, performing a search of Platform.bib is the best place to begin. Platform.bib contains information about the Catalog items that depend on the driver. In addition, Platform.bib defines the hardware modules and driver files for a target device.
The following code example shows how a company called MyCompany could use the FILES section of Platform.bib to specify driver files for a product model called the EON that uses an SHx family processor.
**Note **Platform Builder does not parse environment variables set to string values. Thus, to specify the EON product model, this example creates a variable called MYCOMPANYS_MODEL_EON and sets that variable to a numeric value.
FILES ; Name Path Memory Type ; -------------- ------------------------ ----------- ; @CESYSGEN IF CE_MODULES_DEVICE ; @CESYSGEN ENDIF CE_MODULES_DEVICE ;*** MyCompany Additions *** #include "$(_FLATRELEASEDIR)\mycompany_base.bib" IF MYCOMPANYS_MODEL_EON == "1" ddi_gx.dll $(_FLATRELEASEDIR)\ddi_gx.dll NK SH e100ce.dll $(_FLATRELEASEDIR)\e100ce.dll NK SH wavedev.dll $(_FLATRELEASEDIR)\wavedev.dll NK SH com16550.dll $(_FLATRELEASEDIR)\com16550.dll NK SH isr16550.dll $(_FLATRELEASEDIR)\isr16550.dll NK SH parallel.dll $(_FLATRELEASEDIR)\parallel.dll NK SH #include "$(_FLATRELEASEDIR)\MyOther.bib" ENDIF
Cesysgen.bat contains information about the Sysgen variables that set these Catalog items. 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%\PBWorkspaces\<MyOSDesign>\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 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 a Cesysgen.bat file. In this example, Cesysgen.bat contains lines to 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 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, four variables must be set or cleared for a CEPC-based workspace to include the Uhci.dll driver. The following table shows these settings.
Variable | Value |
---|---|
SYSGEN_USB | Set |
BSP_NOUSB | Not set |
IMG_NOUSB | Not set |
BSP_USB_UHCI | Set |
For more information about Cesysgen conditional statements, see Preprocessing Using Cesysgen Conditionals.
See Also
Driver Dependencies | Catalog Item Management | IDE Driver Dependencies | Build System
Last updated on Thursday, February 02, 2006
Send Feedback on this topic to the authors