Sysgen Tool (Windows Embedded CE 6.0)
1/5/2010
The Sysgen tool (Sysgen.bat) builds a customized Windows Embedded CE 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.
Note
Cebuild.bat calls this tool. You should not normally call this tool directly. To run Sysgen.bat correctly for all OS trees used by your OS design, 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 -p Project option is specified in the makefile file, in the %_WINCEROOT%\OSDesigns\<Project Name>\Cesysgen directory, to do the following:
Create any target system directories that do not already exist.
Create the modules specified in Cesysgen.bat by linking the .lib files that correspond to the specified functionality for each module in Cesysgen.bat.
Call 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.
Call the Resource Check tool (Checkres.exe) and the Resource Merge tool (Rebaseic.exe) to combine multiple binary resource files (.res) into a single .res file and fix any conflicting resource identifiers. During this process, the following warning may be displayed:
Did not find a redirect resource.
You can ignore this message.
Call the Feature Filter tool (Cefilter.exe) to preprocess the Windows Embedded CE header files and other miscellaneous source files before the selected modules are linked.
The Windows Embedded CE 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 location of these files after processing is complete.
Input files from %_COMMONPUBROOT% Output directory in %_PROJECTROOT% Sdk\Inc\*.*
Cesysgen\Sdk\Inc
Oak\Inc\*.*
Cesysgen\Oak\Inc
Ddk\Inc\*.*
Cesysgen\Ddk\Inc
Oak\Files\Common\*.*
Cesysgen\Oak\Files
Copy modules **that do not have corresponding Catalog items **into the appropriate target directories.
Sysgen.bat places the resulting files in various subdirectories of %_PROJECTROOT%\Cesysgen.
Sysgen.bat places error information in the Build.log file in the %_WINCEROOT% directory.
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 CE functionality.
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 |
---|---|
|
Copies the filtered Common.* files to the local target directory. |
|
Copies the filtered include files to the local target directories. |
|
Creates NLS files and copies them to the local target directory. |
|
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 CE 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, 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 CE 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 CE shell functionality and copy them to the local target areas.
sysgen -p wceshell