Register your product to gain access to bonus material or receive a coupon.
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 Microsoft's 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 Microsoft's Windows CE Platform builder, demonstrate how to quickly create custom builds, and demystify Microsoft CE's 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 Microsoft's Device Driver Test Toolkit to streamline testing.
Kick Start Your Windows CE Project
Resources for Windows CE Developers
Click below for Author's Site related to this title:
Author's Web Site
Click below for Sample Chapter related to this title:
wilsonch3.pdf
(NOTE: Each chapter concludes with a Summary.)
Preface.
Introduction to the Book.
Web References.
Acknowledgments.
About the Authors.
Cross-Processor Support.
Page Size.
Common Executable Format.
Processes and Threads.
Creating Processes and Threads.
The Scheduler.
Synchronization.
Communicating between Processes.
Memory Architecture.
Virtual Memory.
Slot Architecture.
Manipulating Memory.
Heap Memory.
Stack Memory.
Handling Low Memory Conditions with WM_HIBERNATE.
Graphics, Windowing, and Events Subsystem.
Graphical Device Interface.
Window and Dialog Management.
User Input.
Windows Messaging.
Power Management.
File System.
Object Store.
Storage Media.
Manipulating Files.
Manipulating Folders.
Manipulating Databases.
Manipulating the Registry.
Communications.
Serial.
TAPI.
RAS.
SLIP/PPP.
TCP/IP.
Winsock.
NetBIOS.
WNet.
WinInet.
Web Server.
RAPI
Orbiter: A Windows-Based Terminal.
Is Windows CE the Right Choice?
Platform Requirements.
Windows CE Licensing and Development Model.
Development Environment.
CE Toolkits.
Development Tools.
Training Your Team.
Getting Started
Identifying Prototyping Opportunities.
Architecture and Design.
Platform Task Discovery.
Public Task Discovery.
Specifying the System.
Creating a Technical Specification.
Creating a Schedule.
Creating and Allocating Tasks.
Adding Duration to Tasks.
Using Milestones to Create a Visible Schedule.
Maintaining a Live Schedule.
Task-Complete Demos.
Strategies for Version Control and Automated Builds.
Managing New Projects.
A Brand-New Product.
Feature Enhancements to an Existing Product.
A New Product with Platform-Specific Changes.
Testing.
Windows CE Device Driver Test Kit.
Benchmarking the Device.
Exploring Components in Platform Builder.
Platform Builder Catalog.
Creating a New Platform with the Platform Wizard.
Building and Executing the Platform.
Creating Applications for Your Platform.
Windows CE Project Wizard.
Building the Application.
Testing the Application during Rapid Development.
Running Windows CE on a CEPC.
Kernel Debugging.
Debugging Capabilities of CESH.
Integrating New Components into the Image.
Customizing the Build Using Environment Variables.
Extending the Platform Builder Catalog.
Component Files in Depth.
Adding a Component to the Catalog.
Creating a New Board Support Package.
BSP File Directives.
Finishing the New BSP: Appliances.
Windows CE Boot Loaders.
Designing a CE Boot Loader.
Decomposition/Analysis/Modification.
Beginning with the Sample Code.
Startup Code.
Processor Configuration Code.
Platform Configuration Code.
Initializing the Contents of RAM.
Power-On Self-Test.
Loading the CE Image.
Downloading Code.
Jumping into the CE Kernel Image.
OEM Boot Loader Functions.
Serial Port Input/Output Functions.
LED Function.
Ethernet Boot Loader Functions.
Whether or Not to Ship the Boot Loader in Production Code.
Building the Boot Loader.
Sources File.
Boot.bib.
Romimage Build Tool.
Running the Build.
Debugging the Boot Loader.
Output through LEDs and Sound.
Serial Port and Parallel Port Output.
Display Output.
ROM Monitor.
ROM Emulator Products.
On-Chip Debugging.
Logic Analyzer.
In-Circuit Emulator.
OAL Architecture.
OAL Development: Phase 1.
Sample OALs.
Building the OAL.
Kernel Startup Routine and OEMWriteDebugLED.
OEMInit.
Timer ISR.
OEMInitDebugSerial, OEMWriteDebugByte, OEMWriteDebugString, OEMReadDebugByte, and OEMClearDebugCommError.
OAL Development: Phase 2.
Ethernet Kernel Debugging Functions.
Interrupt Service Routines.
Nested Interrupts.
OEMIOControl.
OAL Development: Phase 3.
Module Certification.
Power Management.
Persistent Registry.
When to Write a CE Device Driver.
Onboard and Installable Devices Compared.
Device Driver Models.
Device Classes.
Device Driver Architecture.
Microsoft Products Required for Driver Development.
Sample Device Driver Source Code.
Stream-Interface Device Driver Model.
Device Manager and Driver Control Programs.
When to Write a Stream-Interface Driver.
Registry Entries.
Device File Names.
Load Sequence.
Power Cycling.
Required Entry Points.
Application-Initiated Loading. AHEADS = Native Device Driver Model.
Native Device Driver Model Architecture.
Required Entry Points.
Automatic Loading.
Building a Native Device Driver.
USB Device Driver Model.
USB Device Driver Model Architecture.
Automatic Loading.
Required Entry Points.
Providing Application Services.
NDIS Device Driver Model.
NDIS Device Driver Model Architecture.
Automatic Loading.
Building the Device Driver.
Building from the Command Line with the Platform Builder.
Building with the Platform Builder IDE.
Building with eMbedded Visual C++.
Device Driver Installation.
Application Manager.
Cabwiz.exe CAB Files.
Ceappmgr.exe INI Files.
User Requested.
Processing Interrupts.
The Interrupt Service Thread.
Accessing the Physical Resources of Your Device.
Platform-Independent Input/Output.
Managing Buffer Pointers.
Sharing Memory between Drivers and Applications.
Shared Memory Approaches Compared.
API Readiness.
Background.
Remote Debugging.
Local Debugging.
Log-Level, Application-Level, Kernel-Level, and Hardware-Level Debugging.
Log-Level Debugging.
Application-Level Debugging.
Kernel-Level Debugging.
Hardware-Level Debugging.
Driver (DLL) Debugging.
Breakpoint and Single-Stepping Issues.
Debugger Transports.
Platform Builder Remote Connections.
Platform Manager.
Building a Device Driver for Debugging: Method 1.
Step 1: Selecting Modules from the Catalog Window.
Step 2: Modifying Platform.bib.
Step 3: Modifying Platform.reg.
Step 4: Setting Up a Stub Project.
Building a Device Driver for Debugging: Method 2.
Step 1: Removing Modules from the Catalog Window.
Step 2: Creating a Driver Project.
Step 3: Adding the Driver Source Modules to the Project.
Step 4: Modifying the DLL Entry.
Step 5: Modifying Platform.bib.
Step 6: Modifying Platform.reg.
Debugging Use Cases.
Custom Platform Serial/Parallel Port Debugging Configuration: Use Case 2.
Alternative Configurations.
Standard Platform Serial Port Debugging Configuration: Use Case 3.
Tracking Processes and Threads.
Zone Debugging.
Log Tracer.
Components and Modules Revisited.
The Directory Structure of Platform Builder.
Setting Up the Build Process.
How Wince.bat Works.
Building a Project.
Generating the Windows CE System: Sysgen.bat.
Windows CE Initialization Files.
The CE Component Filter.
How Sysgen.bat Works.
Building OEM Source Code: Build.exe.
Building the Release: Buildrel.bat.
Making the Windows CE Image: Makeimg.exe.
Windows CE Localization.
Merging Initialization Files.
Creating the Final Image.
Brewster: A Coffee Maker for the Millennium.
The Brewster Makefile.
Specifying System Modules and Components.
Modifying the Initialization Files.
Adding Source Code to Brewster.
DDTK Tools.
Tux Test Harness.
Test Scripts.
Test Discovery.
Passing Information to the Test Harness.
Housekeeping Messages.
The Test Function.
Executing a Test.
Running the Test in Multiple Threads.
Running Tests from Tux.
Suite Files.
Logging Tux Test Results.
Creating a Kato Object.
Starting a Level.
Sending Traces for Logging.
Filtering Logs with Verbosity.
Ending a Level.
The Tux Demo Program.
Defining Targets.
Macros
Makefile Preprocessing.
Command-Line Options.
Usenet Newsgroups.
Publications.
Web Sites.
Mailing Lists.
Windows CE System Integrators.
Third-Party Tools.
CEPC Vendors.
CE Reference Platform Vendors.
ROM Emulation Tools.
Silicon Vendors.
PCMCIA Documentation Sources.
Fundamentals of Graphics and Display Hardware.
Display Driver Overview.
Graphics Primitive Engine Classes.
Improving the Display Driver Classes.
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.
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.
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... |
Boldface type | To refer to menu items, window names, and new terms. | (1) File | New menu item |
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... |
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 |
Square brackets: | To refer to optional arguments or parameters for commands. You may omit optional arguments and parameters in any command. | If you see |
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 |
The Addison-Wesley Web site at http://www.aw.com/cseng will provide an updated list of any scheduled appearances by this books authors, along with scheduled trade shows for Addison-Wesley and references to book reviews for this book as they become available. The Addison-Wesley Web site specifically dedicated to this book, at http://www.aw.com/cseng/titl es/0-201-61636-X, will provide additional information on this books content and an errata section for errors discovered after publication. 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.