Understand the Windows CE build Process

Source: Internet
Author: User

Windows CE build system has always been a headache for many CE developers. Here I will give a brief introduction to my understanding of Windows CE build system. A complete understanding of the entire build process also helps debugging and troubleshooting problems encountered in the build.

First, the installed Platform builder contains the open source code of Windows CE and the lib file built from the private source code. Normally, we create a new Windows ce OS Design project and select build to generate a nk. binfile. Then, let's take a look at the steps for building:

First, the entire build process is called build demo. In the command line, blddemo is a batch processing command, which is used to build the entire Windows CE operating system. It is divided into three phases:

1. build sub-project stage (to avoid confusion, we agree that the build sub-project stage is referred to as the build stage, and the entire build process is called the build demo process): All sub-projects in the build public directory, the build system identifies sub-projects based on the information in the dirs and sources files and (theoretically) builds each sub-project without interference. The Library (lib) and binary (dll, exe) files generated by the build will be copied to the main project according to different identifiers (see note) oak and sdk directory (OAK is used by the WinCE OEM and the SDK is used by developers ).

2. system Generate (can be temporarily translated into System generation, referred to as sysgen) stage: link the library files generated in the build phase and the lib files built from the private source code to the exe or dll files as specified in the makefile file of the main project, and copy the generated files to the release directory. The sysgen process is controlled by environment variables. All environment variables starting with sysgen _ are used to control components.

3. Make Image stage: write some exe files in the release Directory into nk. bin Based on the bib file of the main project as the ROM Image.

 

The above is a simple description of the builddemo process. In fact, the specific process has more complicated details, such:

1. Some sub-projects in the build stage have dependencies, so you can specify the build order of the sub-projects in sources.

2. There will be some localization sub-projects in the build phase, which are responsible for extracting the corresponding res files from Microsoft's data files

3. There are many batch processing files in the main project cesysgen to process the dependency between the sysgen variables.

4. Catalog is a graphical operation of the sysgen variable, but it cannot control all sysgen variables.

5. make image replaces the resources in the exe file to complete localization.

6. There is a BSP build process before make image.

......

There are many similar details. You can pay attention to the logs generated in build demo.

 

Next we will introduce some useful commands for building.

Blddemo: the complete build demo process by default. It will automatically detect the child projects that have been built and skip

Blddemo-q: The quick build demo process skips the build sub-project phase and starts directly from sysgen. This option is available after the sysgen variable is changed.

Blddemo-c: clears the build demo process of the subitem and builds all the subprojects again.

Blddemo clean-c: clears the sub-project and build demo process. It will re-build all sub-projects and delete the files generated by sysgen and re-create sysgen.

Makeimg: regenerate the nk. binfile

Makeimg-c: clears the release directory, copies the files generated by sysgen again, and generates the nk. binfile again.

Sysgen-p <main project name>: Re-sysgen a main project

Sysgen-p <main project name> <Module name>: re-enter a module in a main project of sysgen. Generally, a module corresponds to a binary file.

Build: build sub-projects in the current directory

Build-c: re-build the sub-project of the current directory

 

Note: The main project refers to the level-1 directory under the public directory.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.