The Design Template can be downloaded from: 
The new Windows Embedded CE 6.0 New Design Wizard is configurable by adding new templates to a catalog file (PBCXML).   You may already know that you can add new BSPs to the catalog and these will then be listed in the wizard. You can also add new design templates for selecting the starting OS components. Having a custom design template can be useful to standardize the systems that you develop. At Eurotech, we have a set of Commercial Off The Shelf (COTS) boards that we design and sell. By standardizing the OS across our line of boards we reduce support and maintenance costs.
Unfortunately, the catalog editor within Visual Studio doesn’t support graphically working on design templates. But if you open the design template in Visual Studio it will provide XML Intellisense features, but first you must open the XSL Schema file also. The XSL Schema file is installed with Platform Builder by default in C:\Program Files\Microsoft Platform Builder\6.00\cepb\IdeVS\PbcXml600.xsd. So this means that to create a design template, you need to use a text editor. The file is XML, which I do not intend to discuss here.
To start, create a new PBXML file. I recommend using Visual Studio (File\New\File…\Platform Builder\Platform Builder Catalog File) because it fills in the file information for you. You might also copy one of the existing files from Public\CEBASE\Catalog and modify it suit your needs. Once you have the file open in Visual Studio, you can change the file information to suite your needs. Here is mine so far:
<?xml version="1.0" encoding="utf-8"?>
<CatalogFile xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" RequiredVersion="6.00" xsi:schemaLocation="urn:Microsoft.PlatformBuilder/Catalog PbcXml600.xsd" xmlns="urn:Microsoft.PlatformBuilder/Catalog">
  <FileInformation Id="BEBlogDesingTemplate">
    <Title>BEBlog Design Template</Title>
    <Description>Standard design templates from Bruce Eitman</Description>
    <Vendor>Bruce Eitman</Vendor>
    <OSVersion>6.00</OSVersion>
    <FileVersion>1.0.0.0</FileVersion>
 </FileInformation>
 
 <!-- Design templates go here -->
 
</CatalogFile>
The CatalogFile information can, and probably should, remain unchanged. You can see that I have changed the FileInformation to identify this file as belonging to me and added a Description. 
The next step will be to add one or more templates to the file. For this I will add one template with two options, or Flavors; Big OS and Little OS.
 <OSDesignTemplate Id="BEBlogTemplate">
    <Title>BE Blog Designs</Title>
    <Description>Standard design templates from Bruce Eitman to create a Big or Little OS</Description>
    <CoreOSId>CoreOS:MS:cebase</CoreOSId>
     <!—Build Options go here -->
    <Flavor Token="LittleOS">
      <Title>Little OS</Title>
      <Description>Standard Little OS design template</Description>
    </Flavor>
    <Flavor Token="BigOS">
      <Title>Big OS</Title>
      <Description>Standard Big OS design template</Description>
    </Flavor>
 </OSDesignTemplate>
The descriptions will be displayed when the user selects the design template and flavors in the new design wizard.
Now the file includes enough information that it can be added to the catalog, it won’t do much but you can select BE Design Templates and Big OS or Little OS. To try it, save the file in a catalog folder, like WINCE600\3rd Party\BEBlog\Catalog\BEBlogDesignTemplate.pbcxml.   When working on the design template, it is handy to open an existing or new OS Design in Visual Studio so that you have access to the Catalog View window. Then you can save your changes and select the refresh button at the top of the Catalog View to try your changes. Then create a new project, you can cancel the project creation to avoid creating a lot of throw away projects.
Before filling out the body of the Flavors and adding support for other options, let’s set some of the default values for the project build options. These are the settings found in Project\<Project name> Properties…\Configuration Properties\Build Options. To set these, add a Settings section with one or more BuildOption settings to the OSDesignTemplate.
The following will set IMGEBOOT and IMAGENOTALLKMODE to all configurations, and IMGNODEBUGGER and IMGNOKITL to retail builds:
    <Settings>
      <BuildOption Configuration="All">IMGEBOOT</BuildOption>
      <BuildOption Configuration="All">IMGNOTALLKMODE</BuildOption>
      <BuildOption Configuration="Retail">IMGNODEBUGGER</BuildOption>
      <BuildOption Configuration="Retail">IMGNOKITL</BuildOption>
    </Settings>
