Building Powerful Platforms with Windows CE

(NOTE: Each chapter concludes with a Summary.) Preface. Introduction to the Book. Web References. Acknowledgments. About the Authors. 1. Windows CE Architecture. 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 2. Road Map to Managing a Windows CE Project. 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. 3. Platform Builder Basics. 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. 4. The Windows CE Boot Loader. 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. 5. OAL Development. 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. 6. Writing Device Drivers: Introductory Concepts. 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. 7. Writing Device Drivers: Driver Models. 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. 8. Writing Device Drivers: Implementation Practices. 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. 9. Debugging Device Drivers. 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. 10. The Windows CE Build Process. 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. 11. Building a Sample Windows CE Project. Brewster: A Coffee Maker for the Millennium. The Brewster Makefile. Specifying System Modules and Components. Modifying the Initialization Files. Adding Source Code to Brewster. 12. Device Driver Test Kit. 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. Appendix A: Windows CE Modules and Components. Appendix B: A Makefile Primer. Defining Targets. Macros Makefile Preprocessing. Command-Line Options. Appendix C: CE Developer Resources. 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. Appendix D: An Introduction to Writing Windows CE Display Drivers by Jeff Spurgat. Fundamentals of Graphics and Display Hardware. Display Driver Overview. Graphics Primitive Engine Classes. Improving the Display Driver Classes. Bibliography. Index.