Windows CE 2.1 Technical Articles  

Building the Componentized Operating System in Microsoft Windows CE 2.1

This is retired content. This content is outdated and is no longer being maintained. It is provided as a courtesy for individuals who are still using these technologies. This content may contain URLs that were valid when originally published, but now link to sites or pages that no longer exist.

Microsoft Corporation

April 2000

Summary:This document describes how Microsoft Windows CE allows you to design embedded system platforms that use the minimum set of operating system components required to meet your design goals. (6 printed pages)


EtherNet Tools


Componentization of Windows CE gives system designers the means to design embedded system platforms using the minimum set of operating system components required to meet the design goals. For example, it is possible to build a Windows CE embedded operating system that contains the kernel and a selected set of communications features, but does not provide a graphical user interface.

The Platform Builder is designed to allow you, the embedded system designer to select only those operating system modules and components appropriate for your embedded application. The following diagram shows the major components of a Windows CE-based embedded system and the development responsibility for each.

Figure 1.

The first responsibility of the embedded systems developer is to create the OEM Adaptation Layer (OAL) and boot loader. The OAL includes the following interfaces:

  • Interrupt service routine (ISR) handlers to support device drivers
  • Real-time clock (RTC)
  • Interval timer (used for the scheduler operation)

    The boot loader is responsible for downloading the binary image from the target platform and supporting monitoring and debugging of the running embedded system. Platform Builder provides examples, in source code, of OALs and boot loaders for the supported processors.

    Device drivers are the next order of priority. The Platform Builder provides a set of example drivers for each platform. Device Driver architecture and implementation is discussed below. The Platform Builder provides a set of tools for configuring the Windows CE modules that will integrate with the developed OAL and device drivers. The Cesysgen utility allows you to choose modules and components of the Windows CE operating system to combine, build and install on your target hardware. Detailed documentation provided with the Platform Builder explains how to create and use batch files to build a customized operating system for your application and target devices. Platform Builder provides several examples of Windows CE Operating Systems to boot strap the embedded systems developer. After you have built the operating system, it is a simple matter to create a ROMable binary image of the operating system using the tools provided.

    The following list describes some of the tools provided with the Platform Builder that assist in operating system configuration and builds. Some of these tools you will use directly, while others are supporting tools that are encapsulated in batch files or invoked by other tools:

    Tool Description
    Build Tool (Build.exe) Creates executable files for your target platform.
    Build Release Directory Tool (Buildrel.bat) Copies all of the modules and files required to build an image into a common directory.
    Component Filter Tool (Cefilter.exe) Used to filter source files for componentization
    Cesysgen Tool (Cesysgen.bat) Specifies module and component information used when creating a custom version of Windows CE.
    LoadCEPC Tool (Loadcepc.exe) Loads an operating system image onto a PC-based hardware reference platform. Additionally used to copy files to the target.
    Make Binary Image Tool (Makeimg.exe) Creates a Windows CE image.
    Memory Usage Tool (Memtool.exe) Displays information on kernel memory usage.
    CE Debug Shell Tool (CEsh.exe) Downloads binary files to a target hardware reference platform and provides remote file system capability over either the parallel or Ethernet ports.

    EtherNet Tools

    Tool Description
    Resource Update Tool (Res2exe.exe and Res2res.exe) Adds resource binaries to an .EXE file.
    ROM Image Builder Description (Romimage.exe) Used to create a binary image for ROM.
    Set Drive Tool (Setdrive.exe) Creates a file (Setdrv.bat) used to set environment information. Setdrive is called internally by Wince.bat.
    Cesysgen Tool (Cesysgen.bat) Specifies module and component information used when creating a custom version of Windows CE.
    Set Environment Variable Tool (Setenv.bat) Batch file used to set customized developer environment information.
    Sysgen Tool (Sysgen.bat) Creates the target system directories, as required, builds or links the Windows CE components, and copies them to the local target areas.
    Windows CE Build Environment Tool (Wince.bat) Sets up the build environment.

    Multiple Target Hardware Development Platforms

    Windows CE Platform Builder 2.11 supports—and is supported by—a growing number of target hardware development platforms based on the most popular 32-bit microprocessors. These hardware development platforms are available from CPU vendors, Microsoft System Integrators and other third-party sources. In most cases, off-the-shelf hardware development platforms are offered pre-configured with Windows CE. Microsoft System Integrators are also able to supply any other required hardware and software, including the Platform Builder. Some System Integrators also offer training and design consulting services, further increasing your design options.

    Third-party Technology Partners

    The Windows CE Technology Partner program is designed to ensure that a rich set of third party resources and expertise is available to help Microsoft System Integrators bring hardware and software products based on Windows CE to market faster. Existing Technology Partners include 3SOFT GmbH, AMD, Accelent Systems Inc., Advanced RISC Machines, Algorithmics, American Megatrends, Inc., Analysts International Corporation, Annasoft Systems, Applied Microsystems Corporation, ATOS Group (Italian Branch), Auctor Corporation, Award Software, BlueWater Systems, BSQUARE, Cruise Technologies, Digital, ERIM, Eclipse International, Inc., EnCompass Globalization Inc., Epson Research and Development, Inc., Ezos, Goman LTD, Hectronic AB, Hitachi, IBM, IDT, Integrated Technology Express, Inc. (ITE), Intel, Intelligraphics, Intrinsyc Software, Inc., LiPPERT Automationstechnik, GmbH, MTE Software, Inc., Mainbrace Corporation, MAZeT GmbH, Mentor Graphics', Microtec Division, Mettler & Fuchs AG, Microtronica Nordic, MIPS Group, Motorola, NMI Electronics Limited, NetReal Solutions, Omni Ray AG Dübendorf, Padova Ricerche, Philips Semiconductors, Phoenix Technologies, Photo Access, QED, Inc., Quantum Micro Systems, Questra Consulting, Rachis Corporation, RadiSys Corporation, Rose Technologies, Siemens AG, Smartcode Software, SofTechnics, Softex, Inc., Special Computing Co., Spyglass, Stellcom Technologies, TaoSoft, Inc., T2 data, Tecsi, Vadem, Inc., VenturCom, Inc., WESTTEK, WireSpeed Communications.

    Targeting a PC-based Hardware Development Platform

    As an alternative to a hardware development platform specifically designed for embedded system development, you can use an x86-based PC as a target hardware platform for prototyping, evaluation and low-cost product development. The Getting Started Guide included with the Platform Builder describes in detail how to set up a PC-based Hardware Development Platform for Windows CE as a target development platform, and also describes the procedures necessary to transfer and load an operating system image to that target platform. Simple instructions for setting up a PC-based Hardware Development Platform are also included in this document.

    Win32 Enhances Development

    One of the primary reasons that the Platform Builder is such a productive embedded development environment is its support for the Microsoft Win32 application programming interface (API). The Win32 API provides a consistent, well-documented and robust programming interface to the Windows CE operating system. In addition to the Win32 API, there are also Windows CE versions of the Microsoft Foundation Classes (MFC) and Active Template Library (ATL) that provide easy access to Windows CE and Win32 functionality.

    Windows CE is built around the Win32 API, which is the basis for other 32-bit Windows operating systems (including Microsoft Windows NT and Windows 95/98). This means that there are vastly more third-party programming resources (tools, software examples and documentation) available to embedded software programmers, and many thousands of experienced programmers who already know how to program for the Windows CE platform. The combination of Win32 and Windows CE offer the embedded community an unprecedented opportunity for vast development support.


    Windows CE Platform Builder 2.11 provides a robust set of C, C++, ATL and MFC sample applications that make it easy to understand Windows CE programming techniques. Several sample operating system configurations are provided, complete with sample device drivers and applications. The on-line Getting Started Guide also helps you get up and running quickly using a PC-based Hardware Development Platform and one of these sample configurations. Example Configuration Binaries are included to allow for platform testing before the embedded developer has developed a single module.

    Complete Documentation

    The complete set of Windows CE development documentation is provided online via Developer Studio InfoViewer. Windows CE Platform Builder 2.11 includes the complete Windows CE Software Development Kit (SDK) and Device Driver Kit (DDK) documentation as well as CPU documentation sets for Windows CE supported CPUs, a Getting Started Guide and extensive tutorial and reference information. The Platform Builder Integrated Development Environment (IDE) gives you direct and immediate access to the entire Windows CE documentation package, as well as access to the Microsoft Developer Network (MSDN) library and standard Win32 and Visual C++ documentation.

    Device Driver Development

    Device driver development is an area of great concern to many embedded software developers. Although embedded systems typically support a smaller total number of devices than do general-purpose computers, they can pose unique and challenging device interface problems. When developing a new embedded hardware platform and its supporting I/O devices, you will be making many device-related decisions and tradeoffs. For example, unless you are exclusively using common off-the-shelf hardware, you will almost certainly need to write one or more custom device drivers to support your system. You may also need to configure Windows CE to include the necessary device handling components, and to customize the OEM abstraction layer (OAL) of Windows CE for your hardware.

    Windows CE offers four device driver models:

    • Native Drivers: Drivers that are linked with Windows CE and form part of the binary image.
    • Stream Interface Drivers: Drivers that are loaded by the Device Manager as standalone DLLs. All stream drivers have a common interface.
    • Native Driver Interface Specification (NDIS) Drivers: Network Drivers based on the Network Driver Interface Specification (NDIS) model used by Windows NT. Windows CE supports Miniport drivers only.
    • Universal Serial Bus (USB) Drivers: The universal serial bus (USB) is an external bus architecture for connecting USB-capable peripheral devices to a host computer.

      To simplify device driver development for Windows CE, the Platform Builder provides access to device-related Win32 APIs that are very similar (in most cases identical) to the equivalent APIs found other Win32 platforms. Windows CE provides low-level functions abstract drivers for I/O-mapped and memory-mapped platforms. In addition, device driver sample code and tips for writing device drivers are included with the Platform Builder. Sample drivers include audio, battery, display, keyboard, notification LED, PCMCIA, serial, USB, Fast IR, and touch panel devices. These samples and other resources allow you to quickly create and debug low-level device drivers and interrupt service routines to meet the needs of your embedded system.

      Evaluating the Platform Builder for Yourself

      Reading about the benefits of Windows CE and Windows CE Platform Builder is one thing, but actually trying it out for yourself is the best way to understand the power of the operating system and supporting tools. This section will step you through the process of installing and using the Platform Builder. As a part of this, we'll demonstrate you how can make use of an auxiliary PC to set up a prototype PC-based Hardware Development Platform, and we'll demonstrate some of the basic features of Windows CE Platform Builder 2.11 development environment.