Module 2 Configuring Windows CE u Overview n

























































- Slides: 57

Module 2: Configuring Windows CE

u Overview n Introduction to Platform Builder n Platform Development Life Cycle n Setting up the CE Device n Modifying a Platform n Understanding the Build Process n Adding Components to the Platform Builder Catalog

Introduction to Platform Builder n Windows CE OS Configurations n Embedded Windows CE Development Tools l Compilers l IDE-based debugger l Windows CE remote tools l Export SDK n Integrated Development Environment (IDE) n Run-Time Libraries n Sample Code

u. Platform Development Life Cycle Configure Platform Build Download • Create Platform • Modify OAL • Modify Configuration Files • Bootloader • Device Drivers • Applications • Export SDK • Add components to catalog • Make Platform Headers • Compiling • Linking • Make NK. BIN Image • Connect via Ethernet, Parallel, or JTAG • Copy NK. BIN to device • Start Windows CE Debug Monitor Iterative Process

Creating a Platform C B D

Creating a Platform (continued) C B D

Creating a Platform (continued) C B D

Creating a Platform (continued) C B D

Building a Platform C B D

Making an Image C All. BIB Files CE. BIB All. REG Files REGINIT. INI File. System(. DAT) Files INITOBJ. DAT All Default Database (. DB) Files INITDB. INI Compress REGINIT. INI DEFAULT. FDF Language Strings DLLs and EXEs as per CE. BIB Merge B D NK. BIN

u. Setting up the CE Device n Setup Device n The Board Support Package (BSP) n Set up Download Services n Ethernet Settings n BOOTME Record n Set Current Device n Download From Platform Builder to a CE Device

Setup Device n Cables Connecting Dev Workstation n Download Adapter Settings n Video Adapter Settings n Device-Specific Configuration Issues

The Board Support Package (BSP) n n n Device-Specific Files l Boot Loader l OEM Adaptation Layer (OAL) l Device Drivers Platform Builder Includes Some. BSPs l CEPC l ODO BSP Location: l wince 300platform

Set up Download Services C B D

Ethernet Settings C B D

BOOTME Record C B D

Set Current Device C B D

Download From Platform Builder to a Windows CE Device C B D

Demonstration: Configuration, Build and Download

Lab. A: Configuring, Building and Downloading Windows CE

u Modifying a Platform n Choosing a Reference Configuration n Directory Structure of Platform Builder n Platform Settings n Modifying Configuration Files n Building a Selected Component

Choosing a Reference Configuration n Microsoft provides eight reference configurations n MINKERN: Memory-minimal version of Windows CE n l Memory, process, and file management l Heap and memory allocation l Registry and databases MININPUT: Minimal version of Windows CE l User input l Native driver support (keyboard, display)

Choosing a Reference Configuration c( ontinued) n MINCOMM: Minimal version of Windows CE with communications l Data communication : IRDA, Serial, TAPI, l Networking: TCP/IP, PPP, Win. Inet, Secure Socket n MINGDI: Minimal version of Windows CE with graphical device interface support n MINWMGR: Includes most of the main modules and components l Window management, graphics, and drawing support l COM support l Communication

Choosing a Reference Configuration c( ontinued) n n MINSHELL: Nearly complete version of Windows CE l Command processor (similar to CMD. EXE) l Task manager MAXALL: Includes most modules and components l Microsoft Message Queue (MSMQ) l Pocket Word, Pocket Internet Explorer n IESAMPLE: Sample version with Internet Explorer 4 n MAXDX: Direct. X

Directory Structure of Platform Builder n The Platform Directory n The Public Directory n The SDK Directory n The Others Directory

The Platform Directory n Hardware-specific files n Location: %_WINCEROOT%Platform n Each directory represents a Windows CE–specific platform adaptation n l CEPC for x 86 reference platform l ODO for Hitachi reference platform l ODODub for ODO with dial-up boot loader l SDB 8 XX for Blue Planet reference platform Place your platform-specific files in this directory

