Design Your First OS (Compact 7)
3/12/2014
After setting up your vCEPC, the next step is to design and build a Windows Embedded Compact 7 OS by using Platform Builder, which is an add-in to the Visual Studio integrated development environment. You can also build the OS from the command line, but that is out of the scope of this guide. (For more information about command-line build tools, see Build System Tools.)
When you create an OS by using Platform Builder, you first use the OS Design Wizard to select the board support package (BSP) for your device and choose a design template as a starting point for your OS design. Then, in Platform Builder, you add and remove catalog items to customize the OS. Each catalog item adds support for a feature or functionality. Afterwards, you build the OS.
Select Options in the OS Design Wizard
You use the OS Design Wizard to choose a design template, which is an initial selection of catalog items for a device of a certain type. For a description of the design templates that Windows Embedded Compact 7 includes, see Design Templates. In this guide, you use the Handheld design template. This template, which is designed for a portable device that connects to the internet, contains features such as Internet Explorer Embedded and Remote Desktop Connection. The template supports user input by using a mouse, a stylus, or a finger. You add support for keyboard input after you use the OS Design Wizard.
To design an OS by using the OS Design Wizard
In Visual Studio, click File, point to New, and then click Project.
In the New Project dialog box, in the left pane, click Platform Builder. In the right pane, under Visual Studio installed templates, click OS Design.
At the bottom of the New Project dialog box, enter a name for your OS design. The name cannot contain spaces.
Click OK. The OS Design Wizard appears.
In the OS Design Wizard, click Next.
On the Board Support Packages page, click Virtual PC: x86, and then click Next.
On the Design Templates page, expand Enterprise Device, click Handheld, and then click Finish. A Catalog Item Notification page with a security warning appears.
On the Catalog Item Notification page, read the notification, and then click Acknowledge.
You have completed the initial design of your OS. Next, you add and remove catalog items.
Add and Remove Catalog Items
After you use the OS Design Wizard, you can add and remove catalog items in Platform Builder by using the Catalog Items View window. The Catalog Items View window is shown in the following figure.
Each check box represents a catalog item; a catalog item adds support for a feature that you can include in your OS. When you point to a catalog item, a pop-up box appears that contains the catalog item name followed by a variable name in parentheses. This variable is called a Sysgen variable; every catalog item is associated with one. The build process uses Sysgen variables to control the features that are included in the OS design. For example, WordPad is associated with the Sysgen variable SYSGEN_PWORD.
A catalog item can have dependencies, which are other catalog items that it depends on for the feature to work properly. When you select a catalog item, Platform Builder automatically selects that catalog item’s dependencies also. To examine a catalog item’s dependencies, right-click the catalog item, click Show Dependencies, and then click Depends On. In the Catalog Items View window, a dependency has a square instead of a check mark in its check box. To learn why a dependency is included, right-click the catalog item and click Reasons for Inclusion of Item. You cannot remove a dependency unless you remove the catalog item that depends on it.
To add support for a keyboard and to remove the WordPad application from your OS design, complete the following steps.
To add and remove catalog items
In Platform Builder, if the Catalog Items View window is not visible, click View, click Other Windows, and then click Catalog Items View.
In the Catalog Items View window, under your OS design project, expand BSP, expand Virtual PC: x86, expand Device Drivers, and then expand Keyboard.
If your development computer is running Windows XP or Windows Vista, select VCEPC Keyboard driver:VPC2007. If your development computer is running Windows 7, select VCEPC Keyboard driver:WIN7VPC.
Under your OS design project, expand Core OS, expand Windows Embedded Compact, and then expand Applications - End User.
Clear the check box for WordPad.
Expand and collapse nodes to explore the other catalog items.
Save the OS design.
For more information about designing an OS, see Developing an Operating System Design.
Build the OS
Before you build an OS, you select the build options for the specific build that you want to generate. In this guide, you select the debug build configuration and examine the build options.
To change build options
In Solution Explorer, right-click your OS design project.
Click Properties.
In the left pane of the OS Design Property Pages dialog box, expand Configuration Properties.
Click General.
In the upper-right corner of the Property Pages dialog box, click Configuration Manager.
In the Configuration Manager dialog box, under Active solution configuration, select Virtual PC x86 Debug if it isn’t selected already.
Click Close to close the Configuration Manager.
Under Configuration Properties, click Build Options.
The default options for the Virtual PC x86 Debug configuration are shown in the following figure.
For this guide, leave the build options at their default values.
For future OS designs, you can enable or disable a build option by selecting Yes or No next to it. For information about each build option, see OS Design Property Pages: Build Options.
When you want to debug, ensure that Enable kernel debugger and Enable KITL are set to Yes. When you select Enable kernel debugger, the debugger can connect to and pass debugging information from your Windows Embedded Compact powered device to your development computer, and the kernel independent transport layer (KITL) is the communication link between your development computer and your Windows Embedded Compact powered device for debugging. Because you debug an application later in this guide, leave both of these build options enabled.
Note
When you enable KITL in your OS, the release directory of the OS design on your development computer is accessible as a network share directory called Release on your device. Using this directory, you can easily transfer files back and forth between your development computer and your device during development.
Click OK to close the Property Pages dialog box.
You build the OS (that is, the run-time image) as you would any other Visual Studio project.
To build the run-time image
In Solution Explorer, right-click your OS design project.
Click Build.
The build time varies depending on your computer speed, your BSP, and your OS design, but in this case it should take about 20 minutes. For more information about the build process, see Build an OS.