Export (0) Print
Expand All
Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

Importing a Custom OS into Microsoft Windows CE Platform Builder 3.0

Windows CE 3.0

Microsoft Corporation

June 2000

Summary: The operating system (OS) configurations provided with Windows CE can be modified to suit the needs of your platform. Using one of these configurations as a base, you can create a custom OS to use as a template that you can import into Platform Builder. (5 printed pages)

To import a custom OS into Platform Builder, you need to first import a component (.cec) file for the OS into the catalog. The .cec file is a text file that describes platform components.

This tutorial describes how to create the files required to enable Platform Builder to recognize your custom OS. The example in this tutorial uses the Minkern OS configuration. Utilize this example as a guide for importing your custom OS into Platform Builder. To import a custom OS into Platform Builder, you must perform the following three tasks:

  1. Create a custom OS.
  2. Create a .cec file for a custom OS.
  3. Import a .cec file into the catalog for a custom OS.

IDE Procedures

To create a custom OS

  1. With Platform Builder installed, create the Myminkern subdirectory in %_WINCEROOT%\Public. The %_WINCEROOT% environment variable describes the root directory of the OS files, for example, C:\Wince300.
  2. Copy all of the files from %_WINCEROOT%\Public\Minkern to the new %_WINCEROOT%\Public\Myminkern directory.

    This directory contains all of the files specific to your OS, such as Project.bib, Project.reg, font files, .wav files, localization strings, and Cesysgen.bat. These files describe the OS in terms of environment variables.

  3. Rename the \Myminkern\Minkern.bat file to Myminkern\Myminkern.bat.

