Wince 5.0 is doing the side (4)

xiaoxiao2021-03-06  23

Author: Wenbin

Home: Wen Bin Program Network http://www.wenbinweb.com

After the previous learning, we have mastered several phases of the process of generating CEs and compile. This time we come to find out how the Platform Builder is managed for us and how to manage your own components.

There is a "catalog" window on the right side in Platform Builder (hereinafter referred to as PB), which lists all components available for us, we can see that its content is very much, and now, there is, PB How do you manage these groups? If I have a new device driver component to put it in this component package window? If I have developed a device driver for other people, how can I release my driver? Below, we will solve these problems.

In PB, the management of these components can be implemented for a component file (.cec file). In CE4, the system comes with the CEC files in the PB installation folder under the installation folder below, we can easily find them there, but in CE5, its location changes, you can be in Wince500 / public Use them under CommON / Oak / Catalog / CEC.

If you develop OAL, device drivers, or other components, you can add them to the PB over the CEC file. Other platform developers can use these components by importing CEC files in the PB environment. The CEC file is a text file used to describe component information, which includes a list of some blocks, including the following four information blocks:

--Cecinfo block, used to describe the information of this CEC file, each CEC file can only contain one this information block, from which you can see the name, GUID, version, supplier, and brief description of the CEC.

--ComponentType block, which describes the highest level of component type, which can have multiple this information block in a CEC file, which describes the group where this component is located, and the CE components required by Group, MaxResolvedImplsallowed, etc. , Excluded components and information allowed in a CE platform.

- IMPLEMENTATION block, used to describe the various information required for this component in compile, each CEC file can also have multiple this information block, which is part of the ComponentType block, with BSpplatformDir, Children, optionalchildren, defaultdrivers, EXCLUDEWHENSET, FEATUREVARIABLE, IMPLSIZE and other entries can be found in the help document of the PB, which is not described here.

--BuildMethod block describes the compiled method, and part of the ComponentType block, in order to deepen the understanding of the last compilation phase, we tell the STEP and ACTION two entries in this block.

STEP is used to indicate which step will be made in this component, the last content, its value is: CESYSGEN, BSP, Buildrel, Makeimg. So if you have developed a component such as OAL or drive, you need to decide yourself to make PBs to compile it in what stage, you will be described in the CEC. In fact, in the specific compilation process, there are two sub-stages in the above described above, that is, for each stage in fact three steps, PreceSysgen, Cesysgen, PostceSysgen, Prebsp, BSP, Postbs ... generally not Specifically to this detailed extent.

Action describes the behavior of component compilation, and the corresponding relationship between the effective behavior and the compile stage is shown in the following table: ActionceSysgenbspbuildrelmakeImg # Build (Dir, ...) Noyesnono # Build (Mak, ...) Noyesnono #Custom (..., ...) NOYESYESNO # Copy (..., ...) Yesnoyesno # env (..., ...) NOYESNOYES # srccode (...) Nonono

The significance of these Action is as follows:

- # Build (): Use a Dirs file or a Sources file or make file to call build.exe, is used when fully compiling the platform;

- # Custom (): Run the batch file or executable when compiled;

- # copy (): Copy the file from a location to another;

- # ENV (): Set the environment variable;

- # srccode (): Specifies a folder containing the source file file, which is applied only when compiling the selected component.

For specific usage of each of the above entries, please refer to the help document of the PB. In order to get sensibility, we'd better open several CEC files with Notepad. For example, open serial.cec to see the implementation method of serial port driver components.

We learned the CEC file, let's solve the problem later, and assume that I get a device driver from other suppliers, which takes the CEC file, then how do I add this component to the PB component package? ? This problem is actually very simple, as long as the "manage catalog items" command is used under the File menu of the PB. I don't have to say anything in this pop-up dialog box.

Let's solve the next problem, how do I write a CEC file for the components I developed? This is also good, use the "Cec Editor" command under the Tools menu. If you don't write, you can open an existing CEC file to see how organization, then look at it to write yourself. Don't forget to save it after you have finished writing, but also pay attention to the Question of GUID.

At the end of this content, let's take a look at the BSP. What is BSP, in fact, it is a software package that implements device-driven packages for a development board. It contains source files, binary, etc., and OAL adaptation layer, bootloader, and other relevant profiles. For example, the CE5 evaluation version takes the X86's BSP, AMD's BSP and Emulator's BSP.

Usually the operation of the BSP is performed in the BSP wizard. It is located in the Platform menu, which utilizes it to create its own BSP, copy existing BSP, modify the existing BSP or create a global driver. If you are ready for the things you need to use, you can use it to generate your BSP, which will choose the necessary CE kernel components.

Ok, I have written a lot, hey, write this thing is really time, don't say it, I hope we can get more knowledge together.

转载请注明原文地址:https://www.9cbs.com/read-69460.html

New Post(0)