The Public Directory n Platform-independent set of components and configurations n Location: %_WINCEROOT%Public n Three types of subdirectories: l Module and component subdirectories (Common, Wceshellfe, Wceappsfe, IE, MSMQ) l Reference configuration subdirectories (Minshell, Maxall, etc. ) l Custom configuration subdirectories

The SDK Directory n Location: %_WINCEROOT%SDK n Contains tools and library to support Platform Builder l Processor compilers (x 86, SH 3, Arm, MIPS) l Development tools l Remote tools

The Others Directory n Location: %_WINCEROOT%OTHERS n Contains: l Run-time libraries (VB, MFC, ATL) l Platform Manager component l ATL and MFC Samples l Device driver test tools

Platform Settings

Modifying Configuration Files n . BIB files n . REG files n . DAT files n . DB files

The Configuration Files: . BIB Files n Indicate module/component to be included in the image n Text files with four types of sections: l The FILES section: Memory reservation for static data files ; Name Path Memory Type --------------------------Tahoma. ttf $(_FLATRELEASEDIR)Tahoma. ttf NK SHU l The MODULES section: Specifies object module to be loaded in memory Taskman. exe $(_FLATRELEASEDIR)Taskman. exe NK

The Configuration Files: . BIB Files c( ontinued) l The MEMORY section: Platform memory information Name Start address Size(bytes) Type -----------------------NK 8 C 800000 00800000 RAMIMAGE RAM 8 C 050000 007 AFFFF RAM l The CONFIG section: Define other image information (compression, ROM size)

The Configuration Files: . REG Files n n Define default registry settings l COMMON. REG, IE. REG, MSMQ. REG, WCEAPPS. REG, WCESHELL. REG - registry settings for Windows CE modules l PLATFORM. REG: platform-dependent registry settings (device drivers entries) l PROJECT. REG: Application entries, autolaunch As a. reg file in Windows NT [HKEY_LOCAL_MACHINE]Init “Launch 10”=“shell. exe” “Launch 20”=“device. exe”

The Configuration Files: . DAT Files n n Define folder structures of your image l COMMON. DAT, IE. DAT, MSMQ. DAT, WCEAPPS. DAT, WCESHELL. DAT l PLATFORM. DAT l PROJECT. DAT Example: Root: -Directory(“Program Files”) Directory(“Program Files”): -Directory(“My Projects”) Root: -Directory(“My Documents”) Directory(“My Documents”): -File(“My. File. doc”)

The Configuration Files: . DB Files Define default image databases n COMMON. DB, WCEAPPS. DB, WCESHELL. DB n PLATFORM. DB n PROJECT. DB

Building a Selected Component

Lab B: Fine -Tuning the Build Process

Understanding the Build Process n Overview of the Build Process n Step 1: System Generation n Step 2: Compile and Link Phase n Step 3: Building the Flat Release Directory n Step 4: Making an (NK. BIN) Image

Overview of the Build Process COMMON DCOM DIRECTX IE MSMQ SCRIPT SERVERS WCEAPPSFE WCESHELLFE Step 1. System Generation . . cesysgenddk. . cesysgenoak. . cesysgensdk Step 2. Compile & Link. . platform. . Step 3. Build Release Directory C: WINCE 300PUBLIC pc 2 Min. KernRel. Dir Step 4. Make Image X 86_Debug> NK. BIN

Step 1: System Generation (CESYSGEN. BAT) Complete header files (. h) System-specific header files SYSGEN. BAT Complete system libraries Linked libraries Module definitions (. def) Specific. def files Cesysgen. bat

Step 2: Compile and Link Phase n Compile source code (directories and subdirectories) n Process l Uses DIRS files to determine which subdir to compile l Uses SOURCES files to determine which files to compile l Calls NMAKE. EXE to compile and link object modules l Creates a binary file into a “target” folder for. exe, . dll (ex : TargetShxSh 3CEDebug) l Creates a binary file into a “lib” folder for. lib (ex : LibShxSh 3CEDebug)

Step 2: Compile and Link Phase (continued) n DIRS file l Lists subdirectories to build l Subdirectories can contain DIRS files Example : DIRS = Display Mouse Keyboard Ethernet