The most important thing that the design template does is add OS components by setting SYSGEN variables. The next step will set some SYSGEN variable when one of the flavors is selected. To do this, add a Settings section to the Flavor sections. In this settings section, instead of BuildOption use ItemID. This is the updated flavors:
    <Flavor Token="LittleOS">
      <Title>Little OS</Title>
      <Description>Standard Little OS design template</Description>
      <Settings>
        <ItemId>Item:MS:sysgen_cursor</ItemId>
        <ItemId>Item:MS:sysgen_iabase</ItemId>
        <ItemId>Item:MS:sysgen_notify</ItemId>
        <ItemId>Item:MS:sysgen_pm</ItemId>
        <ItemId>Item:MS:sysgen_shell</ItemId>
        <ItemId>Item:MS:sysgen_wbtshell</ItemId>
      </Settings>
    </Flavor>
    <Flavor Token="BigOS">
      <Title>Big OS</Title>
      <Description>Standard Big OS design template</Description>
      <Settings>
        <ItemId>Item:MS:sysgen_audio</ItemId>
        <ItemId>Item:MS:sysgen_auth</ItemId>
        <ItemId>Item:MS:sysgen_auth_ntlm</ItemId>
        <ItemId>Item:MS:sysgen_auth_schannel</ItemId>
        <ItemId>Item:MS:sysgen_certs</ItemId>
        <ItemId>Item:MS:sysgen_connmc</ItemId>
        <ItemId>Item:MS:sysgen_crypto</ItemId>
        <ItemId>Item:MS:sysgen_cursor</ItemId>
        <ItemId>Item:MS:sysgen_dcom</ItemId>
        <ItemId>Item:MS:sysgen_ethernet</ItemId>
        <ItemId>Item:MS:sysgen_help</ItemId>
        <ItemId>Item:MS:sysgen_iabase</ItemId>
        <ItemId>Item:MS:sysgen_msmq</ItemId>
        <ItemId>Item:MS:sysgen_msxml_dom</ItemId>
        <ItemId>Item:MS:sysgen_netutils</ItemId>
        <ItemId>Item:MS:sysgen_notify</ItemId>
        <ItemId>Item:MS:sysgen_pm</ItemId>
        <ItemId>Item:MS:sysgen_ppp</ItemId>
        <ItemId>Item:MS:sysgen_redir</ItemId>
        <ItemId>Item:MS:sysgen_shell</ItemId>
        <ItemId>Item:MS:sysgen_soaptk_client</ItemId>
        <ItemId>Item:MS:sysgen_standardshell</ItemId>
        <ItemId>Item:MS:sysgen_touch</ItemId>
        <ItemId>Item:MS:sysgen_usb</ItemId>
        <ItemId>Item:MS:sysgen_usb_hid</ItemId>
        <ItemId>Item:MS:sysgen_usb_hid_clients</ItemId>
        <ItemId>Item:MS:sysgen_wininet</ItemId>
        <ItemId>Item:MS:sysgen_as_base</ItemId>
        <ItemId>Item:MS:sysgen_fonts_arial_1_30</ItemId>
        <ItemId>Item:MS:sysgen_wceload</ItemId>
        <ItemId>Item:MS:sysgen_ie</ItemId>
        <ItemId>Item:MS:sysgen_aygshell</ItemId>
        <ItemId>Item:MS:sysgen_usbfn_serial</ItemId>
        <ItemId>Item:MS:sysgen_usbfn_ethernet</ItemId>
        <ItemId>Item:MS:sysgen_usbfn_storage</ItemId>
      </Settings>
    </Flavor>
Now would be a good time to test creating an OS Design. Mistyping a variable will keep the feature from being added to your new OS Design.
NOTE: The SYSGEN variables must be in lower case. Simply copying and pasting them from someplace else will not work, the case must be changed.
When you tested, did you notice that the wizard included a blank selection page? Apparently, it expects that the template include at least one set of options. So the next step is to add some options to a selection page. To do this, add a SelectionPage section and fill it in with some options. The following adds Dr Watson options to the first selection page:
    <SelectionPage>
      <Title>Dr Watson Options</Title>
      <Description>Select Dr Watson features</Description>
      <OptionGroup>
         <Option>
           <Title>#MS:Cebase:ErrorReportTransferDriver:Title</Title>
           <Description>#MS:Cebase:Supportfortrans.iverisrequired.:Description</Description>
           <Settings>
             <ItemId>Item:MS:sysgen_watson_xfer</ItemId>
           </Settings>
         </Option>
         <Option>
           <Title>#MS:Cebase:ErrorReportingControlPanel:Title</Title>
           <Description>#MS:Cebase:Supportfortheus.lfe_Oak_Watson.:Description</Description>
           <Settings>
             <ItemId>Item:MS:sysgen_watson_ctlpnl</ItemId>
           </Settings>
         </Option>
         <Option>
           <Title>#MS:Cebase:ExceptionReportGenerator:Title</Title>
           <Description>#MS:Cebase:Supportforgener.nctioniscalled.:Description</Description>
           <Settings>
             <ItemId>Item:MS:sysgen_watson_dmpgen</ItemId>
           </Settings>
         </Option>
         <Option>
           <Title>#MS:Cebase:ClientWithUserInterface:Title</Title>
           <Description>#MS:Cebase:Supportforreque.lfe_Oak_Watson.:Description</Description>
           <Settings>
             <ItemId>Item:MS:sysgen_watson_client</ItemId>
             <ItemId>Item:MS:sysgen_watson_client_ui</ItemId>
           </Settings>
         </Option>
      </OptionGroup>
    </SelectionPage>
