Contents
Overview 4
Introduction to Platform Builder 5
Platform Development Cycle 7
Configuring the Platform 9
Building the Platform Image 18
Downloading the Image 25
Demonstration: Configuring, Building and
Downloading 32
Review 33
Module 3: Configuring
and Building with
Platform Builder
Information in this document, including URL and other Internet Web site references, is subject to
change without notice. Unless otherwise noted, the example companies, organizations, products,
domain names, e-mail addresses, logos, people, places, and events depicted herein are fictitious,
and no association with any real company, organization, product, domain name, e-mail address,
logo, person, places or events is intended or should be inferred. Complying with all applicable
copyright laws is the responsibility of the user. Without limiting the rights under copyright, no part
of this document may be reproduced, stored in or introduced into a retrieval system, or transmitted
in any form or by any means (electronic, mechanical, photocopying, recording, or otherwise), or
for any purpose, without the express written permission of Microsoft Corporation.
Microsoft may have patents, patent applications, trademarks, copyrights, or other intellectual
property rights covering subject matter in this document. Except as expressly provided in any
written license agreement from Microsoft, the furnishing of this document does not give you any
license to these patents, trademarks, copyrights, or other intellectual property.
2001 Microsoft Corporation. All rights reserved.
Microsoft, MS-DOS, Windows, Windows NT, Visual Studio are either registered trademarks or
trademarks of Microsoft Corporation in the U.S.A. and/or other countries.
The names of actual companies and products mentioned herein may be the trademarks of their
respective owners.
Module 3: Configuring and Building with Platform Builder 1
Overview
Introduction to Platform Builder
Platform Development Life Cycle
Configuring the Platform
Building the Platform Image
Downloading the Image
In this module, you learn how to use Platform Builder to configure a platform,
build a Windows CE image and download a Windows CE image.
After completing this module, you will be able to:
Identify the features of Platform Builder.
Describe the life cycle of platform development.
Identify how to configure a platform in Platform Builder.
Describe the process of building a platform.
Describe how a Windows CE-device is setup and how an image is
downloaded using Ethernet.
2 Module 3: Configuring and Building with Platform Builder
Introduction to Platform Builder
Windows CE operating system configurations
Embedded Windows CE development tools
z
Compilers
z
IDE-based debugger
z
Windows CE remote tools
z
Export SDK
Integrated Development Environment (IDE)
Run-Time libraries
Sample code
Windows CE Operating System Configurations
Platform Builder provides you with several different vertical device
configurations ranging from a Residential Gateway that features only the kernel
functionality to a Media Appliance configuration that includes many graphical
features and many applications.
Embedded Windows CE Development Tools
There are different types of embedded Windows CE development tools used by
Platform Builder to create and debug a Windows CE Image:
Compilers
Platform Builder provides you with compilers for all supported processors.
IDE-Based Debugger
The kernel debugger allows you to debug against different targets even with
different processors. The debugging method is the same for all processors.
Windows CE Remote Tools
Developers can debug the Windows CE target platform as they do in
Microsoft Windows NT®/95. Platform Builder contains all the tools that are
present in Microsoft Visual Studio.
The following tools are adapted for remote environment:
• Windows CE Spy++ provides tools to display information about
windows and their messages.
• Windows CE Registry Editor allows you to view the registry of the
remote platform.
• Windows CE Process Viewer provides information about processes,
threads, and memory on the remote device.
Module 3: Configuring and Building with Platform Builder 3
• Windows CE Heap Walker displays contents of system memory.
• Windows CE Remote Object Viewer displays information about objects
on the remote device.
Export SDK
The Export SDK tool helps you to export a custom software development
kit that can be used with the Windows CE Toolkit for Microsoft Embedded
Visual C++®.
Integrated Development Environment
Platform Builder 4.0 provides a complete IDE that includes a wizard and
toolbar that you can use to build and debug your Windows CE image.
Run-Time Libraries
Platform Builder provides support for the following run-time libraries:
Active Template Library (ATL) for Windows CE
Microsoft Foundation Class (MFC)
Visual Basic for Windows CE
Microsoft ActiveX Data Object for Windows CE (ADOCE)
Sample Code
Platform Builder provides sample code for platform-dependent applications
such as drivers and OAL. It also provides sample code for platform-
independent applications such as graphic user interface, shell components, and
various communications and networking configurations. Platform-dependent
components like drivers and OAL, which make up a BSP, can be found under
the \Wince400\Platform tree. Platform-independent components and the sample
drivers provided by Microsoft can be found under the \Wince400\Public tree,
specifically under the ..\common\oak directory.
For more information about the build tree, see Module 1, “Advanced
Building of a Windows CE Image” in Course 2535A, Developing a Board
Support Package for Microsoft Windows CE .NET and Course 2540A,
Developing Embedded Solutions for Microsoft Windows CE .NET.
Note
4 Module 3: Configuring and Building with Platform Builder
Platform Development Cycle
Configure Platform
•Create Platform
•Modify Platform
•
Bootloader
•
OAL
•
Device Drivers
•
Configuration Files
•
Applications
•
Add catalog components
•
Localize
•
Export SDK
Build
•Make Platform
Headers
•Compile
•Link
•Make Image
(NK.BIN)
Download
•Connect via
Ethernet, Parallel,
or JTAG
•Copy NK.BIN to
device
•Start Windows CE
Debug Monitor
•Debug
Iterative Process
This diagram illustrates the iterative process at the core of the platform
development cycle.
Configure the Platform
Before you create the Windows CE image, you must first configure the
platform. In Platform Builder, the term platform implies:
A set of core Windows CE modules and components provided by Microsoft.
A complete OEM Adaptation Layer (OAL).
A set of drivers for your targeted platform.
Optionally, additional components you choose to add.
Depending on which configuration you select, certain modules and components
will be included in your platform. Typically, you choose one of the given
reference configurations and then customizing it.
Customizing a platform can involve adding or removing features from the
Catalog, adding projects, adding a board support package (BSP), creating an
OEM adaptation layer (OAL), creating a boot loader, localizing the platform,
and exporting a software development kit (SDK).
You can customize a platform by adding or subtracting projects. A project is a
group of related functions that implement a particular feature of your
customized platform. You can create a project using a project wizard, and the
project is given has an associated .pbp file. The .pbp file contains source file
names and locations, and builds settings.
Build the Platform Image
After you have configured your platform, you can build a platform using the
Platform Builder integrated development environment (IDE). The Platform
Module 3: Configuring and Building with Platform Builder 5
Builder build process produces a target Windows CE image for your platform
with the components you have chosen.
The IDE and command-line environments are independent of each other.
Environment variables that you set in one environment may have a different
setting in the other environment. Do not combine IDE and command-line
methods when you build a platform.
Once you have built a platform, you can just remake the operating system
image by selecting the Make Image command in the Platform Builder IDE.
After you have built the platform, you may change the parameter files, such as
Project.bib and Platform.reg. You can access the parameter files from the
ParameterView window in the Platform Builder IDE, and then modify the files.
Then you need to build the platform again instead of just remaking the
operating system image in order to incorporate these changes into the operating
system image.
Download and Debug Image
To transfer a platform to a target device, use the Microsoft® Platform Builder
integrated development environment (IDE) to transfer an operating system
image, Nk.bin, over either an Ethernet or a parallel port connection.
Before you can transfer an operating system image to a target device, you must
configure a connection from the development workstation to the target device.
Next, you download the image to the targeted platform and run it. With the
Platform Builder debugging tools, you can debug the OAL, device drivers, or
modules.
Note
6 Module 3: Configuring and Building with Platform Builder
Configuring the Platform
The Platform Wizard
Platform Configurations
Available BSPs
Configuration Variants
Application and Media
Networking and Communications
Finish
In this section, you will learn about the process of configuring a platform using
the Platform Wizard.
Module 3: Configuring and Building with Platform Builder 7
The Platform Wizard
New Platform
Wizard:
z
Allows you to
select a base
operating system
configuration for
your platform
z
Select some initial
operating system
features
z
Select a
preconfigured BSP
z
Sets up the
environment with
files that support
the operating
system
configuration you
have selected
C B D
You can configure your platform using the New Platform Wizard. Through a
series of interactive dialog boxes, the New Platform Wizard allows you to
select a base operating system configuration for your platform, choose some
initial operating system features, and choose a preconfigured BSP. After you
have chosen your initial settings, the New Platform Wizard sets up the
environment with files that support the operating system configuration you have
selected.
The Windows CE features included in your platform depend on the operating
system configuration that you select. You can build a system with little more
than a kernel, a system with a complex graphical user interface (UI) and
preinstalled applications, or any type of system in between.
To create a new platform:
• On the File menu, click New Platform.
This opens the New Platform Wizard.
8 Module 3: Configuring and Building with Platform Builder
Available BSPs
A BSP represents the
basic OAL and drivers
set which will
communicate directly to
a specific Standard
Development
Boardhardware platform
When you create a BSP,
you specify a collection
of features that, as a
package, offer a default
level of functionality for a
platform
If you want to integrate
your BSP into the New
Platform Wizard, you
must use the BSP Wizard
C B D
Next, you must select from the list of available BSPs. A BSP represents the
basic OAL and drivers set which will communicate directly to a specific
Standard Development Boardhardware platform.
You can create your own BSP and add it to a platform. For example, you
might want to create a BSP to support a specific hardware configuration.
When you create a BSP, you specify a collection of features that, as a
package, offer a default level of functionality for a platform.
If you want to integrate your BSP into the New Platform Wizard, you must
use the BSP Wizard. The BSP Wizard also creates a Catalog feature file
(.cec) file and imports your BSP into the Catalog.
Module 3: Configuring and Building with Platform Builder 9
Platform Configurations
Select a base
configuration with the
New Platform Wizard.
You select one of the
configurations
provided with the IDE
to base your new
platform on.
A unique name is
required to identify the
platform itself and the
location of the files
associated with it.
The Platform Wizard
will create a directory
structure under the
\Wince400\Public tree
with the same name
as your platform.
C B D
When you create your platform, you must select a base configuration with the
New Platform Wizard.
You select one of the configurations provided with the IDE to base your
new platform on.
A unique name is required to identify the platform itself and the location of
the files associated with it. This name is typically representative of the name
of the product you are releasing to market.
The Platform Wizard will create a directory structure under the
\Wince400\Public tree with the same name as your platform. This is where
Platform Builder will create your Windows CE image.
The New Platform Wizard offers a variety of configurations.
These configurations implement a wide selection of possible feature sets
upon which to base your device.
Once created, you are able to add and remove standard features.
You can also add projects and resources of your own design that will be
included in the final operating system image.
There are several basic configurations included with Platform Builder. They
are listed below:
• Cell Phone or Smart Phone
• Custom Device
• Digital Imaging Device
• Industrial Automation Devices
• Internet Appliance
• PDA or Mobile Handheld
10 Module 3: Configuring and Building with Platform Builder
• Residential Gateway
• Retail Point-of-Sale Device
• Set-Top Box
• Tiny Kernel
• Web Pad
• Windows Thin Client