INFO: Creating CEC and BSP Files for a New Platform (290198)



The information in this article applies to:

  • Microsoft Windows CE Platform Builder 2.11
  • Microsoft Windows CE Platform Builder 2.12
  • Microsoft Windows CE Platform Builder 3.0

This article was previously published under Q290198

SUMMARY

BSP and CEC files are used by the Platform Builder integrated development environment (IDE) to summarize a collection of "components" (for example, drivers, resource files, and so forth) along with the instructions on how they relate to one another, as well as how they're built (if applicable) during the various build stages. Note that CEC and BSP files are a feature of the IDE. They aren't required when performing a command-line build.

This article describes the purpose of these two types of files, gives an overview of how they are created, and describes how they're imported into the Product Builder IDE.

MORE INFORMATION

There is usually one CEC file created for a platform, and this file provides a way to list the drivers and other components that are possible build candidates for a platform. A CEC file generally begins with a summary platform descriptor, such as:
CECInfo (
    Name(cepc)
    GUID({1850C9B1-98A2-11d3-993F-00105AC7264F})
    CECVersion(3.00)
    Vendor("Microsoft")
    Description("CEPC components")
)
				

The platform name and GUID should uniquely identify the platform components. GUIDs are used throughout the remainder of the CEC and BSP files. Note that the GUIDs can be generated through the Guidgen.exe utility.

Following the CEC header, specific components are listed along with instructions detailing how they're built, in series. For example:
//  type "wavedev" and implementation
ComponentType (
    Name( wavedev )
    GUID ( {35E7043C-EEA9-11d2-A092-0060085C1832} )
    Description( "wavedev" )
    Group( "\Drivers\CEPC" )
    Implementations(
        Implementation(
            Name( wavedev )
            Description( "wavedev" )
            GUID ( {35E7043C-EEA9-11d2-A092-0060085C1833} )

            BuildMethods(
                BuildMethod(
                    Step( BSP )
                    GUID( {B3509B98-F1E4-11d2-85F6-004005365450} )
                    CPU( "x86" )
                    OutputFiles( wavedev.DLL )
                    Action( '#ENV(ODO_NOAUDIO, "")' )
                    Action( '#BUILD(SOURCES, "$(_WINCEROOT)\platform\CEPC\Driver
s\WAVEDEV")' )
                )

                BuildMethod(
                    Step( makeimg )
                    GUID( {F7E9BED1-1644-11d4-99D1-00105AC7264F} )
                    CPU( "x86" )
                    Action( '#ENV(ODO_NOAUDIO, "")' )
                )
            )
        )
    )
)
				

The "wavedev" component describes the WAV audio driver. The component starts with a header similar to the overall CEC file header (a name, GUID, and description) that uniquely identifies and summarizes the component. The component is also assigned to a group (for example, "\Drivers\CEPC"), which is the location where the component will show up under the Platform Builder catalog view. Following this are a series of implementation details, the most prominent of which are the build methods.

The build methods describe how the component is built during the various stages of the build process (compile, copy, MAKEIMG, and so forth) along with the CPU architecture on which this component should be allowed to be built. Above, the "BSP" step indicates that the wavedev driver should be built for x86 platforms only (for example, CEPC), the output file name is Wavedev.dll, and the "ODO_NOAUDIO" environment variable should be unset when building this component (in other words, if this component is selected from within Platform Builder, the ODO_NOAUDIO variable should be unset, thereby allowing the component to be built during the compile/link phase.) Further, the SOURCES line tells the build tools where to look to find the SOURCES file that controls the image build. (The sources file is looking for a environment variable ODO_NOAUDIO, which should be unset. If it were set, the build process would skip the driver build). In addition, the BSP build phase (for example, compile/link) build method instructions for other parts of the process can be specified (the MAKEIMG process in the example earlier).

For more details on the syntax and options supported in the CEC files, see the Platform Builder documentation. Typically, someone creating a CEC file copies an existing file from a similar platform/component and makes pertinent changes. (NOTE: It's important to ensure that the GUIDs are unique from other CEC files imported into Platform Builder. Platform Builder returns an error if it finds conflicts during the import phase).

The CEC file should thus list the components and build steps that make up a platform (or make up a driver package, for example).

BSP files summarize the specific list of components (from CEC files) that make up a specific instance of a platform. For example, if you choose to build a Minkern image of a CEPC platform, the BSP file would be responsible for ensuring that the OEM adaptation layer (OAL) is included in the image.

BSP files also include the various components that make up a configuration. For example:
#IF ("COREOS","MAXALL")
        //  pc_ddk
        #ADD_COMPONENT_BY_GUID_TO_ROOT ("{B3509B75-F1E4-11D2-85F6-004005365450}"
)
#ENDIF
				

You should include the GUID for the pc_ddk component (described in a CEC file) in any MAXALL configurations of the platform. The BSP file proceeds similarly for other components and other configurations.

Once the BSP and CEC files are created for a new platform, they must be imported into the Platform Builder IDE. Note that it is also possible to create just a CEC file and import the components. If so, they will appear in the catalog view and you'll be able to drag them into the project build window for any platforms that have the same processor architectures listed in the CEC file component lists, but they won't by default be included in any platform BSPs. The BSP files define a default set of components for a platform and thus new platforms should have a BSP definition.

Convention dictates that the CEC and BSP files reside in a common location. Specifically, CEC files generally go in

\Program Files\Windows CE Platform Builder\3.00\CEPB\CEC\

and BSP files in:

\Program Files\Windows CE Platform Builder\3.00\CEPB\BIN\IDE

The CEC file is then imported into the Platform Builder IDE. To do so, from the File menu, select Manage Platform Builder Components. A dialog box will appear. Select Import New. and then find and select the newly created CEC file. Next, click OK and close the dialog box, and the components will appear in the IDE catalog view (right pane). If you created/stored a BSP file, the next time you use the Platform Builder Platform Wizard to create a new platform, the BSP name will appear as a selection, depending on the processor support you selected in the first dialog box (in other words, only BSPs that contain components that are specified supporting the CPU architecture selected are displayed).

REFERENCES

For more information on CEC and BSP files, see Platform Builder Help.

Modification Type:MinorLast Reviewed:8/18/2005
Keywords:kbinfo KB290198