Command-Line Driver Dependencies (Windows Embedded CE 6.0)
1/6/2010
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 (.pbxml file), you must understand the dependencies for that driver. 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 a given driver. In addition, Platform.bib defines the hardware modules and driver files for the 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 that are set to string values. Thus, to specify the EON product model, this example creates a variable called MYCOMPANYS_MODEL_EON and sets that variable. In binary image builder (.bib) files, it is recommended to use this format for IF statements.
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
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%\Platform\CEPC\Files\Platform.bib, shows the nested conditionals around a USB driver, Uhci.dll, that govern its inclusion in a CEPC-based OS design.
; @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 earlier 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 OS design 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
Concepts
Driver Dependencies
Catalog Item Management
IDE Driver Dependencies