Export (0) Print
Expand All

Developing an Embedded Run-Time Image from Start to Finish

 

Microsoft Corporation

September 2001

Summary: Developing Microsoft Windows XP Embedded applications need not require a large investment of resources. Using the Windows XP Embedded tools makes constructing an embedded system easy and inexpensive. This paper describes the procedures that the Windows XP Embedded tools use to produce an embedded system. (11 printed pages)

Contents

Introduction
Hardware Requirements
What is a Target Device?
What is a Development System?
Windows Embedded Tools
Component Dependencies
Building a Run-Time Image
Summary
For More Information

Introduction

Microsoft® Windows® XP Embedded consists of the complete Windows XP operating system (OS), split into every component that comprises the entire OS. With Windows XP Embedded, you can develop a custom embedded application and run-time OS image that perfectly suits the needs of your application environment.

For example, you may be developing an application that operates as a kiosk, serving a specific purpose. Your kiosk application may require a touch screen, serial port, CD-ROM, and modem, but may not require networking, Internet access, or special power options. For this example application, you could use the tools provided in Windows XP Embedded to configure your custom application—the kiosk—and add only the required Windows XP components to support your application.

Hardware Requirements

Before you begin developing an application, consider the minimum requirements for your target application. You must also consider the minimum requirements for the computer that you will use as the development system.

What is a Target Device?

Target devices execute specific applications. The following applications use Windows Embedded as their run-time OS:

  • Industrial automation
    • Factory floor applications for repetitive mechanical tasks, such as lathing, drilling, planing, routing, cutting, and welding
    • Process tracking and accounting for manufacturing operations
    • Textile manufacturing
  • Multimedia
    • Gaming devices
    • Television set-top boxes
    • Video-on-demand servers
  • Office automation
    • Network connectivity devices
    • Internet access devices
    • Thin client devices
  • Retail
    • Point-of-sale devices
    • Inventory assistance devices
  • Server appliances
    • Network Attached Storage
    • Broadband streaming servers
  • Telecommunications
    • Routers
    • Gateways
    • Signal processors

Target Device Requirements

First consider the application that you are developing to decide on specific requirements for the target device. The main requirement for the Windows Embedded run-time image is that it must have an Intel x86, or fully compatible, processor.

If you want to use the Target Analyzer tool to determine the basic hardware configuration, the target device must be able to boot MS-DOS from a disk or be running Windows 2000.

What Is a Development System?

You use a development system to assemble and build the run-time image for the target device. The development system is either a true client or a client and server.

  • Client
    As a client, the development system contains the Target Designer, Component Designer and Component Database Manager tools. It connects to a component database and repositories located on the server, usually a different computer.
  • Server
    As a server, the development system contains the component database and repositories. It can also act as a client and contain Target Designer, Component Designer, and Component Database Manager.

Development System Requirements

  • Client requirements
    • Pentium III, or equivalent, 256 megahertz (MHz) processor
    • 256 megabytes (MB) of memory
    • Approximately 2 gigabytes (GB) disk that will contain tools and images
  • Server requirements
    • Pentium III, or equivalent, 256 MHz processor
    • 256 MB of memory
    • Approximately 10 GB disk that will contain the component database and repositories

Windows Embedded Tools

The following tools are included with Windows Embedded:

  • Target Designer provides a development environment that you use to create a bootable run-time image for a target device.
  • Component Designer is the development tool that enables you to define an application or device in a graphic development environment and save it to a disk.
  • Component Database Manager provides management functions for the component database and the repositories, which are used by both Component Designer and Target Designer tools.
  • The Target Analyzer probe utility to determine the specific details about the target device, and the Target Analyzer Importer to create a corresponding configuration that can be built into a run-time image by Target Designer.

Component Dependencies

A component can be a driver, service, or a complete application. Most components describe OS capability, such as services and device drivers. Many components depend upon other components to operate correctly. With Windows XP Embedded, this functional relationship between two or more components is expressed as a dependency. Dependencies ensure that the services a component requires are available when you build a run-time image, and that the image is constructed in the correct order. When you define a custom component using Component Designer, you must enter dependencies for the component.

