Operating Systems
Building Powerful Platforms with Windows CE A Book/CD-ROM Package
James Y. Wilson and Aspi Havewala
Integrate Windows CE on any custom hardware platform!
Start-to-finish system integration with the Microsoft Windows CE Embedded Toolkit (ETK) and Platform Builder.
Starts where Microsofts documentation leaves off, with the nitty-gritty information system software engineers need most.
Includes a thorough dissection of the CE kernel. The true potential of Windows CE lies in its ability to provide a robust, low-cost platform for system integration on custom, non-PC hardware- handhelds, wireless devices, TV applications, terminals, smartcards, even household appliances. Building Powerful Platforms with Windows CE goes beyond Microsofts documentation to deliver the real-world detail developers need to minimize risk, improve performance, and get to market fast. The authors begin with a detailed overview of Windows CE, its motivation, goals, architecture, design, and implementation. Next, they review the crucial, often-ignored project management issues associated with custom platform development. They introduce Microsofts Windows CE Platform builder, demonstrate how to quickly create custom builds, and demystify Microsoft CEs confusing boot loader. The book includes a full chapter on building CE Hardware Abstraction Layers, and exceptional step-by-step guidance on designing, implementing, and debugging CE device drivers. Finally, the authors take you further inside the Windows CE build process, show how to extend Platform Builder; and explain how to use Microsofts Device Driver Test Toolkit to streamline testing. Previously announced in the July 2000 catalog.
James Y. Wilson is Director of Software Engineering at Cruise Technologies, Inc., and has over ten years experience in developing Windows NT, 9X drivers and embedded system software from conception to delivery. Aspi Havewala has extensive experience in developing and debugging device drivers for Windows NT and 9x in real-time applications. He is Section Manager/Lead Engineer developing Windows CE systems for Motorolas Land Mobile Products Sector. The authors developed the first CE-based wireless Windows terminal.
0-201-61636-X
Introduction
Throughout the 1980s and 1990s, technological advances that gave rise to the Internet and wireless communications began to mount a serious challenge to the limited role of a personal computer (PC). Initially visualized as a more personalized extension for large mainframe computers, concealed in mysterious rooms with raised floors and noisy air conditioners, the personal computer soon became the center of home and office computing. Today we are witnessing the emergence of yet another type of computer: portable information appliances, offering even more personalized computing than the personal computer anchored to ones desktop. These devices are made more powerful not by ever increasing CPU speed and available storage, but by their ability to function as a distributed computer, accessing the worlds most powerful asset, information.
Digital cable and digitized music, voice, and video are some examples of this information, which is made more valuable by access through portable information appliances. Just imagine what would happen if televisions, music entertainment systems, telephones, and camcorders could all work together. New usage models would appear, effectively creating a scenario in which the functionality of these systems acting collectively would exceed their usefulness when acting individually. For example, entire movies could be shot, edited, and produced via an array of interconnected, portable information appliances that worked together to provide online distribution, without the need for physical media. When usage models such as these become reality, they will challenge traditional ways of doing business.
The technological objectives in the engineering of a portable information appliance are quite different from those of a desktop PC. Portable information appliances must be compact, lightweight, and economical, and they must provide a slew of new featuresmost importantly, connectivity with other information appliances. Established operating systems like Windows, UNIX, MacOS, and Linux, designed for desktops with ever increasing processing and storage capabilities, are often unsuitable for such appliances. A smaller, lightweight, and highly flexible operating system is required.
Microsofts solution in this space is the Windows CE operating system. Designed and implemented for devices with limited computing and storage resources, it offers a variety of features that make it possible to create highly specialized, portable information appliances. A small sample of such devices would include industrial controllers, phones, music players, televisions, game consoles, camcorders, organizers, and even compact laptops.
Using Windows CE to create a custom platform is a process that we callBuilding Powerful Platforms with Windows CE. Microsofts premier tool for building custom platforms is aptly called Windows CE Platform Builder. This book takes a focused look at the use of this tool and, in exploring its features, outlines the process by which CE is modified to support your platforms distinguishing features.
We would like to think that this book has something for everyone, and though this may be true, you will undoubtedly find it most useful if you are an engineer working to adapt CE to function on a custom platform. If you are a software engineer dedicated to writing software for a particular device, traditionally known as embedded-systems engineering, your job will be to get CE up and running as soon as possible. Our prime directive in writing this book is to accelerate this process, by giving you an understanding of CE from the perspective of an embedded-systems software engineer. If we are successful, you will be as familiar with CE as you are with your custom platform, and you will be well equipped to avoid any unexpected gotchas.
We have taken great pains to go beyond simply documenting the use of Platform Builder. We treat Platform Builder as a tool that you can use effectively only if youre equipped with an understanding of certain principles and practices. To this end we have created a set of 12 chapters that will provide you with expertise in a particular principle or practice. Chapter 1 introduces Windows CEits motivation, goals, architecture, design, and implementation. In Chapter 2 we discuss the often ignored project management aspects of creating a custom platform with Windows CE. This chapter walks the technical lead and/or project manager through the discrete steps involved in completing a CE custom platform project.
Chapter 3 introduces Windows CE Platform Builder. It describes how to use Platform Builder to quickly create a custom build of the Windows CE kernel. In Chapter 4 we demystify the more challenging aspects of creating and debugging a boot loader by analyzing the Platform Builder sample boot loader source code and the various options available for debugging boot loader code. Development of the OEM Adaptation Layer (OAL), the mechanism used by CE to access the hardware of your custom platform, is covered in Chapter 5. Chapters 6 through 9 dissect how to design, implement, and debug Windows CE device drivers.
To put it all together, Windows CE uses a complex and powerful process to build the operating system. This build process is explored in Chapters 10 and 11. In Chapter 12 we detail a little-used feature of Windows CE, the Device Driver Test Kit (DDTK), which can be used to implement automated testing and can be of significant value in the manufacturing process for your custom device.
Four different appendices are provided for additional background on topics of interest to CE developers. Appendix A lists the CE modules that help to document how the functionality of the overall operating system has been partitioned. Appendix B provides a primer on the use of the Nmake tool and the creation of the files needed to manage the build process for any software project. Appendix C provides a list of resources that are helpful in jump-starting the process of making CE operational on your custom platform. This appendix is referenced at various places throughout the book. Appendix D provides an excellent overview of the process of creating CE display drivers.
Document Conventions Upload versus Download
The terms upload and download are used throughout this book. The Microsoft documentation that accompanies the Windows CE Platform Builder (CEPB) does not distinguish between the uploading and downloading of data and uses these terms interchangeably. In this book we have opted to use both the terms upload and download to describe more accurately what is happening when data is flowing from one location to another. To minimize any confusion on this matter, we will explain how these terms are used in the context of this book.
At times the location of data may correspond to a development workstation, while at other times the device (or target platform) is the focus of your CE development efforts. Consider for a moment that we are describing the flow of data with respect to your development workstation. If data is being sent to your CE device, it is flowing away (upstream) from its source (the development workstation), so it is said to be uploading. In contrast, if data is being received from its source (the CE device), it is flowing into your development workstation (downstream), so it is said to be downloading. The key to remembering the difference is to realize that you can only upload to and download from.
Text Conventions
The following table describes the typographic conventions used throughout the book. These conventions do not apply to listings or figures.
Convention
Main Purpose(s)
Examples
Monospace font
To format all listings and to refer to a particular element (i.e., function name, variable, macro, etc.) of a listing, as well as to path and file names.
(1) Beginning of the SHx StartUp routine...
(2) .\PLATFORM\ODO\EBOOT\EBOOT\SHX
Boldface type
To refer to menu items, window names, and new terms.
(1) File New menu item
(2) New Platform window
(3) A component is a particular functionality...
Italic type
To refer to words as words, to emphasize an important point, and to identify on-screen messages.
(1) The word project in this case...
(2) It is best to follow the dictum, Do not add files you do not own.
(3) The message Copying Platform header files... is displayed...
Angle brackets: < >
To refer to the name of an item or symbol. When you see this notation in a syntax statement, substitute the item or symbol with the data it references, but do not type the angle brackets. If angle brackets appear without surrounding square brackets or braces (described below), the associated data is required.
If you see
<CE Version>\PLATFORM\<Platform Name>\KERNEL\HAL\debug.c and the name of your platform is Sherry and youre using CEPB version 3.0, you might type "WINCE30\PLATFORM\SHERRY\KERNEL\HAL\debug.c".
Square brackets:
To refer to optional arguments or parameters for commands. You may omit optional arguments and parameters in any command.
If you see
CESH p <CESH configuration saved in the registry>,
you might type
"CESH p CEPC" or "CESH".
Braces: { }
To indicate a choice of arguments or parameters for commands. If the arguments appear separated by a vertical line{ }you must select one.
If you see
.\PLATFORM\ODO\BOOTLOAD\{SHXMIPS},
you might type
".\PLATFORM\ODO\BOOTLOAD\SHX".The same page will include a link to the authors Web site, providing general references for Windows CE software development and updates to the books accompanying software.
020161636XP04062001