Partager via


Build Step: Sysgen OS (Compact 7)

3/12/2014

The Sysgen OS step links together the libraries created during the Build OS step. The Sysgen OS step manages link dependencies and selects only the components that are needed for the OS.

  1. To determine which components are necessary, this step reads SYSGEN_ variables from the environment. These values represent OS components and correspond to catalog selections in Platform Builder.
  2. The build batch files call another set of batch files to translate the SYSGEN_ variables from the environment into a set of MODULES and COMPONENTS variables. The following batch files are responsible for the translation:
    • %_WINCEROOT%\Platform\$(_TGTPLAT)\Cebasecesysgen.bat
    • %_WINCEROOT%\$(_PROJECTROOT)\Oak\Misc\_DEPTREE.bat
    • %_WINCEROOT%\Public\CEBase\Oak\Misc\_DEPTREE.bat
    • %_WINCEROOT%\Public\_DEPTREE\Cebasecesysgen.bat
  3. After the translation is complete, a full listing of MODULES and COMPONENTS is created in %_WINCEROOT%\$(SG_OUTPUT_ROOT)\Oak\Files\Ceconfig.h.
  4. This listing of MODULES and COMPONENTS variables is used to call the %_WINCEROOT%\Cesysgen\Makefile for each value in $(_DEPTREEs).
  5. A makefile rule is executed for each MODULE and COMPONENT variable in the environment.

Some larger .lib files, such as coredll.dll, may be linked without certain functionality if the corresponding MODULE or COMPONENT is not present. For example, in coredll.dll, the linker does not include the RequestBluetoothNotifications function unless CE_MODULES_BTD is set, which in turn is set by the corresponding Bluetooth SYSGEN_ variable (SYSGEN_BTH). The function may also be filtered out of header files in the same way. The end result of all of this dependency checking and linking is that all of the necessary files are linked and copied to $(SG_OUTPUT_ROOT).

Note

A new feature in Windows Embedded Compact 7 is the pre-linking in the Build OS step of many binaries that were formerly linked in the Sysgen OS step. As a result, the Sysgen OS step executes more quickly. You may notice, when looking at a %_WINCEROOT%\Cesysgen\Makefile, that some rules only copy instead of link.

After the Sysgen OS step is completed, the $(SG_OUTPUT_ROOT) directory contains everything that you need for the later build steps. You do not need to run it again unless the SYSGEN_ variables change.

See Also

Concepts

Build from the Top Down
Build Step: Build Platform\Common