For example, a serial port may depend on the presence of a serial driver. For another example, a null VGA driver component may depend on the absence of a touch screen driver component.

Also, some components depend on the order they are built into the run-time image. For example, a TCP/IP driver may require a network interface card (NIC) driver to be installed before the TCP/IP driver.

Other component dependencies include requirements for extra files or registry key values.

Building a Run-Time Image

To build a run-time image, complete the following major steps, which are described in detail later in this paper:

  1. Develop your embedded application.
  2. Analyze the capabilities of the target computer system.
  3. Create a basic configuration of components for the target computer system.
  4. Add your application to the configuration.
  5. Check dependencies within the configuration.
  6. Build the configuration into a run-time image.
  7. Prepare the target computer.
  8. Deploy the run-time image to the target computer.
  9. Test and debug the run-time image on the target computer.
  10. Release the run-time image.

Developing your Embedded Application

Microsoft Visual Studio® provides an excellent development environment for your embedded application. However, you can use any development tool that produces Windows XP-compatible x86 executables and libraries.

Since Windows Embedded allows you to build a run-time image containing only the components that are necessary for your application, you should begin the development cycle by considering the requirements of your particular application. You should provide answers for the following questions to help determine which components suit your needs:

  • Is the application for a headless computer?
  • Does the application have special communication or network requirements?
  • Does the application require a touch screen?
  • Does the application require a mouse or keyboard?
  • Does the application require a CD-ROM?

You may have other considerations that are unique to your embedded application.

Next, write the code, compile, and debug your application. Your application should be running in your development environment.

Analyzing the Target Computer

Use the Target Analyzer probe tool to create a list of all hardware devices installed on the target computer. You can choose from either of the Target Analyzer tools, Ta.exe or Tap.exe. Ta.exe requires you to boot the target computer using the Microsoft MS-DOS® mode of Microsoft Windows 98 or Microsoft Windows 95. Tap.exe is a protected Microsoft Win32®-based application that runs in any Windows 32-bit OS that supports Plug and Play.

After you have booted the target computer, run either Target Analyzer probe program, based on your needs. The Target Analyzer probe creates an Extensible Markup Language (XML) file that contains the Plug and Play identifiers for each device installed in the target computer. The default name for the device list XML file is Devlist.pmq. Copy the device list to your development system.

Creating a Basic Configuration

You can create a configuration using one of the following two methods:

  • Target Designer import function.
  • Component Designer import function.

To import the device list

  1. Open Target Designer. The device list is imported as a configuration into the Configuration editor.

    —or—

    Open Component Designer. The device list is imported into the Component browser as a macro component, which is a single component that contains dependencies on all other components in the device list.

  2. From the File menu, choose Import.
  3. In the Import dialog box, type the name of the device list, or choose Browse to search for the file.
  4. Choose Import.

Adding Your Application

Next, you must add your application to a repository, the component database, and a configuration. Use the following steps to add your application:

  1. Using Component Designer, create a component definition, or copy and change a component definition.

    —or—

    You can import a file, for example, an .inf or .kdf file, into an incomplete object definition, and then complete the definition.

  2. Enter the component properties, including the component name, version, revision, and platform on which to base the component.
  3. Create a repository, and then enter the resources and dependencies for the component.
  4. Save your component definition to a location on your development system.
  5. Using Component Database Manager, import the component to the component database.
  6. Using Target Designer, create a configuration as described earlier, and select the platform on which you based your component. The Component browser displays all components available for the platform you select.
  7. In the Component browser, locate the component, and then instantiate your component in the configuration by copying the component instance from the component browser to the configuration editor.

    The component is displayed as ComponentName [Version<text string>, R<number>].

Checking Dependencies

A dependency is a functional relationship between two or more components. Before building your configuration into a run-time image, you should run a dependency check to ensure that all the component dependencies have been resolved.