To create a .cec file for a custom OS

  1. Create a text file called Myminkern.cec in the %CEPBdir%\CEPB\CEC directory. %CEPBDir% refers to the root directory of Platform Builder, for example, C:\Program Files\Windows CE Platform Builder\3.00.
  2. Open the new .cec file in a text editor, and create the CECInfo block. For example:
     CECInfo (
         Name (Myminkern)
         GUID ({1D060593-C56E-4dac-A131-393479EBA0FB})
         CECVersion (3.00)
         Vendor ("My Company Name")
         Description ("Myminkern")
    )
    
    

    The following code example shows a general CECInfo block.

    CECInfo (
       Name (<.cec file name>)
       GUID (<GUID value>)
       CECVersion (3.00)
       Vendor (<company name>)
       Description (<.cec file description>)
    )
    
    

    This section uniquely identifies the .cec file so it can be imported into the catalog. The Name field must be name of the .cec file without the .cec extension, for example Myminkern. Use a utility such as Guidgen.exe to create a new globally unique identifier (GUID).

    Note   When the data for a field in a .cec file contains a space, the data must be enclosed by quotes. If the data is not enclosed by quotes, Platform Builder will only read the first word. Note tokens are separated by space, and lines are ignored. If you enter a comment line, you need to include a space after // in order to avoid a syntax error.
  3. Create the ComponentType, Implementation, and BuildMethod blocks for the coreos component in the .cec file. For example:
    // MYMINKERN OS Config component
    ComponentType (
         Name (coreos)
         GUID ({B3509C13-F1E4-11d2-85F6-004005365450})
         Description ("CE coreos")
         Implementations (
              Implementation (
               Name (MYMINKERN)
                GUID ({803010E2-36B0-4f4c-83A0-D6C31D691A51})
                Description ("MYMINKERN Config")
                BuildMethods (
                    BuildMethod (
                       Step (CESYSGEN)
                        GUID ({409717CB-96C4-4f2c-9BC2-C52B74FE6028})
                       CPU ("default")
                        InputFiles( "$(_PROJECTROOT)\oak\misc\cesysgen.bat" )
                        Setting( '#OUTPUT(CE_MODULES)' )
                         Setting( '#INPUT( "Include support for Format 
                            Message",
                         MINKERN_NOFMTMSG, 0, 0, "" )' )
                        Setting( '#INPUT( "Include support for the 
                         installable RAM
                        Filesystem", MINKERN_NORAMFS, 0, 0, "" )' )
                        Setting( '#INPUT( "Include support for databases", 
                        MINKERN_NODATABASE, 0, 0, "" )' )
                         Setting( '#INPUT( "Include support for password 
                            protection", 
                         MINKERN_NOPASSWORD, 0, 0, "")' )
                         Setting( '#INPUT( "Include support for toolhelp 
                         functionality", MINKERN_NOTOOLHELP, 0, 0, "" )' )
                         Setting( '#INPUT( "Include CEF components", 
                            CE_INCLUDE_CEF, 1, 0, 
                         "" )' )         
                )
                  )   
               )
           )
    )
    
    

    The following code example shows general ComponentType, Implementation, and BuildMethod blocks for a coreos component.

    ComponentType (
    Name (coreos) // Component type
        GUID (<GUID value>)
       Description (<component description>)
       Implementations (
          Implementation (
             Name (<specific implementation>)
             GUID (<GUID valud>)
             Description (<description of component implementation>)
             BuildMethods (
                BuildMethod (
                   Step (<Buildstep>)
                   GUID (<GUID value>)
                   CPU ("<CPU list>" ½ "default")
                   InputFiles ("<input file>")
                   Setting ('<setting>')
                )
             )
          )
       )
    )
    

    This section must reference the same coreos GUID as defined in the Configs.cec file, which is {B3509C13-F1E4-11d2-85F6-004005365450}. Platform Builder uses this GUID to identify the component as a coreos component. Use the Guidgen.exe utility to create the GUIDs for the other fields in the COREOS section.

    If you want the Myminkern OS to appear in the Platform Wizard, the CPU field of the BuildMethod block must either be "default" or list the CPU that is selected in the Platform Wizard. If "default" is selected, all CPUs that originally shipped with Platform Builder (SH3, SH4, SA1100, ARM720, ARM720T, R3912, R4102, R4111.16, R4111.32, R4300, PPC403, PPC821, and x86) apply to the Myminkern OS configuration and Myminkern always appears as an option in the Platform Wizard. Otherwise, Myminkern appears only if a CPU was selected in the Platform Wizard that was also listed in the CPU field.

    The Cesysgen.bat file determines the subcomponents that create the Myminkern OS. This file is listed in the InputFiles section of the Build Method block.

To import a .cec file for a custom OS into the Catalog

  1. Open the Platform Builder IDE, and then choose Manage Platform Builder Components from the File menu.
  2. Choose Import New on the Manage Platform Builder Components dialog box.
  3. Select the name of the .cec file for your custom OS. For this tutorial, browse to the %CEPBDir%\CEPB\CEC directory, select the %CEPBDir%\CEPB\CEC\Myminkern.cec file, and then choose Open.
  4. Choose Close to close the dialog box and refresh the catalog view.
  5. Click to expand the coreos tree node in the catalog. The Myminkern OS should be visible in the list.

To choose a custom OS when building a platform

  1. Choose New from the File menu.
  2. Choose the Platforms tab.
  3. Enter a name for your platform in the Platform name box.
  4. Type a new path for the platform in the Location box, or use the browse button to select a platform directory. The path cannot be longer than 32 characters.
  5. Select one or more microprocessors that your platform will support in the Processors box, and then choose OK. The Processors box lists only the microprocessors you installed.
  6. Choose an option for a board support package, and then choose Next.
  7. Choose Select from all applicable configurations, and then choose Myminkern from the dropdown box.

    At this stage, none of the .bsp files contain references to the Myminkern OS, so the platform that is created contains only the Myminkern component and any default components.

  8. Modify the Mycepc.bsp file to add the same support for Myminkern that Minkern has. For example:
    // *** Myminkern ***
    #IF (“COREOS”, "MYMINKERN")
         // pc_ddk
         #ADD_COMPONENT_BY_GUID_TO_ROOT ("{17E1AF3E-2212-11d4-8456-
             00500498479D}")
    #ENDIF
    
    
Show:
© 2014 Microsoft