This adds some basic options to the selection page. It uses Microsoft’s predefined strings for titles and descriptions, but you could fill these in with your own strings. I don’t like to work that hard, so instead I looked through the existing templates for features that I wanted to use.
One of the Dr Watson options is the Dr Watson Client with User Interface. It might be good to present this as a sub-option and let the user pick between this and the client for headless devices. To do that, change the last option to include a sub-OptionGroup like:
            <Option>
              <Title>#MS:Cebase:ReportUploadClient:Title</Title>
              <Description>#MS:Cebase:Supportforuploa.cureconnection.:Description</Description>
              <OptionGroup ChildMultiSelect="false">
                <Option>
                  <Title>#MS:Cebase:ClientWithUserInterface:Title</Title>
                  <Description>#MS:Cebase:Supportforreque.lfe_Oak_Watson.:Description</Description>
                  <Settings>
                    <ItemId>Item:MS:sysgen_watson_client</ItemId>
                    <ItemId>Item:MS:sysgen_watson_client_ui</ItemId>
                  </Settings>
                </Option>
                <Option>
                  <Title>#MS:Cebase:ClientWithoutUserInterface:Title</Title>
                  <Description>#MS:Cebase:AClientWithoutU.errorreporting.:Description</Description>
                  <Settings>
                    <ItemId>Item:MS:sysgen_watson_client</ItemId>
                  </Settings>
                </Option>
              </OptionGroup>
            </Option>
To help with understanding the SelectionPage Options, here is a selection page that I used my own strings instead of Microsoft’s predefined strings. The following adds a selection page for some device drivers. It also adds some new concepts.
    <SelectionPage>
      <Title>Driver Options</Title>
      <Description>Select Drivers</Description>
      <OptionGroup>
        <Option Default="true">
          <Title>USB Serial</Title>
          <Description>USB Serial Client Driver</Description>
          <FlavorToken>LittleOS</FlavorToken>
          <Settings>
            <ItemId>Item:MS:sysgen_usbfn_serial</ItemId>
          </Settings>
        </Option>
        <Option Default="true">
          <Title>USB RNDIS</Title>
          <Description>USB RNDIS Ethernet Client Driver</Description>
          <FlavorToken>LittleOS</FlavorToken>
          <Settings>
            <ItemId>Item:MS:sysgen_usbfn_ethernet</ItemId>
          </Settings>
        </Option>
        <Option Default="true">
          <Title>USB Mass Storage</Title>
          <Description>USB Mass Storage Client Driver</Description>
          <FlavorToken>LittleOS</FlavorToken>
          <Settings>
            <ItemId>Item:MS:sysgen_usbfn_storage</ItemId>
          </Settings>
        </Option>
        <Option>
          <Title>Null Display Driver</Title>
          <Description>Null Display Driver</Description>
          <Settings>
            <ItemId>Item:MS:BSP_DISPLAY_NOP</ItemId>
          </Settings>
        </Option>
      </OptionGroup>
    </SelectionPage>
Added drivers are the USB Function Client drivers. Note the addition of Default=”true” in the Option tag, this causes these options to be selected by default. The USB Function Clients also have a new tag, FlavorToken which is set to LittleOS. These drivers will only be displayed when the Little OS is selected by the user. If you noticed earlier, the Big OS includes the USB Function Client drivers by default, so it wouldn’t make sense to display them for the Big OS.
I noticed that with the USB Function Client drivers added only for the Little OS, that when selecting the Big OS the selection page shows but is blank. To fix this, I added more options. In this case, I added the Null Display Driver and did not set the default to true.
Hopefully this gives you a start in creating your own design templates.
The articles listed in Summary of Platform Builder Catalog Posts to be of help.
Copyright © 2009 – Bruce Eitman
All Rights Reserved