To check your dependencies, choose the Configuration menu, and then choose Check Dependencies.

If the dependency check encounters components with unresolved dependencies, a task describing the requirement is automatically added to the Task List for each unresolved dependency.

If tasks have been added to the Task List, you can locate a resolution by opening a task. The task filters the database to show only the component or components that can resolve the task. You simply use the drag-and-drop method to move the component from the Component browser to the configuration.

For example, the following task may appear in the Task List:

COM Base [Version 1.0, R1] is dependent upon at least one of component 'RPCSS [Version 1.0, R4]'

For this example, you would open the task. The task becomes a filter that searches the database for all components that contain the name RPCSS [Version 1.0, R4]. The Component browser then displays only the component RPCSS.

Continue resolving tasks, closing each task as it is resolved. When all tasks have been resolved, consider running the dependency check again, since a new component added as a resolution may have other dependencies. Ensure that all dependencies are resolved.

Building the Run-Time Image

The build process uses the information in a configuration to construct a complete run-time image.

To build the run-time image

  1. From the Configuration menu, choose Build Target Image.
  2. In the Build type box, select either Release or Debug.
    Note   Select Release even during development and when you are debugging an application. Select Debug if you are performing a low-level OS debug, such as debugging a device driver.
  3. In the Destination box, type the full path name of the directory where you want to store the new run-time image.
  4. In the Log file box, type the full path name of the directory and file name for the log file.
  5. Choose Build.

If you have not performed a dependency check on the configuration, Target Designer prompts you to do so. If there are unresolved Target Designer-defined tasks in the Task List, Target Designer prompts you to confirm the build. If the target directory is not empty, Target Designer prompts you to confirm the deletion of the directory.

Preparing the Target Computer

The Bootprep.exe program prepares your media for booting a Windows embedded system. The media must have an active partition that has been formatted and made bootable with file allocation table (FAT)16, BIGDOS FAT16, or FAT32. The Bootprep utility replaces the partition boot sector code that would normally boot into MS-DOS by loading Io.sys and Msdos.sys with the code that loads the Windows NT® loader, called NTLDR instead.

Note   NTFS file systems are not supported by this utility. If you wish to use NTFS, you have to create your initial file system using one of the FAT file systems and then use the Convert.exe program provided with Windows XP to convert your file system to NTFS.

Deploying the Run-Time Image

After you build your run-time image, you are ready to deploy it from your development system to your embedded device. This topic focuses on deploying or transferring your image.

You can transfer the image using traditional methods such as disk, bootable CD-ROM, or bootable digital video disc (DVD). You can also swap a storage device such as a hard disk drive or nonvolatile or persistent storage module, such as ROM or flash disk. You can also transfer the image electronically over a communications line. The development tools might compress the run-time image to fit it onto media or reduce transport time.

You can use the deployment tools to transfer, install, and configure the run-time image into your target device.

Your target device must have sufficient storage available to receive, deploy, and run the image. This storage may need to be initialized prior to receiving the image, which is done by a setup program that you create.

Testing and Debugging the Run-Time Image

After deploying the run-time image to your target computer, you should perform final testing and debugging. If you find any problems with your run-time image, debugging should reveal the exact location of the problem. If you need to replace, add, or remove one or more components, you must use the configuration that you used to build the run-time image.

Releasing the Run-Time Image

Microsoft has a network of worldwide distributors responsible for licensing our OS, which is also your run-time image, for use in embedded systems. These distributors have been chosen to offer Windows Embedded products because of their unique strengths in the industry. Microsoft is working with each of them to create unique offerings tailored to the needs of the embedded developer community.

Summary

Windows XP Embedded is a complete, full-featured, embedded operating system for computer architecture-based solutions demanding the broadest range of applications and services. Using the Windows Embedded tools, you can create embedded applications that run with the reliability and performance of Windows XP, custom-made for your application.

For More Information

For the latest information about Windows XP Embedded, see this Microsoft Web site.

Show:
© 2014 Microsoft