Analysis of the CEC file in BSP

Source: Internet
Author: User

Author: wogoyixikexie @ gliet 2008.12.02

I have been wondering what the smdk2440.cec file is and what role it plays. It seems that if a new driver needs to be used, a lot of information has been collected in the past, and he hasn't seen how it relates to the development driver, but you can be sure, the development of BSP must be related to him.

See the Pb help document below. Take a look and explain it slowly.

Platform builder User's Guide>Catalog Overview>Catalog mizmization

After you create a project, you can use a catalog item (. CEC) file to associate it with a catalog item that you can display in the catalog. for more information about sample. CEC files, seeSample. CEC files.

-- Obviously, the function of this CEC file is to display it in the catalog on the right. For better image, I will map it out.

 

---- Play basketball first, And tell R & D comrades that the body is the capital of the revolution. Go home and continue writing at night, and there will be new tasks tomorrow.

 

After the catalog item is displayed in the catalog, you can add the associated project to other OS designs you create on the same development workstation. to do this, you must first create. CEC file and then import the file into the catalog.

A. CEC file consists of blocks and subblocks that describe metadata about catalog items and their relationships. The following table shows the blocks in A. CEC file and the order they appear in.

Block name Content
Cecinfo Block

Basic information about the. CEC file, such as the name, description, vendor, and version of The. CEC file.

Name, attribute, version

Componenttype Block

Catalog item Groups or a generalized catalog item that might have has different implementations.

Topic, generate topic, etc.

Implementation Block

Definition of an implementation for a component type.

Define the execution of a component

Buildmethod Block

Information about which CPUs support your catalog item and, if applicable, links to source files, help documentation (. CHM) files, and user-created projects.

CPU information of the topic, connection to the sources file, help documentation, User Creation Project, etc.

NoteBuild-specific information in custom CEC files is not supported in Windows CE 5.0. although this does not prevent CEC files from earlier versions of platform builder from being used, the information that is no longer supported, such as custom build steps, is ignored.

When you create a. CEC file and want to add an implementation or componenttype defined in another. CEC file, use the existing globally unique identifier (guid) rather than creating a new guid.

When you create a component, define an CEC file, and define a unique guid instead of creating a new guid, you must pay special attention to this. I really don't know about this.

When modifying an existing component type, specify only the name and guid fields. specify the name and guid

The following code example shows the componenttype block that specifies a new display driver (an implementation of the display component type ).

ComponentType(  Name ( "Display")....  Implementations..)

When adding to an existing implementation, use the same implementation version number as the one you want to extend.

When the data for a field contains a space, enclose the data in quotes. tokens are separated by spaces and lines are ignored. if you enter a comment line, include a space after // to avoid a syntax error.

For examples of the grammar used in. CEC files, examine the default. CEC files that are installed with platform builder. these default. CEC files are installed in the % _ winceroot %/public/common/oak/CATALOG/CEC directory.

The Platform builder import parser adheres to the following rules when importing a. CEC file:

  • Guids are generated for any structure that does not supply one, including component types, implementations, and build methods.

    NoteTo ensure consistency, supply your own guids for your catalog items. you can use the guidgen tool to create a guid. guidgen.exe is in the % _ winceroot %/SDK/bin/i386 directory. for more information, seeGuidgen Tool.

  • -- Oh, use this GUID generation tool.

  • Guids are specified in the following standard format:

    {XXXXXXXX-XXXX-xxxxxxxxxxxx}

  • A. CEC file can reference other structures by name instead of guid only if the structures are defined in the same. CEC file.
  • If the information for a field requires more than one value, such as Children (), quotes are not needed. however, if your value has a space in the string, such as "my catalog item," include double quotes around the string.
  • Modifications. CEC files are not ininitialized ated if another. CEC file references the same catalog item group. to incorporate the changes to a catalog item, all. CEC files containing references to the specified catalog item group must be removed from the catalog and imported again.
  • -- After modifying the CEC file, you must delete it and re-import it.

A utility is wrongly ded with platform builder that you can use to create and modify. CEC files. For more information, seeCEC Editor.

BSP. CEC files contain data describing your device drivers and your OEM adaptation layer (oal ).

The following code example shows a BSP. CEC file that contains a guid identifying the file as an oal in the catalog.

ComponentType (    Name( BSPs )    GUID( {3CABD6DA-B577-4a87-9490-9432E80DC2F1} )    Description( "Board Support Packages" )    Implementations(        Implementation(
See also

|Cecinfo Block|Componenttype Block|Implementation Block|Buildmethod Block

Let's take a look at this first

Cecinfo Block

 

Platform builder User's Guide>Catalog Overview>Catalog mizmization>Catalog item files

The cecinfo block contains basic information about the. CEC file, such as the name, description, vendor and version of The. CEC file.

NoteThe cecinfo block must be the first block in A. CEC file, and there can only be one cecinfo block in A. CEC file.

The following code example shows a cecinfo block.

CECInfo (   Name(Mycecfile.cec)   CECVersion (3.00)  // CEC file   GUID( <GUID value> )   Vendor ("Calc U. Later")  //  quotes are needed because of space in the string   Description ("My CEC File description"))

The following table shows the elements of the cecinfo sub-blocks.

Element Description
Name Optional element that identifies the name of The. CEC file.
Guid Optional element that supplies the guid of the. CEC file.

If a value is not present, it is created when the. CEC file is imported into the catalog.

Description Optional element that describes the. CEC file.
Cecversion Element that identifies the version of The. CEC file.

The following versions are supported: 2.12, 3.0, 4.0, and 5.0. Use version 2.12 and 3.0 only to support backward compatibility.

Vendor Optional element that defines the vendor of the. CEC file.

 

Haha, I will not list them one by one. The help documentation in Pb is quite detailed.

 

However, I don't think that the development driver needs to modify the CEC file, such as dirs and souces.

 

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.