Share via


Sysgen Tool (Sysgen.bat) (Compact 2013)

3/26/2014

The Sysgen tool (Sysgen.bat) builds a customized Windows Embedded Compact 2013 OS by using the settings specified in Cesysgen.bat. It uses Nmake.exe to create the modules specified in Cesysgen.bat by linking together the .lib files that correspond to the functionality specified in Cesysgen.bat.

Syntax

sysgen [-h] [-b] [-c] [-p Tree][NmakeTarget] [NmakeTarget] ...

Parameters

  • -h
    Displays a Help screen.
  • -b
    Used for internal calls only.
  • -c
    Runs Nmake.exe with the -clean parameter.
  • -p Tree
    Runs Sysgen.bat in the specified project. If no project is specified, Sysgen.bat runs in the Common project, which builds core Windows Embedded Compact 2013 functionality.
  • NmakeTarget
    Specifies a specific module to build. If NmakeTarget is not specified, Nmake.exe builds all the modules listed in Cesysgen.bat. Normally, you should not use this parameter, because a target device with only one project may be incomplete.

You can use NmakeTarget to specify a special target as well as a module. The following table describes the special targets that can be used as NmakeTarget parameters.

Value

Description

Files

Copies the filtered Common.* files to the local target directory.

Includes

Copies the filtered include files to the local target directories.

Makedirs

Creates NLS files and copies them to the local target directory.

Nls

Copies the code page files to the local target directory.

Error Messages

  • ERROR: Project specific cesysgen.bat not found. Please create a cesysgen.bat in %_PROJECTROOT%\oak\misc
    Sysgen.bat relies on Cesysgen.bat to specify the functionality for the Windows Embedded Compact 2013 project. Sysgen.bat looks for Cesysgen.bat in %_PROJECTROOT%\Oak\Misc. To troubleshoot, be sure Cesysgen.bat resides in this directory.

Any additional errors during the running of this tool appear in the Build.log file, which is located in the %_WINCEROOT% directory.

Examples

The following code example shows how to use Sysgen.bat to call Nmake.exe to create target system directories as required, build or link core Windows Embedded Compact 2013 functionality, and copy core functionality to the local target areas.

sysgen

The following code example shows how to use Sysgen.bat to call Nmake.exe to build or link Windows Embedded Compact 2013 shell functionality and copy them to the local target areas.

sysgen -p wceshell

Remarks

Note

Cebuild.bat calls this tool. You should not normally call this tool directly. To run Sysgen.bat correctly for all OS trees that your OS design uses, run cebuild -q instead. The following documentation is provided for completeness and informational purposes only.

After verifying that a Cesysgen.bat file exists in the %_PROJECTROOT%\Oak\Misc directory, Sysgen.bat sets the appropriate environment variables for the functionality specified in Cesysgen.bat.

Sysgen.bat then calls Nmake.exe, which uses the rules in the makefile file, located in the %_WINCEROOT%\Public\Common\Cesysgen directory or, if the -pProject option is specified in the makefile file, in the %_WINCEROOT%\OSDesigns\<Project Name>\Cesysgen directory. Nmake.exe does the following:

  • Creates any target system directories that do not already exist.

  • Creates the modules specified in Cesysgen.bat by linking the .lib files that correspond to the specified functionality for each module in Cesysgen.bat.

  • Calls the Resource Combining tool (Res2res.exe) to combine the resource files for all functionality specified in Cesysgen.bat. Sysgen.bat calls Res2res.exe once for each language.

  • Calls the Resource Check tool (Checkres.exe) and the Resource Merge tool (Rebaseic.exe) to combine multiple binary resource (.res) files into a single .res file and fix any conflicting resource identifiers. During this process, the following warning might be displayed:

    Did not find a redirect resource. 
    

    You can ignore this message.

  • Calls the Feature Filter tool (Cefilter.exe) to preprocess the header files and other miscellaneous source files before the selected modules are linked.
    The header files and the common files contain comment lines with special tags that Cefilter.exe uses for preprocessing. These tags are written in the @CESYSGEN tag language. The syntax of this language includes conditional statements; for example, logical-and, logical-or, and logical-not conditions. If you edit or remove these tags, unexpected errors will occur.

  • The following table shows the files that Cefilter.exe calls for preprocessing and the location of these files after processing is complete.

    Input files from %_COMMONPUBROOT%

    Output directory in %SG_OUTPUT_ROOT%

    Sdk\Inc\*.*

    Sdk\Inc

    Oak\Inc\*.*

    Oak\Inc

    Ddk\Inc\*.*

    Ddk\Inc

    Oak\Files\Common\*.*

    Oak\Files

  • Copies modules that do not have corresponding Catalog items into the appropriate target directories.

Sysgen.bat places the resulting files in various subdirectories in the directory location specified by the SG_OUTPUT_ROOT environment variable. For more information, see Miscellaneous Environment Variables.

Sysgen.bat places error information in the Build.log file in the %_WINCEROOT% directory.

See Also

Reference

Cesysgen Batch File (Cesysgen.bat)

Other Resources

Build System Command Line Tools