Step 2: Compile and Link Phase (continued) n SOURCES file l Provides build. exe information, i. e. , which file to compile, which type of module to build (. exe, . dll, . lib) Example: TARGETNAME = Kbdmouse TARGETTYPE = Dynalink DLLENTRY = Dll. Main TARGETLIBS = $(_COMMONSDKROOT)Lib$(_CPUINDPATH)Coredll. lib INCLUDES = $(_COMMONSDKROOT)Inc SOURCES = ioport. cpp vgaports. cpp

Step 3: Building the Flat Release Directory n Copies all platform files in the release directory n Copies all binaries in the release directory n Build all Platform Builder Projectspbp) ( at the end of this step

Step 4: Making an (NK. BIN) Image n Merges release folder files to make the Windows CE image n Process l Merge configuration files: All. bib files => CE. BIB (Windows CE files to be combined) All. reg files => REGINIT. INI (entire default registry) All. dat files => INITOBJ. DAT (directories, file location) All. db files => INITDB. INI (default databases) l Compress reginit. ini in a binary registry file (DEFAULT. FDF) l Replace resources in. exe and. dll for language adaptation l From ce. bib, combine binaries and files into a Windows CE image (NK. BIN)

u Adding Components to the Platform Builder Catalog n Creating a Component File n The CECInfo Block n The Component. Type Block n The Implementation Block n The Build. Method Block n Adding a Component File to the Catalog

Creating a Component File n List of blocks in a text file that describes components to be included in the catalog n Four types of blocks: l CECInfo Block l Component. Type block l Implementation block l Build. Method block

The CECInfo Block n Information about CEC file n Example: CECInfo ( Name(cepc) GUID({1850 C 9 B 1 -98 A 2 -11 d 3 -993 F-00105 AC 7264 F}) CECVersion(3. 00) Vendor("Microsoft") Description("CEPC components") )

The Component. Type Block n Component information to be associated with it n Example: Component. Type ( Name (“OAL”) Description(“OEM Adaptation Layer”) Vendor (“Vendor name”) GUID( “{B 3509 B 44 -F 1 E 4 -11 D 2 -85 F 6 -004005365450}”) Implementations( Implementation( … )

The Implementation Block n Defines implementation for a component n Example: Implementation ( Name (“Keyboard”) Description(“Keyboard Driver Tests”) Vendor (“Vendor name”) Date( “ 2000 -10 -31” ) GUID( {B 45875 B 0 -C 958 -4288 -9139 -0589 CAD 59 E 6 C} ) CPU("default") Children () Build. Methods( Build. Method( … )

The Build. Method Block n Provides information needed to build the component n Example: Build. Method( Step( “BSP” ) GUID( {EE 70 A 156 -867 F-4 ba 7 -993 F-2 D 04 D 98 F 47 EF} ) Input. Files() Output. Files() Action('#BUILD(SOURCES, "$(_WINCEROOT)othersddtk 30testsrcrealtime")')

Valid Actions Cesysgen BSP Step Buildrel Make. Img Step step Step #BUILD(DIR, …) NO YES NO NO #BUILD(SOURCES, …) NO YES NO NO #BUILD(MAK, …) NO YES NO NO #CUSTOM(…, …) NO YES NO #COPY(…, …) YES NO #ENV(…, …) NO YES

The Build. Method Block (continued) n Three types of build methods: l Build projects defined by DIRS or SOURCES files: #BUILD(SOURCES, “$(_WINCEROOT)PlatformCepcDriversPcmcia”) #BUILD(DIRS, ”$(_WINCEROOT)PlatformSherryKernel”) l Build projects defined by a platform builder project: #BUILD(PBP, ”$(_WINCEROOT)PublicMyplatMycompSimple. pbp”) l Copy the module directly in the $_FLATRELEASEDIR: #COPY(“$(_TARGETPLATROOT)DriversMouse)”, “$(_FLATRELEASEDIR)”)

Adding a Component File to the Catalog

Lab C: Customizing the Platform Builder Catalog

Review n Introduction to Platform Builder n Platform Development Life Cycle n Setting up the CE Device n Modifying a Platform n Understanding the Build Process n Adding Components to the Platform Builder Catalog