You are previewing Professional Windows® Embedded CE 6.0.
O'Reilly logo
Professional Windows® Embedded CE 6.0

Book Description

Windows Embedded CE is a Microsoft operating system that addresses the needs of handheld, mobile, and embedded devices. This timely book will help you become familiar with the Windows Embedded CE environment quickly and efficiently. You'll explore how different pieces of Windows Embedded CE come together to develop and build various devices and discover what makes Windows Embedded CE the best embedded development environment from the cost, risks, and time-to-market perspectives.

Table of Contents

  1. Copyright
  2. About the Author
  3. About the Technical Editors
  4. Credits
  5. Acknowledgments
  6. Introduction
    1. Whom This Book Is For
    2. What This Book Covers
    3. How This Book Is Structured
        1. Chapter 1: Windows Embedded CE
        2. Chapter 2: Development Environment and Tools
        3. Chapter 3: Board Support Package
        4. Chapter 4: Building a Customized CE 6.0 Runtime Image
        5. Chapter 5: Connecting to Target Device
        6. Chapter 6: Debugging and Debugging Tools
        7. Chapter 7: Boot Loader Overview
        8. Chapter 8: The Registry
        9. Chapter 9: Testing with CETK
        10. Chapter 10: Application Development
        11. Chapter 11: Visual C# 2005 Applications
        12. Chapter 12: VB 2005 Applications
        13. Chapter 13: Native-Code Applications
        14. Chapter 14: Autolaunch Applications
        15. Chapter 15: Customizing the UI
        16. Chapter 16: Thin-Client Applications
        17. Chapter 17: Home Automation Applications
        18. Chapter 18: RFID Security Access Control Applications
        19. Chapter 19: Robotic Applications
        20. Chapter 20: Deploying a CE 6.0 Device
        21. Appendix A: Windows Embedded CE References
        22. Appendix B: Installation and Software
        23. Appendix C: Sample Applications and OS Design Projects
    4. What You Need to Use This Book
    5. Conventions
    6. Source Code
    7. Errata
    8. p2p.wrox.com
  7. 1. Windows Embedded CE
    1. 1.1. What Is Embedded?
      1. 1.1.1. Embedded Devices
      2. 1.1.2. Embedded Software
        1. 1.1.2.1. Application for Desktop Computer
        2. 1.1.2.2. Application for Embedded Device
      3. 1.1.3. Embedded Devices and Software
    2. 1.2. The Windows Embedded Family
    3. 1.3. Windows XP Embedded
    4. 1.4. Windows Embedded Point of Service
    5. 1.5. Windows Embedded CE 6.0
      1. 1.5.1. Modular and Compact OS
      2. 1.5.2. Real-Time Operating System
      3. 1.5.3. Supported Hardware
      4. 1.5.4. New Features in CE 6.0 R2
      5. 1.5.5. Customizable UI
      6. 1.5.6. Wired and Wireless Connectivity
      7. 1.5.7. Graphics and Multimedia
      8. 1.5.8. Multilanguage, International Localization
      9. 1.5.9. Real-Time Communication and VoIP
      10. 1.5.10. OS Design Templates
    6. 1.6. Developing CE Applications
    7. 1.7. Testing and Debugging
    8. 1.8. What Can Windows Embedded CE Do?
    9. 1.9. Summary
  8. 2. Development Environment and Tools
    1. 2.1. Windows Embedded CE Platform Builder
    2. 2.2. Windows Embedded CE 6.0 Installation
      1. 2.2.1. Supported Processors
      2. 2.2.2. Installation Sequence
      3. 2.2.3. Quick Fix Engineering and Update
      4. 2.2.4. Windows Embedded CE Terminology
        1. 2.2.4.1. Board Support Package (BSP)
        2. 2.2.4.2. Catalog
        3. 2.2.4.3. Component
        4. 2.2.4.4. Design Template
        5. 2.2.4.5. Hardware Platform
        6. 2.2.4.6. Module
        7. 2.2.4.7. OEM Adaptation Layer (OAL)
        8. 2.2.4.8. OS Design
        9. 2.2.4.9. OS Runtime Image
        10. 2.2.4.10. Target Device
      5. 2.2.5. Windows Embedded CE Environment Variables
        1. 2.2.5.1. BSP Environment Variables
        2. 2.2.5.2. BSP_NO Environment Variables
        3. 2.2.5.3. IMG Environment Variables
        4. 2.2.5.4. PRJ Environment Variables
        5. 2.2.5.5. Miscellaneous Environment Variables
      6. 2.2.6. Windows Embedded CE Files and Directories
        1. 2.2.6.1. The Platform Directory
        2. 2.2.6.2. The Public Directory
      7. 2.2.7. Third-Party Components
    3. 2.3. Building CE Runtime Images
    4. 2.4. Summary
  9. 3. Board Support Package
    1. 3.1. BSP Overview
    2. 3.2. BSP Development
      1. 3.2.1. Cloning the Device Emulator BSP
      2. 3.2.2. Cloning the CEPC BSP
        1. 3.2.2.1. Remove Components from BSP
        2. 3.2.2.2. Add Component to BSP
        3. 3.2.2.3. Clone Public Code to BSP
      3. 3.2.3. Cloning the ICOP_eBox4300_60E BSP
      4. 3.2.4. BSP Components, Files, and Folders
      5. 3.2.5. Adding Files and Modules to the BSP
        1. 3.2.5.1. Replacing the Desktop Background Graphic
        2. 3.2.5.2. Adding Files to the BSP
    3. 3.3. Summary
  10. 4. Building a Customized CE 6.0 Runtime Image
    1. 4.1. Creating the Initial OS Design
      1. 4.1.1. The OS Design Wizard
        1. 4.1.1.1. Select Networking Communications Components
        2. 4.1.1.2. Security Warning
      2. 4.1.2. OS Design Project Folders and Files
      3. 4.1.3. OS Design Project View from VS2005 IDE
        1. 4.1.3.1. Review OS Design Catalog Items
        2. 4.1.3.2. Searching for Catalog Items
          1. 4.1.3.2.1. Remote Display Application
          2. 4.1.3.2.2. Adding Catalog Items to the OS Design
        3. 4.1.3.3. OS Design Build Options
        4. 4.1.3.4. OS Design: Environment Variables
      4. 4.1.4. Generating the OS Runtime Image
      5. 4.1.5. OS Runtime Image for MyCEPCBSP
      6. 4.1.6. OS Runtime Image for MyeBox4300BSP
    2. 4.2. Summary
  11. 5. Connecting to Target Device
    1. 5.1. Target Device Connectivity
    2. 5.2. Connecting to Emulator
      1. 5.2.1. Creating the MyEmulator Target Device Profile
      2. 5.2.2. Configuring the MyEmulator Target Device Settings
      3. 5.2.3. Downloading Runtime Image to the Emulator
    3. 5.3. Connecting to eBox-4300-MSJK
      1. 5.3.1. Connecting to eBox-4300-MSJK with DHCP
        1. 5.3.1.1. Creating the MyeBox4300 Target Device Profile
        2. 5.3.1.2. Configuring the MyeBox4300 Target Device Settings
        3. 5.3.1.3. Downloading the Runtime Image to eBox-4300-MSJK
      2. 5.3.2. Connecting to eBox-4300-MSJK with Static IP
        1. 5.3.2.1. Configuring Static IP Address for eBox-4300-MSJK
        2. 5.3.2.2. Configuring a Static IP Address for the Development Workstation
        3. 5.3.2.3. Creating the MyeBox4300 Target Device Profile
        4. 5.3.2.4. Configuring the MyeBox4300 Target Device Settings
        5. 5.3.2.5. Downloading the Runtime Image to eBox-4300-MSJK
    4. 5.4. Connecting to the CEPC
      1. 5.4.1. Creating the CEPC Boot Floppy Disk
      2. 5.4.2. Connecting to CEPC with the Serial Port
        1. 5.4.2.1. Creating MyCEPCSerial Target Device Profile
        2. 5.4.2.2. Configuring MyCEPCSerial Target Device Settings
        3. 5.4.2.3. Downloading Runtime Image to CEPC
      3. 5.4.3. Connecting to CEPC with Ethernet
    5. 5.5. Summary
  12. 6. Debugging and Debugging Tools
    1. 6.1. Debugging Environment
      1. 6.1.1. CETK
      2. 6.1.2. CoreCon
      3. 6.1.3. Debugging and Release Configuration
    2. 6.2. Debugging the OS Design Build
      1. 6.2.1. The CE Build Process
      2. 6.2.2. Build Error — Missing File
    3. 6.3. Remote Tools
      1. 6.3.1. Remote File Viewer
      2. 6.3.2. Remote Heap Walker
      3. 6.3.3. Remote Zoom-In
      4. 6.3.4. Remote Process Viewer
      5. 6.3.5. Remote Registry Editor
      6. 6.3.6. Remote System Information
      7. 6.3.7. Remote Performance Monitor
      8. 6.3.8. Remote Spy
      9. 6.3.9. Remote Kernel Tracker
      10. 6.3.10. Remote Call Profiler
    4. 6.4. Remote Target Control
    5. 6.5. Serial Debug
    6. 6.6. Summary
  13. 7. Boot Loader Overview
    1. 7.1. What Is a Boot Loader?
      1. 7.1.1. BIOS Loader–x86 BIOS Loader
      2. 7.1.2. Eboot Loader
      3. 7.1.3. Loadcepc
      4. 7.1.4. Romboot Loader
      5. 7.1.5. Sboot Loader
    2. 7.2. BIOS Loader for x86 Devices
      1. 7.2.1. x86 Device Boot Process
      2. 7.2.2. BIOS Loader Code
      3. 7.2.3. Building the BIOS Loader Code
        1. 7.2.4. BIOS Loader Code Cleanup
        2. 7.2.4.1. Generating the BIOS Loader Binary
        3. 7.2.4.2. How to Use the BIOS Loader Binary
    3. 7.3. Summary
  14. 8. The Registry
    1. 8.1. Windows Embedded CE Registry
    2. 8.2. RAM-Based Registry
    3. 8.3. Hive-Based Registry
      1. 8.3.1. Hive-Based Registry Triggers Two Boot Phases
      2. 8.3.2. Persistent Registry with Hive-Based Registry
      3. 8.3.3. Registry Flushing
    4. 8.4. Windows Embedded CE Registry Files
      1. 8.4.1. Registry for Windows Embedded CE Components
        1. 8.4.1.1. Registry Entries for the FTP Server
        2. 8.4.1.2. Serial Port Registry Entries
      2. 8.4.2. Serial Debugging
    5. 8.5. Useful Registry References
      1. 8.5.1. Auto-Flush and Save Registry Settings
      2. 8.5.2. Device Name for USB Removable Storage
      3. 8.5.3. Disable Suspend from the Start Menu
      4. 8.5.4. Internet Explorer Startup Page
      5. 8.5.5. Static IP Address
      6. 8.5.6. Windows Embedded CE Device Name
    6. 8.6. Accessing the Registry
    7. 8.7. Summary
  15. 9. Testing With CETK
    1. 9.1. Windows Embedded CE Test Kit
    2. 9.2. CETK Tests
      1. 9.2.1. Connecting to CETK with KITL and Platform Manager
        1. 9.2.1.1. Preparing the Test Environment
        2. 9.2.1.2. Starting the CETK Host Application
        3. 9.2.1.3. Connecting CETK to Target Device with Platform Manager
        4. 9.2.1.4. Running the Tests
        5. 9.2.1.5. CETK Test Results
      2. 9.2.2. Connecting CETK to Target Device Using Sockets
        1. 9.2.2.1. Preparing the Test Environment
        2. 9.2.2.2. Starting the CETK Host Application
        3. 9.2.2.3. Starting the Clientside Application
        4. 9.2.2.4. Running the Test
        5. 9.2.2.5. CETK Test Results
        6. 9.2.2.6. Starting clientside.exe with wcetk.txt
        7. 9.2.2.7. Customizing the Command Line for CETK Test
    3. 9.3. Summary
  16. 10. Application Development
    1. 10.1. The Development Landscape
      1. 10.1.1. The Desktop Windows Development Environment
      2. 10.1.2. The CE Development Environment
        1. 10.1.2.1. The Windows Mobile OS
        2. 10.1.2.2. Windows Embedded CE
        3. 10.1.2.3. CE Native-Code Applications
        4. 10.1.2.4. Managed-Code Applications
      3. 10.1.3. The .NET Compact Framework
      4. 10.1.4. Other Third-Party Libraries
    2. 10.2. New Breed of Embedded Devices
    3. 10.3. Summary
  17. 11. Visual C# 2005 Applications
    1. 11.1. Developing C# Applications for CE
      1. 11.1.1. Configuring and Building the Runtime Image
      2. 11.1.2. Downloading the Runtime Image to the Emulator
      3. 11.1.3. Creating the C# Smart Device Application Project
      4. 11.1.4. Adding Controls to the Application
      5. 11.1.5. Adding Codes to the Application
      6. 11.1.6. Connecting to the Target Device
      7. 11.1.7. Deploying C# Application to Target Device
      8. 11.1.8. Debugging the C# Application on Target Device
    2. 11.2. Summary
  18. 12. VB 2005 Applications
    1. 12.1. Developing VB Applications for CE
      1. 12.1.1. Configuring and Building the Runtime Image
      2. 12.1.2. Establishing a Connection to the eBox-4300
      3. 12.1.3. Downloading Runtime Image to eBox-4300
      4. 12.1.4. Creating a VB 2005 Smart Device Application
        1. 12.1.4.1. Adding Components to the SerialPortApp Application
        2. 12.1.4.2. Code for the SerialPortApp Application
      5. 12.1.5. Establishing a Connection to the eBox-4300
      6. 12.1.6. Deploying the SerialPortApp to the eBox-4300
      7. 12.1.7. Testing the SerialPortApp on the eBox-4300
    2. 12.2. Summary
  19. 13. Native-Code Applications
    1. 13.1. Visual C++ 2005 Native Applications
      1. 13.1.1. The Autolaunch Component
      2. 13.1.2. Configuring and Building the Runtime Image
      3. 13.1.3. Configuring and Building an SDK
      4. 13.1.4. Downloading a Runtime Image to the Emulator
      5. 13.1.5. Creating the Visual C++ 2005 Smart Device Application
      6. 13.1.6. Connecting to the Emulator with CoreCon
      7. 13.1.7. Deploying Visual C++ 2005 Application to the Emulator
    2. 13.2. Platform Builder Native Application
      1. 13.2.1. CE Subproject Wizard
      2. 13.2.2. Deploying the PBNativeApp Application
    3. 13.3. Summary
  20. 14. Autolaunch Applications
    1. 14.1. Autolaunch with the Registry
    2. 14.2. Autolaunch with Windows\Startup
    3. 14.3. The AutoLaunchApp Utility
    4. 14.4. Summary
  21. 15. Customizing the UI
    1. 15.1. Input and Output for the CE Device
      1. 15.1.1. The Input
      2. 15.1.2. The Output
    2. 15.2. Custom UI for the CE
    3. 15.3. CE with NMD Custom UI
    4. 15.4. VB 2005 Application as the Custom UI
      1. 15.4.1. Configure the OS Design for Testing
      2. 15.4.2. Develop the VB 2005 Application
      3. 15.4.3. Add the VB 2005 Application to the OS Design
    5. 15.5. Summary
  22. 16. Thin-Client Applications
    1. 16.1. The Thin-Client Terminal
    2. 16.2. The Windows Thin Client OS
      1. 16.2.1. The Initial WTC OS Design
      2. 16.2.2. Configuring a Target Device and Downloading an Image
      3. 16.2.3. Customizing the WTC OS Design
      4. 16.2.4. The Autolaunch Subproject
      5. 16.2.5. Disabling the Explorer Shell
    3. 16.3. Summary
  23. 17. Home Automation Applications
    1. 17.1. Home Automation Control
      1. 17.1.1. Control Applications
      2. 17.1.2. Controllers, Relays, Switches, and Sensors
    2. 17.2. Hardware and Peripherals
      1. 17.2.1. The eBox-4300-MSJK
      2. 17.2.2. Phidget Devices
      3. 17.2.3. BSP and Software Library
      4. 17.2.4. Electronic 101 for Input and Output
        1. 17.2.4.1. Digital Input and Output
        2. 17.2.4.2. Analog Input and Output
    3. 17.3. The eBoxPhidget OS Design
      1. 17.3.1. Development Environment
      2. 17.3.2. Creating the OS Design
      3. 17.3.3. Additional Needed Components
      4. 17.3.4. Configuring the Registry
      5. 17.3.5. Configuring the Build Option and Build
      6. 17.3.6. Target Device Connectivity and Download
      7. 17.3.7. Configuring and Generating the SDK
      8. 17.3.8. Installing the eBoxPhidgetSDK
    4. 17.4. Home Automation Applications
      1. 17.4.1. Temperature Sensor Application
      2. 17.4.2. Preparing eBox-4300-MSJK for Application Deployment
      3. 17.4.3. Remote Display Application
      4. 17.4.4. Deploying Applications to eBox-4300-MSJK
      5. 17.4.5. Phidget Relay Switching Application
      6. 17.4.6. Other Phidget Sensors
    5. 17.5. Summary
  24. 18. RFID Security Access Control Applications
    1. 18.1. Radio Frequency Identification — RFID
    2. 18.2. The PhidgetRFID Reader
    3. 18.3. RFID Reader Applications
      1. 18.3.1. Hardware Component for the Application
      2. 18.3.2. Software Component for the Application
      3. 18.3.3. Creating the RFIDApp
    4. 18.4. Summary
  25. 19. Robotic Applications
    1. 19.1. The Stinger CE Robot
      1. 19.1.1. The Serializer WL Robot Controller
      2. 19.1.2. How Does the Serializer Work?
    2. 19.2. Simple Robotic Control Applications
      1. 19.2.1. Windows Embedded CE Design
      2. 19.2.2. Robotic Application Using the Serial Port Class
      3. 19.2.3. Source Code Listing for SerialPortClass Project
      4. 19.2.4. Robotic Application Using the Serializer .NET Library
        1. 19.2.4.1. Add Reference to the Serializer .NET Library
        2. 19.2.4.2. Adding Code to the Project
        3. 19.2.4.3. Complete Source Code Listing for SerializerNET Project
    3. 19.3. Launching the Robotic Application
      1. 19.3.1. Configuring the OS Design for SerialPortClass Application
      2. 19.3.2. Launching serialportclass.exe on the Stinger CE Robot
      3. 19.3.3. Configuring the OS Design for SerializerNET Application
      4. 19.3.4. Launching serializernet.exe on the Stinger CE Robot
    4. 19.4. Summary
  26. 20. Deploying a CE 6.0 Device
    1. 20.1. Windows Network Projector
    2. 20.2. Windows Network Projector OS Design
      1. 20.2.1. Creating the Initial OS Design
      2. 20.2.2. Configuring, Customizing, and Building the OS Design
      3. 20.2.3. Target Connectivity and OS Image Download
      4. 20.2.4. Cloning the Pictor Application
        1. 20.2.4.1. Creating a Blank Subproject
        2. 20.2.4.2. Copying the Pictor Application Source Code
        3. 20.2.4.3. Modifying the Sources File
        4. 20.2.4.4. Modifying the Registry File
        5. 20.2.4.5. Customizing the WNPMain Program
        6. 20.2.4.6. Building the Project
      5. 20.2.5. Configuring to Boot from BIOS Loader
        1. 20.2.5.1. Installing BIOS Loader Using USB Floppy Drive
        2. 20.2.5.2. Preparing to Boot to BIOS Loader Using USB Flash Storage
        3. 20.2.5.3. Launching nk.bin with BIOS Loader
    3. 20.3. Windows Network Projector Usage
    4. 20.4. Summary
  27. A. Windows Embedded CE References
    1. A.1. Online Resources from Microsoft
      1. A.1.1.
        1. A.1.1.1. Windows Embedded Home Page
        2. A.1.1.2. Windows Embedded CE 6.0 Online Documentation
        3. A.1.1.3. Windows Embedded eHow-Tos and Tutorials
        4. A.1.1.4. Windows Embedded Virtual Labs
        5. A.1.1.5. Mike Hall's Blog
        6. A.1.1.6. Windows Embedded CE Base Team Blog
        7. A.1.1.7. Windows Embedded News Groups
        8. A.1.1.8. Windows Embedded Technical Chat
    2. A.2. Other Learning Resources
      1. A.2.1.
        1. A.2.1.1. Introduction to Embedded System Using Windows Embedded CE
    3. A.3. Drivers and Shared-Source Projects
      1. A.3.1.
        1. A.3.1.1. USB Webcam Driver for Windows Embedded CE
        2. A.3.1.2. Windows CE Webcam Project
        3. A.3.1.3. Phidgets Driver for Windows Embedded CE
        4. A.3.1.4. Open SSH for Windows CE
        5. A.3.1.5. 32feet.NET — Personal Area Networking for .NET
        6. A.3.1.6. LSP Samples for Windows CE
        7. A.3.1.7. Windows CE WLAN Driver for Atheros AR-60001
    4. A.4. Other Online Resources
      1. A.4.1.
        1. A.4.1.1. Smart Device Framework
        2. A.4.1.2. EmbeddedPC.NET
        3. A.4.1.3. LearningCE.COM
    5. A.5. Hardware Vendors
      1. A.5.1.
        1. A.5.1.1. Supported Board Support Packages
        2. A.5.1.2. CompactPC
        3. A.5.1.3. ICOP Technology
        4. A.5.1.4. Phidgets
        5. A.5.1.5. Robotics Connection
  28. B. Installation and Software
    1. B.1. Windows Embedded CE 6.0 R2
    2. B.2. CE 6.0 R2 Installation
      1. B.2.1.
        1. B.2.1.1. Visual Studio 2005
        2. B.2.1.2. Windows Embedded CE 6.0 R2
    3. B.3. Installing Other Software
      1. B.3.1.
        1. B.3.1.1. ICOP_eBox4300_60E BSP
        2. B.3.1.2. CoreCon Connection Framework
        3. B.3.1.3. Autolaunch Utility
        4. B.3.1.4. PhidgetFramework Library
  29. C. Sample Applications and OS Design Projects
    1. C.1. Robotic Remote Control Application
    2. C.2. Serial Port Communication Application
    3. C.3. Source Code for the Exercises
      1. C.3.1.
        1. C.3.1.1. Chapter 1: Windows Embedded CE
        2. C.3.1.2. Chapter 2: Development Environment and Tools
        3. C.3.1.3. Chapter 3: Board Support Package
        4. C.3.1.4. Chapter 4: Building a Customized CE 6.0 Runtime Image
        5. C.3.1.5. Chapter 5: Connecting to Target Device
        6. C.3.1.6. Chapter 6: Debugging and Debugging Tools
        7. C.3.1.7. Chapter 7: Boot Loader Overview
        8. C.3.1.8. Chapter 8: The Registry
        9. C.3.1.9. Chapter 9: Testing with CETK
        10. C.3.1.10. Chapter 10: Application Development
        11. C.3.1.11. Chapter 11: Visual C# 2005 Applications
        12. C.3.1.12. Chapter 12: VB 2005 Applications
        13. C.3.1.13. Chapter 13: Native-Code Applications
        14. C.3.1.14. Chapter 14: Autolaunch Applications
        15. C.3.1.15. Chapter 15: Customizing the UI
        16. C.3.1.16. Chapter 16: Thin-Client Applications
        17. C.3.1.17. Chapter 17: Home Automation Applications
        18. C.3.1.18. Chapter 18: RFID Security Access Control Applications
        19. C.3.1.19. Chapter 19: Robotic Applications
        20. C.3.1.20. Chapter 20: Deploying a CE 6.0 Device