Professional windows embedded compact 7

746 123 0
Professional windows embedded compact 7

Đang tải... (xem toàn văn)

Tài liệu hạn chế xem trước, để xem đầy đủ mời bạn chọn Tải xuống

Thông tin tài liệu

www.it-ebooks.info www.it-ebooks.info ffirs.indd iv 8/2/11 7:44:22 PM PROFESSIONAL WINDOWS® EMBEDDED COMPACT FOREWORD xxxv INTRODUCTION xxxvii PART I INTRODUCING EMBEDDED DEVELOPMENT CHAPTER Embedded Development CHAPTER Windows Embedded Compact 11 CHAPTER Development Station Preparation 19 CHAPTER Development Process 29 CHAPTER Development Environment and Tools 35 PART II PLATFORM BUILDER AND OS DESIGN CHAPTER BSP Introduction 53 CHAPTER OS Design 69 CHAPTER Target Device Connectivity and Download 87 CHAPTER Debug and Remote Tools 97 CHAPTER 10 The Registry 125 CHAPTER 11 The Build System 137 CHAPTER 12 Remote Display Application 151 CHAPTER 13 Testing with Compact Test Kit 157 PART III APPLICATION DEVELOPMENT CHAPTER 14 Application Development 173 CHAPTER 15 NET Compact Framework 181 CHAPTER 16 CoreCon Connectivity 187 CHAPTER 17 Visual Studio Native Code Application Example 195 CHAPTER 18 Managed Code Application Example 207 CHAPTER 19 Platform Builder Native Code Application Example 219 Continues www.it-ebooks.info ffirs.indd i 8/2/11 7:44:20 PM CHAPTER 20 Developing Embedded Database Applications 233 CHAPTER 21 Silverlight for Windows Embedded 267 CHAPTER 22 Silverlight for Windows Embedded Application Examples 275 CHAPTER 23 Auto Launching Applications 289 CHAPTER 24 Application Deployment Options 297 PART IV DEPLOY WINDOWS EMBEDDED COMPACT DEVICES CHAPTER 25 Deploy OS Run-time Images 305 CHAPTER 26 Bootloaders 313 CHAPTER 27 BIOSLoader 321 CHAPTER 28 The DiskPrep Power Toy 327 PART V DEVICE DRIVERS, BOOT LOADER, BSP, AND OAL DEVELOPMENT CHAPTER 29 An Overview of Device Drivers 339 CHAPTER 30 Device Driver Architectures 349 CHAPTER 31 Interrupts 367 CHAPTER 32 Stream Interface Drivers 393 CHAPTER 33 Developing a Stream Interface Driver 417 CHAPTER 34 Stream Driver API and Device Driver Testing 449 CHAPTER 35 The Target System 467 PART VI ADVANCED APPLICATION DEVELOPMENT CHAPTER 36 Introduction to Real-Time Applications 487 CHAPTER 37 A Simple Real-Time Application 497 CHAPTER 38 Extending Low-Level Access to Managed Code 509 CHAPTER 39 Extending Low-level Access to Managed Code with Messages 531 CHAPTER 40 A Web Server Application 545 CHAPTER 41 A USB Camera Application 563 www.it-ebooks.info ffirs.indd ii 8/2/11 7:44:21 PM PART VII SAMPLE PROJECTS CHAPTER 42 Develop a Windows Network Projector 577 CHAPTER 43 Phidgets Devices 585 CHAPTER 44 FTDI Devices 601 CHAPTER 45 Integrating Managed Code Projects 629 APPENDIX A Virtual PC Connectivity 639 APPENDIX B Microsoft Resources 645 APPENDIX C Community Resources 649 APPENDIX D Embedded Hardware 655 INDEX 659 www.it-ebooks.info ffirs.indd iii 8/2/11 7:44:21 PM www.it-ebooks.info ffirs.indd iv 8/2/11 7:44:22 PM PROFESSIONAL Windows® Embedded Compact www.it-ebooks.info ffirs.indd v 8/2/11 7:44:22 PM www.it-ebooks.info ffirs.indd vi 8/2/11 7:44:22 PM PROFESSIONAL Windows® Embedded Compact Samuel Phung David Jones Thierry Joubert John Wiley & Sons, Inc www.it-ebooks.info ffirs.indd vii 8/2/11 7:44:22 PM Professional Windows® Embedded Compact Published by John Wiley & Sons, Inc 10475 Crosspoint Boulevard Indianapolis, IN 46256 www.wiley.com Copyright © 2011 by John Wiley & Sons, Inc., Indianapolis, Indiana Published simultaneously in Canada ISBN: 978-1-118-05046-0 ISBN: 978-1-118-16750-2 ISBN: 978-1-118-16748-9 ISBN: 978-1-118-16747-2 Manufactured in the United States of America 10 No part of this publication may be reproduced, stored in a retrieval system or transmitted in any form or by any means, electronic, mechanical, photocopying, recording, scanning or otherwise, except as permitted under Sections 107 or 108 of the 1976 United States Copyright Act, without either the prior written permission of the Publisher, or authorization through payment of the appropriate per-copy fee to the Copyright Clearance Center, 222 Rosewood Drive, Danvers, MA 01923, (978) 750-8400, fax (978) 646-8600 Requests to the Publisher for permission should be addressed to the Permissions Department, John Wiley & Sons, Inc., 111 River Street, Hoboken, NJ 07030, (201) 748-6011, fax (201) 748-6008, or online at http://www.wiley.com/go/permissions Limit of Liability/Disclaimer of Warranty: The publisher and the author make no representations or warranties with respect to the accuracy or completeness of the contents of this work and specifically disclaim all warranties, including without limitation warranties of fitness for a particular purpose No warranty may be created or extended by sales or promotional materials The advice and strategies contained herein may not be suitable for every situation This work is sold with the understanding that the publisher is not engaged in rendering legal, accounting, or other professional services If professional assistance is required, the services of a competent professional person should be sought Neither the publisher nor the author shall be liable for damages arising herefrom The fact that an organization or Web site is referred to in this work as a citation and/or a potential source of further information does not mean that the author or the publisher endorses the information the organization or Web site may provide or recommendations it may make Further, readers should be aware that Internet Web sites listed in this work may have changed or disappeared between when this work was written and when it is read For general information on our other products and services please contact our Customer Care Department within the United States at (877) 762-2974, outside the United States at (317) 572-3993 or fax (317) 572-4002 Wiley also publishes its books in a variety of electronic formats and by print-on-demand Not all content that is available in standard print versions of this book may appear or be packaged in all book formats If you have purchased a version of this book that did not include media that is referenced by or accompanies a standard print version, you may request this media by visiting http://booksupport.wiley.com For more information about Wiley products, visit us at www.wiley.com Library of Congress Control Number: 2011934627 Trademarks: Wiley, the Wiley logo, Wrox, the Wrox logo, Wrox Programmer to Programmer, and related trade dress are trademarks or registered trademarks of John Wiley & Sons, Inc and/or its affi liates, in the United States and other countries, and may not be used without written permission Windows is a registered trademark of Microsoft Corporation in the United States and/or other countries All other trademarks are the property of their respective owners John Wiley & Sons, Inc is not associated with any product or vendor mentioned in this book www.it-ebooks.info ffirs.indd viii 8/2/11 7:44:22 PM Remote Tools – serial ports Remote Tools (continued) Power Monitor, 47, 103, 118, 121 Process Viewer, 47, 107–108, 424, 457, 506 Profi ler, 47, 108–111, 457 Registry Editor, 47, 111–112, 136, 424, 457, 507 Resource Consumer, 47, 112–113 Resource Leak Detector, 47, 113–116, 457 System Information, 47, 116–117, 424, 457 Target Control, 121–123 commands, 123, 464 Internet Explorer launch, 121 Support Catalog component, 630 terminate running process, 122 Timeline Viewer, 47, 118–121 Zoom-In, 47, 117–118 Remote Tools for Smart Devices utility, 646 removable storage See USB replication, merge, 264, 265 RequestPowerNotifications, 413, 414 Resource Consumer remote tool, 47, 112–113 Resource Leak Detector remote tool, 47, 113–116, 457 resources application development, 173–174 community, 649–654 connectivity, development environment, 25–26 Microsoft, 645–647 Platform Builder development, 39 RETAILLED, 453 RETAILMSG, 139, 225, 231, 453 RFID Reader application, 587, 590–599 code, 592–595 deploy to target device, 595–598 develop in managed code, 590–598 graphical user interface, 591–592 OS run-time image, 599 RGB, 567, 572, 573 RISC platforms, 309–311 RoBoard, 657 root registry keys, 126 RPC (Remote Procedure Call), 525 RS-232 cross-over cable, 100 RS-232 null modem cable, 100, 604 Runtime Callable Wrapper (RCW), 525, 529 RXRDY signal, 341 S s iesample, 121 sample projects, 575–638 See also FTDI USB to Serial devices; integrating managed code applications; Phidgets devices; Windows Network Projector Samsung SMDK6410 : ARMv6 BSP, 46, 54 Sboot (serial bootloader), 314, 315 Scripts, Platform Builder, 435–436 SDF, 652 SDF (Smart Device Framework), 652 sdf extension, 238, 240, 246 SDKs (software development kits) See also MyCompact7_SDK BSPs compared to, 470 Build All SDKs, 85, 590 create, 83–85 MSI fi le, 85 MTConnect, 651–652 MyRFID OS design project, 589–590 SDK Wizard, 46, 83, 85, 590 search function Platform Builder IDE, 77 Security Alert screen, 89 _Seek, 357, 397, 398, 399, 400, 422 send function, 549 serial bootloader (Sboot), 314, 315 serial null modem cable, 100 Serial Port API, custom FTDI stream driver, 616 serial ports access, FTDI USB to Serial device, 616–618 connectivity, 24, 26 driver components, MyBSP, 66–67 registry, 129–130 serial debug connectivity, 99–100 serial debug messages, 26, 57, 67–68, 99, 100, 315, 646 684 www.it-ebooks.info bindex.indd 684 8/2/11 5:21:17 PM SerialPort class – software VB2008_SerialPortApplication, 209, 611, 632, 635 SerialPort class, 617–618 server environment, SQL Compact, 237 service packs Visual Studio 2008, 22 servicing embedded devices, 545–546, 562 See also web server application SetDevicePower, 411, 414 SetFilePointer, 397, 398 SetPowerRequirement, 414 SetSystemPowerState, 414 \SETUPDISK, 322 $(SG_OUTPUT_ROOT), 139, 140, 428 shared memory, driver context and, 440–441 Ship mode, build configuration, 138, 139, 450, 453 Sigma Designs Vantage 8654 BSP, 43, 54 Silverlight, 267–268 Silverlight for Windows Embedded (SWE), 267–288 animation, 512 contract, 273 development process, 273–274 Expression Blend, 22, 39, 268 new feature, 13 overview, 267–274 required software, 269–270 SWE_Hello application project, 275–288 create, 277–279 development steps, 275 event handler, 283–284 OS design with Silverlight support, 276–277 port to native code, 279–281 preparation, 275–276 prerequisites, 275–276 Storyboard1, 285–287 subproject, 281–283, 285, 287–288 user control, 285–287 XAML_Hello, 277–281, 283, 285, 286, 287 updated, 39 user interface development framework, 267–268 Windows Embedded Silverlight Tools Create Platform Builder Subproject Wizard, 270, 280 defi ned, 39, 47–48, 268 port XAML_Hello to native code, 279–281 Update Silverlight for Windows Embedded Project Wizard, 270, 285 Windows Embedded Events Wizard, 270 Silverlight for Windows Embedded Template, 22, 270 16550 UART See UART Sleep, device power state, 412 small footprint, 11, 12, 18, 181, 547 Small Footprint Device template, 45, 479 smart device applications See managed code smart device application; Win32 smart device application project Smart Device CAB Project Wizard, 298–299 Smart Device Framework (SDF), 652 Smart Device Information, 653 smart device project templates managed code, 177 native code, 178 SMP (Symmetric Multiprocessing Support), 39 snapshots Remote Resource Leak Detector, 113 USB camera application, 567, 569, 571, 573 SoC (Systems on a Chip), 175, 374, 376, 420, 468 socket, HTTP, 549 soft real-time systems, 14, 488, 489 software evaluation, 645 Visual Studio 2008, 22, 645 Windows Embedded Compact 7, 21, 645 installation steps, development computer, 21–22 requirements Platform Builder, 20 SWE, 269–270 selection, development process, 31 Windows Embedded Compact 7, 21 685 www.it-ebooks.info bindex.indd 685 8/2/11 5:21:18 PM software – storage software (continued) software development kits See SDKs Software Timer, 490, 502, 503, 506 SOURCES, 141–142, 147, 564, 566 sources fi le, string buffer project, 426–427 sources.cmn, 477 specialized-purpose application, specialized-purpose devices, Splash Generator, CE, 325, 653 SQL Compact (SQL Server Compact 3.5), 236–238 client environment, 237 components, 238 data synchronization, 264–265 database, 234–235 merge replication, 264, 265 query processor, 238 server environment, 237 storage engine, 238 synchronization engine, 238 uses, 237 SQL Compact database application (Playlist application) building, 241–247 data source, 243 database creation, 242 device requirements, 238–239 edit view form, 245–246 editing capabilities, 244 managed code compact database application, 261–264 managed code database applications, 254–257 managed code remote database application, 257–261 managed code requirements, 239–241 playlist functions, 249–250 queries, 244–245 record deletes, 246–247 structure, 234, 235, 241–264 summary view form, 245–246 text fi le read/write examples, 250–252 Tracks table creation, 242 DataGrid control, 243–244 population, 243 XML serialization, 252–254 SqlCeCommand, 240 SqlCeConnection, 240 SqlCeDataReader, 240 SqlCeEngine, 240 SqlCeException, 240 SqlCeResultSet, 240 SqlServerCe classes, 240 Standby, device power state, 412 StartIST(), 382 startup See also auto launching applications folder, auto launch application, 292–293 registry, 290–291 startup parameters, BIOLoader, 321–322 startup splash screen, BIOSLoader, 324–325 static IP address Platform Builder native code application example, 220 registry, 134, 642 VM connectivity, 641–642 status registers, 340, 341, 342 StopPowerNotifications, 414 storage Compact Flash characteristics, 308 configuring, with BIOSLoader, 329–333 USB to Compact Flash adapter, 329, 330, 580 DiskPrep power toy, 327 fi xed, 307–308 IDE flash, 307 local, application deployment, 299, 300–301 preparation, BIOSLoader, 324 USB audio driver component, MyBSP, 63–65 class IDs, 361 connection, 23, 48 deploy OS run-time image, 307 drivers, 360–362 HID keyboard/mouse, 76–77, 351, 361 removable storage, registry key, 133 storage class driver, 58, 76, 347, 395 686 www.it-ebooks.info bindex.indd 686 8/2/11 5:21:18 PM storage engine – Stream Drivers storage engine, SQL Compact, 238 storeBMPfile, 571, 573 storeJPGfile, 571 STOREMGR_DRIVER_GUID, 408 STORE_MOUNT_GUID, 408 Storyboard1, 285–287 stream context, 407 Stream Drivers (Stream Interface Drivers), 393–447 API, 449–466 architecture, 396–397 asynchronous I/O, 399, 409–410, 421, 423 BIB entries, 401, 404 block drivers, 360–362 bus drivers, 360–362 CEDriverWiz, 434–440 DebugMessageZones option, 454 IOCTLs, 440 Platform Builder Scripts, 435 Stream Driver creation, 438, 443–444, 483–484 test applications, 417, 439, 450, 458 using, 436–440 configuration, 401–405 context, 399, 405–407 open, 422–423 shared memory, 440–441 stream, 407 creating, 438, 443–444, 483–484 CTK, 461–464 development, 417–447 overview, 418–421 planning items, 418–421 driver class power management interfaces, 413 PMCLASS_BLOCK_DEVICE, 408, 413 PMCLASS_DISPLAY, 408, 413 PMCLASS_GENERIC_DEVICE, 408, 413, 419, 445 PMCLASS_NDIS_MINIPORT, 408, 413 flags DEVFLAGS_BOOTPHASE_1, 403 DEVFLAGS_IRQ_EXCLUSIVE, 403 DEVFLAGS_LOADLIBRARY, 403 DEVFLAGS_NAKEDENTRIES, 393, 403, 408 DEVFLAGS_NOLOAD, 403 DEVFLAGS_NONE, 403 DEVFLAGS_UNLOAD, 403, 422 DEVFLAGS_USERMODE, 403, 404, 405, 428 FTDI custom driver, 618–628 commands, 618–619 creating, 619–623 IOCTLs, 625–628 mode command, 623–625 ping, 623–625 Serial Port API, 616 imaging, 405 interface classes, 407–408 BATTERY_DRIVER_CLASS, 408 BLOCK_DRIVER_GUID, 408 CDDA_MOUNT_GUID, 408 CDFS_MOUNT_GUID, 408 DEVCLASS_CARDSERV_GUID, 408 DEVCLASS_DISPLAY_GUID, 408 DEVCLASS_KEYBOARD_GUID, 408 DEVCLASS_STREAM_GUID, 408 FATFS_MOUNT_GUID, 408 FSD_MOUNT_GUID, 408 NLED_DRIVER_CLASS, 408 PMCLASS_BLOCK_DEVICE, 408, 413 PMCLASS_DISPLAY, 408, 413 PMCLASS_GENERIC_DEVICE, 408, 413, 419, 445 PMCLASS_NDIS_MINIPORT, 408, 413 STOREMGR_DRIVER_GUID, 408 STORE_MOUNT_GUID, 408 UDFS_MOUNT, 408 interface functions, 357–358, 397–401, 421–423 DllEntryPoint, 398, 418, 422 DllMain, 399, 418, 422 functionality, 421–422 string buffer project, 429–430 XXX_Cancel, 357, 397, 398, 401, 410, 422 XXX_Close, 357, 397, 398, 399, 401, 409, 422, 423, 431 XXX_DeInit, 357, 398, 399, 422, 430, 436 687 www.it-ebooks.info bindex.indd 687 8/2/11 5:21:19 PM Stream Drivers – subprojects Stream Drivers (continued) XXX_Init, 357, 397, 398, 399, 405, 406, 422, 430–431, 436, 441, 479 XXX_IOControl, 357, 397, 398, 400–401, 409, 422, 432, 440, 511 XXX_Open, 357, 397, 398, 399, 400, 401, 407, 409, 422, 423, 431–432 XXX_PowerDown, 357, 397, 398, 401, 410, 422 XXX_PowerUp, 357, 397, 398, 401, 410, 422 XXX_PreClose, 357, 397, 398, 401, 422 XXX_PreDeinit, 357, 398, 399, 422 XXX_Read, 357, 397, 398, 399, 400, 409, 422, 423, 436 XXX_Seek, 357, 397, 398, 399, 400, 422 XXX_Write, 357, 397, 398, 399, 400, 409, 422, 423, 432, 436 IOCTLs implementing, 440 interface, 359, 360, 396, 411, 418, 432, 437, 440 IOCTL_POWER_CAPABILITIES, 411, 443, 445 IOCTL_POWER_GET, 411, 443, 446, 447 IOCTL_POWER_SET, 411, 443, 446 IOCTL_REGISTER_POWER_ RELATIONSHIP, 411, 444, 446, 447 TestIOCTLs, 440, 625 legacy name, 401–402 loading, 458–460 minimal, 422 naming conventions, 401–402 native drivers v., 356–357, 396 power management, 410–415 API, 414–415 architecture, 413–415 implementation, 443–447 power management functions DevicePowerNotify, 414 GetDevicePower, 411, 414, 445 GetSystemPowerState, 414 PowerPolicyNotify, 414 ReleasePowerRequirement, 414 RequestPowerNotifications, 413, 414 SetDevicePower, 411, 414 SetPowerRequirement, 414 SetSystemPowerState, 414 StopPowerNotifications, 414 registry access, 441–443 entries, 402–404 simple project, 423–425 string buffer project, 425–433 parameter fi les, 427–429 source code fi le, 430–433 sources fi le, 426–427 stream functionality, 429–430 synchronous I/O, 399, 409, 410, 436 Target Control, 464 testing, 433–434, 439, 449–466 USB drivers, 360–362 why use, 396 Stream Interface Drivers See Stream Drivers stream IO API, 409 CloseHandle, 397, 398, 409 CreateFile, 398, 409 DeviceIOControl, 397, 398, 409, 462, 511, 516, 517, 518, 519, 520 ReadFile, 398, 409 WriteFile, 398, 409 stream IOTCLs, 460 string buffer Stream Driver project, 425–433 parameter fi les, 427–429 source code fi le, 430–433 sources fi le, 426–427 stream functionality, 429–430 test string buffer, 434 String Collection Editor screen, 60, 61, 62, 63, 64, 65, 66, 68 StringBuilder, 517, 518, 519, 520 stub display driver, 41, 155 subprojects PB7_Win32 auto launch, 291 building/launching, 228–229 688 www.it-ebooks.info bindex.indd 688 8/2/11 5:21:20 PM summary view form – target device creating, 224–225 PB7_Win32.exe, 226, 228, 229, 230, 291, 292, 293, 294, 295 rebuilding/relaunching, 229–230 Platform Builder, 434 registry, 135 SWE_Hello application project animation added, 287–288 build, compile, launch, 281–283 update, 285 WDT console application, 386–387 WDT DLL application, 388–390 WebCam DLL, 564–566 summary view form, SQL Compact database application, 245–246 Suspend mode, 133, 412, 447 SWE_Hello application project, 275–288 See also Silverlight for Windows Embedded create, 277–279 development steps, 275 event handler, 283–284 OS design with Silverlight support, 276–277 port to native code, 279–281 preparation, 275–276 prerequisites, 275–276 Storyboard1, 285–287 subproject animation added, 287–288 build, compile, launch, 281–283 update, 285 user control, 285–287 XAML_Hello, 277–281, 283, 285, 286, 287 Symmetric Multiprocessing Support (SMP), 39 Sync Framework, Microsoft, 265 synchronization remote server/SQL Compact, 264–265 SQL Compact synchronization engine, 238 Windows Embedded Compact 7, 493–494 synchronous I/O, 399, 409, 410, 436 Sysgen phase, 139–140 SYSGEN_ATAPI variable, 59, 60, 61 SYSGEN_FATFS, 60, 61, 75 SYSGEN_SERDEV, 66, 76 SYSGEN_USB, 64, 76 SYSINTR See system interrupts System Idle, 412 System Information remote tool, 47, 116–117, 424, 457 system interrupts, 372–373 system power states, 411–412 System.Data.SqlClient, 257 System.Data.SqlServerCe, 239, 240, 261 SYSTEM.HV, 127, 128 Systems on a Chip (SoC), 175, 374, 376, 420, 468 T tabJitterCounter, 504, 505 Tacke, Chris, 325 TAPI (telephony application interface) library, 652 target boards, 468–469 Target Control, 121–123 See also Remote Tools dd command, 122, 464 df command, 122, 464 gi command, 122, 464 Internet Explorer launch, 121 kp command, 122, 464 log command, 122, 464 mi command, 122, 464 prof command, 122, 464 Stream Drivers, 464 Support Catalog component, 630 terminate running process, 122 zo command, 122, 464 target device See also eBox-3310A; Virtual PC CTK connectivity to, 158–162 defi ned, 31, 37 development environment setup, 23–24 hardware selection, 30–31 managed code smart device application connect to target device, 212–213 deploy to target device, 213–215 VM, 221 Win32 smart device application project connect to target device, 198–200 deploy to target device, 200–201 689 www.it-ebooks.info bindex.indd 689 8/2/11 5:21:20 PM target device connectivity – time determinism target device connectivity, 23–24, 87–95 OS run-time image download, 88–92 prerequisites, 87, 88 setting, 92–95 types, 48, 88 target system, 467–484 See also bootloaders; BSPs; OAL bootloaders, 470–472 KITL, 475 OAL, 472–475 targeted market, Windows Embedded Compact 7, 16–17 TARGETNAME, 142, 427, 566 TARGETTYPE, 142, 348, 427 TCP sockets, 546, 548 TcpConnectionA.dll, 188 TCP/IP accept function, 548 Configure TCP/IP Transport screen, 161, 162, 193, 199, 213, 596, 597 HTTP transport protocol, 546, 547 Internet Protocol Version 4, 642 recv function, 549 Remote Display application, 151 send function, 549 Telnet server, 132 telephony application interface (TAPI) library, 652 Telnet server, 132, 174 templates See also specifi c templates OS design, 44–45 Silverlight for Windows Embedded Template, 22, 270 TeraTerm, 26, 100 terminate running process, Target Control, 122 test applications loading drivers, 415 Stream Driver API, 458–460 WDT, 384–388 console application subproject, 386–387 DLL subproject, 388–390 using, 387–388 wrapper DLL, 384–385 Test Case Explorer tab, 163, 166, 169, 464 test DLL, 461, 463–464 test pass, CTK, 168–170 testing See also CoreCon; KITL Compact Test Kit, 157–170 BSP, 167–168 CETK, 14, 39, 49, 157 connectivity to target device, 158–162 defi ned, 39, 49 display driver, 166–167 input device, 163–166 Stream Drivers, 461–464 Test Case Explorer tab, 163, 166, 169, 464 test DLL, 461, 463–464 test pass, 168–170 connectivity, 25–26 development process step, 33 efficient, 18 field, 546 Remote Display application, 156 Stream Drivers, 433–434, 439, 449–466 TestIOCTLs, 440, 625 Texas Instruments OMAP 3530 BSP, 43, 54 text fi le read/write examples, 250–252 TFTP (Trivial File Transfer Protocol), 314, 317, 471, 653 TFTP server, 306, 653 _TGTPLAT, 42 Thin Client template, 45 third-party components, 22, 74, 78, 148, 589, 633 third-party CoreCon component, 190–191 third-party driver binary, 348 third-party drivers, 345, 347, 348 third-party FTDI application modules, 613–616 DLP-IO8-G GPIO Module, 613, 615–616 DLP-IOR4 Relay Module, 613, 614–615 DLP-RF1-Z, 613, 616 Elexol USBIO2R, 613, 614, 616 ZigBee development module, 613, 616 32feet.NET, 651 thread scheduling, 493–494 GB physical memory support, 39 time determinism latencies, 489–490 690 www.it-ebooks.info bindex.indd 690 8/2/11 5:21:21 PM Timeline Viewer remote tool – Virtual PC notifications, 488–489 OS’s influence on, 490–491 Timeline Viewer remote tool, 47, 118–121 timeout actions, 374–375 Timer Driver service, 498, 499, 501, 502, 506, 513 See also Watchdog Timers TimerCallback, 502, 503 time-sharing, 191, 490, 492 time_t functions, 652 tlbimp.exe command line tool, 525, 529 Tracks table creation, 242 DataGrid control, 243–244 population, 243 transport layer, HTTP, 546, 547 See also KITL Trivial File Transfer Protocol See TFTP TUX Test Harness, 348 TXRDY signal, 341 U UART (Universal Asynchronous Receiver/ Transmitter), 341–342 device drivers, 341–342 diagram, 341 FTDI device, 602, 603, 604, 605 interrupts, 367–368 udevice.exe, 355, 397 UDFS_MOUNT, 408 unattended display driver test, 166–167 unboxing, 509, 522 Universal Asynchronous Receiver/Transmitter See UART Update Silverlight for Windows Embedded Project Wizard, 270, 285 USB See also FTDI USB to Serial devices audio driver component, MyBSP, 63–65 class IDs, 361 connection, 23, 48 deploy OS run-time image, 307 drivers, 360–362 HID keyboard/mouse, 76–77, 351, 361 removable storage, registry key, 133 storage class driver, 58, 76, 347, 395 USB to Compact Flash adapter, 329, 330, 580 USB camera application (WebCamRead application), 563–574 capture/save image process, 574 CE Webcam Project, 564, 653 CeWebCam driver, 564–567, 571, 574 snapshots, 567, 569, 571, 573 tested USB cameras, 567 WebCam DLL subproject, 564–566 user control, SWE_Hello application project, 285–287 user expectation, User Idle, system power state, 412 user interface development framework, 267–268 user mode drivers, 353–355, 404–405 USER.HV, 127 User-Selected Catalog Items and Dependencies, 75 User-selected Catalog Items Only filter, 75 \UTILITIES, 323 V Validated, Microsoft, 344, 347 VB2008_SerialPortApplication, 209, 611, 632, 635 VCEPC keyboard drivers, 76, 221, 276 VCP (Virtual COM Port) driver, 602, 606, 607, 610–612, 615, 616, 618, 619, 628 Vendor ID (VID), 361, 605 version history, Windows Embedded Compact 7, 15 VHD (virtual hard drive), 221, 329, 333–335 VID (Vendor ID), 361, 605 VIEWBIN.EXE, 310 Virtual COM Port (VCP) driver, 602, 606, 607, 610–612, 615, 616, 618, 619, 628 virtual device drivers, 350–351 virtual hard drive (VHD), 221, 329, 333, 334, 335 Virtual PC See also MyVPC OS design project connectivity, 221, 639–643 online information, 643 PipeTerm utility, 646 target device, 24, 37, 72, 76 2007 version, 642–643 691 www.it-ebooks.info bindex.indd 691 8/2/11 5:21:22 PM Virtual PC BSP – web server application Virtual PC BSP, 639 defi ned, 39, 43, 54 Virtual PC:x86 BSP, 72, 76, 220, 276 Virtual PC machine (VM) configure, 222–223 establish connection, 221–223 Loopback adapter, 221, 639–641 MyVM profi le, 221–223 native code application example, 220 OS run-time image, 223–224, 226 static IP address, 641–642 target device, 221 Visual Studio 2008 IDE See VS2008 IDE Visual Studio 2008 Professional edition installation, 22 90-days evaluation version, 22, 645 Service Pack 1, 22 VM See Virtual PC machine VMINI, 134, 317, 476 void*, 517, 518, 520, 522 Vortex86DX SoC BSP_VORTEX86DX_9120A, 41 RoBoard, 657 watchdog timer, 376–378 x86 embedded hardware, 657–658 VS2008 IDE (Visual Studio 2008 IDE) See also Platform Builder IDE context-sensitive, 38, 143 debug Win32 smart device application project, 202–203 defi ned, 17–18 development tasks, 35 flexibility, 38 GUI, 38, 208, 218 managed code smart device application, 207–218 managed-code applications, 176–177 native code applications, 177–178, 195–205 New Project Wizard, 70–71, 177, 196, 197, 209, 210, 278, 590, 591 Platform Builder IDE, 38 servicing embedded devices, 545, 562 smart device project templates, 177 Win32 smart device application project, 195–205 Windows Network Projector OS design, 578–580 W WaitWDT(), 384 Watchdog Driver, 531, 532–535, 537–543 Watchdog Timers (WDTs), 374–391 API, 375–376 COP, 374 native code-managed code communication, 532–543 message queues, 537–543 Windows events, 532–537 P/Invoke, 513–516 in system development, 376 test application, 384–388 console application subproject, 386–387 DLL subproject, 388–390 using, 387–388 wrapper DLL, 384–385 timeout actions, 374–375 Vortex86 SoC, 376–378 wavedev driver, 359 WCE Application, 178, 224 WCE Console Application, 178, 389 WCE Dynamic-Link Library, 178, 389 WCE Static Library, 178 WCE TUX Dynamic-Link Library, 178, 461 WDT_DRV, 381–384 WDT_ISR, 379–381 WDTs See Watchdog Timers web server application, 545–562 HTML defi ned, 546 pages, 546, 547, 548, 550, 557 HTTP, 562 clients, 546 GET requests, 546, 548, 550, 552–553, 554, 556 service, 546 transport protocol, 546 692 www.it-ebooks.info bindex.indd 692 8/2/11 5:21:22 PM Web Services WSDL generator – Windows Media Player OCX Control HTTP server, 546–547, 550, 562 implementing, 546–550 NET_TOOL.CPP, 547, 548, 549, 550 NET_TOOL.H, 547 objective, 547 reghttpc7, 547, 550–561 registry viewer, 550–561 servicing embedded devices, 545–546, 562 TCP sockets, 546, 548 TCP/IP accept function, 548 HTTP transport protocol, 546, 547 recv function, 549 send function, 549 Web Services WSDL generator, XML, 646 WebCam DLL subproject, 564–566 Webcam Project, CE, 564, 653 webcam.bib, 565, 566 WebCam.def, 565 WebCamRead application See USB camera application webcam.reg, 565, 566 WE-DIG (Windows Embedded Developer Interest Group), 649 WEST See Windows Embedded Silverlight Tools white papers, 39, 40 WideCharToMultiByte, 557 WIMP (window icon menu pointing device), 344 Win32 APIs, 13, 175, 184, 494, 512, 514, 567 Win32 native code application subproject See PB7_Win32 subproject Win32 smart device application project, 195–205, 196–205 connect to target device, 198–200 debug, 201–205 deploy to target device, 200–201 preparation, 195–196 prerequisites, 195–196 Win32 Smart Device Project Wizard, 197 _WINCEROOT, 42, 53 $(_WINCEROOT)\OSDesigns\MyCompact7, 74 $(_WINCEROOT)\OSDesigns\MyCompact7\ MyCompact7, 74 window icon menu pointing device (WIMP), 344 Windows CE, 37 Windows CE Webcam Project, 564, 653 Windows Embedded community, 649 Windows Embedded Compact See also Platform Builder community resources, 649–654 compact OS, 14 defi ned, 11–12 design criteria, 12 features, 12–14, 39–40 forums, 647 hardware support, 15 history, 11, 15–16 Microsoft resources, 645–647 modular OS, 12, 14 QFEs, 16, 23 real time, 14, 491–495 hardware interface layer, 492–493 managed application runtime, 494–495 native application runtime, 494 services, 491–492 synchronization, 493–494 thread scheduling, 493–494 reasons for using, 17–18 Release Notes, 40 software versions, 21 targeted market, 16–17 version releases, 15 Windows Embedded Developer Interest Group (WE-DIG), 649 Windows Embedded Events Wizard, 270 Windows Embedded Silverlight Tools (WEST) Create Platform Builder Subproject Wizard, 270, 280 defi ned, 39, 47–48, 268 port XAML_Hello to native code, 279–281 Update Silverlight for Windows Embedded Project Wizard, 270, 285 Windows Embedded Events Wizard, 270 Windows Embedded Test Kit See Compact Test Kit Windows events, 344, 383, 532–537 Windows Media Player, 104, 174, 234, 236 Windows Media Player OCX Control, 174 693 www.it-ebooks.info bindex.indd 693 8/2/11 5:21:23 PM Windows Network Projector – XXX_IOControl Windows Network Projector, 577–583 Connect to Network Projector Wizard, 45, 577, 578 developing, 578–581 Network Projector template, 45, 578, 579 OS design, 578–581 create, 578–579 customize, 579–580 OS run-time image deploy, 580–581 generation, 580 using, 582–583 Windows Phone 7, 183–184 NET Compact Framework, 183–184 Windows Security Alert screen, 89 wizards CEComponentWiz CEDriverWiz v., 607 defi ned, 651 download, 608 FTDI USB to Serial devices, 607–609 managed code application in OS image, 629, 632–633, 638 online information, 651 postlink.bat, 636–637 starting, 608 using, 609 CEDriverWiz, 434–440 DebugMessageZones option, 454 description, 650 IOCTLs, 440 Platform Builder Scripts, 435 Stream Driver creation, 438, 443–444, 483–484 test applications, 417, 439, 450, 458 using, 436–440 cloning BSPs, 43–44, 56–57 Connect to Network Projector Wizard, 45, 577, 578 Create Platform Builder Subproject Wizard, 270, 280 New Project Wizard, 70–71, 177, 196, 197, 209, 210, 278, 590, 591 OS Design Wizard, 70–74 SDK Wizard, 46, 83, 85, 590 Smart Device CAB Project Wizard, 298–299 Update Silverlight for Windows Embedded Project Wizard, 270, 285 Win32 Smart Device Project Wizard, 197 Windows Embedded Events Wizard, 270 WM_TIMER, 492 wrapper DLLs COM components, 524–530 WDT test application, 384–385 _Write, 357, 397, 398, 399, 400, 409, 422, 423, 432, 436 WriteFile(), 130 WriteFile, 398, 409 WriteMsgQueue(), 378, 505, 539, 542 WRITE_PORT_UCHAR, 380, 493 WSACleanup, 549 X x86 processors, 657–658 MyBSP: X86/Device Drivers components, 75–76 Vortex86DX SoC BSP_VORTEX86DX_9120A, 41 RoBoard, 657 watchdog timer, 376–378 XAML (Extensible Application Markup Language), 270–272 XAML_Hello, 277–281, 283, 285, 286, 287 See also SWE_Hello application project XLDR, 472 !xml, 465 XML serialization, 252–254 XML Web Services WSDL generator, 646 XOUT signal, 341 XXX_Cancel, 357, 397, 398, 401, 410, 422 XXX_Close, 357, 397, 398, 399, 401, 409, 422, 423, 431 XXX_DeInit, 357, 398, 399, 422, 430, 436 XXX_Init, 357, 397, 398, 399, 405, 406, 422, 430–431, 436, 441, 479 XXX_IOControl, 357, 397, 398, 400–401, 409, 422, 432, 440, 511 694 www.it-ebooks.info bindex.indd 694 8/2/11 5:21:23 PM XXX_Open – zo command XXX_Open, 357, 397, 398, 399, 400, 401, 407, 409, 422, 423, 431–432 XXX_PowerDown, 357, 397, 398, 401, 410, 422 XXX_PowerUp, 357, 397, 398, 401, 410, 422 XXX_PreClose, 357, 397, 398, 401, 422 XXX_PreDeinit, 357, 398, 399, 422 XXX_Read, 357, 397, 398, 399, 400, 409, 422, 423, 436 XXX_Seek, 357, 397, 398, 399, 400, 422 XXX_Write, 357, 397, 398, 399, 400, 409, 422, 423, 432, 436 Y YCbCrToRGB, 572 Z Z9s XGI Display driver component, 61-63 zero-bootloader solution, 309 ZigBee development module, 613, 616 ZigBee-embedded radios, 605 zo command, 122, 457, 464 695 www.it-ebooks.info bindex.indd 695 8/2/11 5:21:24 PM www.it-ebooks.info badvert.indd 696 8/4/11 10:29:01 AM www.it-ebooks.info badvert.indd 697 8/4/11 10:29:02 AM Try Safari Books Online FREE for 15 days + 15% off for up to 12 Months* Read this book for free online—along with thousands of others— with this 15-day trial offer With Safari Books Online, you can experience searchable, unlimited access to thousands of technology, digital media and professional development books and videos from dozens of leading publishers With one low monthly or yearly subscription price, you get: • Access to hundreds of expert-led instructional videos on today’s hottest topics • Sample code to help accelerate a wide variety of software projects • Robust organizing features including favorites, highlights, tags, notes, mash-ups and more • Mobile access using any device with a browser • Rough Cuts pre-published manuscripts START YOUR FREE TRIAL TODAY! Visit www.safaribooksonline.com/wrox10 to get started *Available to new subscribers only Discount applies to the Safari Library and is valid for first 12 consecutive monthly billing cycles Safari Library is not available in all countries www.it-ebooks.info badvert.indd 698 8/4/11 10:29:02 AM ... for Compact Connectivity to Deploy and Debug Application CoreCon Kernel Independent Transport Layer (KITL) Summary 173 173 174 175 176 177 179 179 179 180 CHAPTER 15: NET COMPACT FRAMEWORK NET Compact. .. Interrupts Watchdog Timer 3 67 370 370 371 371 371 371 372 373 374 Compact Watchdog API Using WatchDog Timers in System Development The Vortex86 SoC Watchdog Timer The Compact Message Queue API... 8/2/11 7: 44:22 PM PROFESSIONAL Windows Embedded Compact www.it-ebooks.info ffirs.indd v 8/2/11 7: 44:22 PM www.it-ebooks.info ffirs.indd vi 8/2/11 7: 44:22 PM PROFESSIONAL Windows Embedded Compact

Ngày đăng: 28/03/2019, 13:24

Từ khóa liên quan

Mục lục

  • Professional Windows® Embedded Compact 7

  • Contents

  • Foreword

  • Introduction

  • Part I: Introducing Embedded Development

    • Chapter 1: Embedded Development

      • What Is an Embedded Device?

        • Similarity to Personal Computer

        • Difference from Personal Computer

        • Specialized Purpose Device

        • Example of Embedded Devices

        • What Is Embedded Software?

          • Programming Languages and Principles

          • Programming Discipline

          • Specialized Purpose Application

          • Development Considerations

            • Hardware

            • Operating Environment

            • User Environment

            • Feasibility

            • Summary

            • Chapter 2: Windows Embedded Compact 7

              • What Is Windows Embedded Compact?

                • Windows Embedded Compact 7 Features

                • Modular and Compact Operating System

                • Real-Time Operating System

                • Support Broad Range of Hardware

Tài liệu cùng người dùng

Tài liệu liên quan