module 2: configuring windows ce
DESCRIPTION
Module 2: Configuring Windows CE. Overview. Introduction to Platform Builder Platform Development Life Cycle Setting up the CE Device Modifying a Platform Understanding the Build Process Adding Components to the Platform Builder Catalog. Introduction to Platform Builder. - PowerPoint PPT PresentationTRANSCRIPT
![Page 1: Module 2: Configuring Windows CE](https://reader036.vdocument.in/reader036/viewer/2022062315/56815930550346895dc663af/html5/thumbnails/1.jpg)
Module 2: Configuring Windows CE
![Page 2: Module 2: Configuring Windows CE](https://reader036.vdocument.in/reader036/viewer/2022062315/56815930550346895dc663af/html5/thumbnails/2.jpg)
Overview
Introduction to Platform Builder
Platform Development Life Cycle
Setting up the CE Device
Modifying a Platform
Understanding the Build Process
Adding Components to the Platform Builder Catalog
![Page 3: Module 2: Configuring Windows CE](https://reader036.vdocument.in/reader036/viewer/2022062315/56815930550346895dc663af/html5/thumbnails/3.jpg)
Introduction to Platform Builder
Windows CE OS Configurations
Embedded Windows CE Development Tools
Compilers IDE-based debugger Windows CE remote tools Export SDK
Integrated Development Environment (IDE)
Run-Time Libraries
Sample Code
![Page 4: Module 2: Configuring Windows CE](https://reader036.vdocument.in/reader036/viewer/2022062315/56815930550346895dc663af/html5/thumbnails/4.jpg)
Platform Development Life Cycle
Configure Platform•Create Platform•Modify Platform
•Modify OAL•Modify Configuration Files•Bootloader•Device Drivers•Applications•Export SDK•Add components to catalog
Build•Make Platform Headers•Compiling•Linking•Make NK.BIN Image
Download•Connect via Ethernet, Parallel, or JTAG•Copy NK.BIN to device•Start Windows CE Debug Monitor
Iterative Process
![Page 5: Module 2: Configuring Windows CE](https://reader036.vdocument.in/reader036/viewer/2022062315/56815930550346895dc663af/html5/thumbnails/5.jpg)
Creating a Platform
C B D
![Page 6: Module 2: Configuring Windows CE](https://reader036.vdocument.in/reader036/viewer/2022062315/56815930550346895dc663af/html5/thumbnails/6.jpg)
Creating a Platform (continued)
C B D
![Page 7: Module 2: Configuring Windows CE](https://reader036.vdocument.in/reader036/viewer/2022062315/56815930550346895dc663af/html5/thumbnails/7.jpg)
Creating a Platform (continued)
C B D
![Page 8: Module 2: Configuring Windows CE](https://reader036.vdocument.in/reader036/viewer/2022062315/56815930550346895dc663af/html5/thumbnails/8.jpg)
Creating a Platform (continued)
C B D
![Page 9: Module 2: Configuring Windows CE](https://reader036.vdocument.in/reader036/viewer/2022062315/56815930550346895dc663af/html5/thumbnails/9.jpg)
Building a Platform
C B D
![Page 10: Module 2: Configuring Windows CE](https://reader036.vdocument.in/reader036/viewer/2022062315/56815930550346895dc663af/html5/thumbnails/10.jpg)
Making an Image
All .BIB Files
All .REG Files
FileSystem(.DAT) Files
All Default Database (.DB) Files
CompressREGINIT.INI
NK.BIN
Language Strings
DLLs and EXEs as per CE.BIB
CE.BIB
REGINIT.INI
INITOBJ.DAT
INITDB.INI
DEFAULT .FDF
C B D
Merge
![Page 11: Module 2: Configuring Windows CE](https://reader036.vdocument.in/reader036/viewer/2022062315/56815930550346895dc663af/html5/thumbnails/11.jpg)
Setting up the CE Device
Setup Device
The Board Support Package (BSP)
Set up Download Services
Ethernet Settings
BOOTME Record
Set Current Device
Download From Platform Builder to a CE Device
![Page 12: Module 2: Configuring Windows CE](https://reader036.vdocument.in/reader036/viewer/2022062315/56815930550346895dc663af/html5/thumbnails/12.jpg)
Setup Device
Cables Connecting Dev Workstation
Download Adapter Settings
Video Adapter Settings
Device-Specific Configuration Issues
![Page 13: Module 2: Configuring Windows CE](https://reader036.vdocument.in/reader036/viewer/2022062315/56815930550346895dc663af/html5/thumbnails/13.jpg)
The Board Support Package (BSP)
Device-Specific Files
Boot Loader
OEM Adaptation Layer (OAL)
Device Drivers
Platform Builder Includes Some BSPs
CEPC
ODO
BSP Location:
\wince300\platform
![Page 14: Module 2: Configuring Windows CE](https://reader036.vdocument.in/reader036/viewer/2022062315/56815930550346895dc663af/html5/thumbnails/14.jpg)
Set up Download Services
C B D
![Page 15: Module 2: Configuring Windows CE](https://reader036.vdocument.in/reader036/viewer/2022062315/56815930550346895dc663af/html5/thumbnails/15.jpg)
Ethernet Settings
C B D
![Page 16: Module 2: Configuring Windows CE](https://reader036.vdocument.in/reader036/viewer/2022062315/56815930550346895dc663af/html5/thumbnails/16.jpg)
BOOTME Record
C B D
![Page 17: Module 2: Configuring Windows CE](https://reader036.vdocument.in/reader036/viewer/2022062315/56815930550346895dc663af/html5/thumbnails/17.jpg)
Set Current Device
C B D
![Page 18: Module 2: Configuring Windows CE](https://reader036.vdocument.in/reader036/viewer/2022062315/56815930550346895dc663af/html5/thumbnails/18.jpg)
Download From Platform Builder to a Windows CE Device
C B D
![Page 19: Module 2: Configuring Windows CE](https://reader036.vdocument.in/reader036/viewer/2022062315/56815930550346895dc663af/html5/thumbnails/19.jpg)
Demonstration: Configuration, Build and Download
![Page 20: Module 2: Configuring Windows CE](https://reader036.vdocument.in/reader036/viewer/2022062315/56815930550346895dc663af/html5/thumbnails/20.jpg)
LabA: Configuring, Building and Downloading Windows CE
![Page 21: Module 2: Configuring Windows CE](https://reader036.vdocument.in/reader036/viewer/2022062315/56815930550346895dc663af/html5/thumbnails/21.jpg)
Modifying a Platform
Choosing a Reference Configuration
Directory Structure of Platform Builder
Platform Settings
Modifying Configuration Files
Building a Selected Component
![Page 22: Module 2: Configuring Windows CE](https://reader036.vdocument.in/reader036/viewer/2022062315/56815930550346895dc663af/html5/thumbnails/22.jpg)
Choosing a Reference Configuration
Microsoft provides eight reference configurations
MINKERN: Memory-minimal version of Windows CE
Memory, process, and file management
Heap and memory allocation
Registry and databases
MININPUT: Minimal version of Windows CE
User input
Native driver support (keyboard, display)
![Page 23: Module 2: Configuring Windows CE](https://reader036.vdocument.in/reader036/viewer/2022062315/56815930550346895dc663af/html5/thumbnails/23.jpg)
Choosing a Reference Configuration (continued)
MINCOMM: Minimal version of Windows CE with communications Data communication : IRDA, Serial, TAPI, Networking: TCP/IP, PPP, WinInet, Secure Socket
MINGDI: Minimal version of Windows CE with graphical device interface support
MINWMGR: Includes most of the main modules and components Window management, graphics, and drawing support COM support Communication
![Page 24: Module 2: Configuring Windows CE](https://reader036.vdocument.in/reader036/viewer/2022062315/56815930550346895dc663af/html5/thumbnails/24.jpg)
Choosing a Reference Configuration (continued)
MINSHELL: Nearly complete version of Windows CE
Command processor (similar to CMD.EXE) Task manager
MAXALL: Includes most modules and components
Microsoft Message Queue (MSMQ) Pocket Word, Pocket Internet Explorer
IESAMPLE: Sample version with Internet Explorer 4
MAXDX: DirectX
![Page 25: Module 2: Configuring Windows CE](https://reader036.vdocument.in/reader036/viewer/2022062315/56815930550346895dc663af/html5/thumbnails/25.jpg)
Directory Structure of Platform Builder
The Platform Directory
The Public Directory
The SDK Directory
The Others Directory
![Page 26: Module 2: Configuring Windows CE](https://reader036.vdocument.in/reader036/viewer/2022062315/56815930550346895dc663af/html5/thumbnails/26.jpg)
The Platform Directory
Hardware-specific files
Location: %_WINCEROOT%\Platform
Each directory represents a Windows CE–specific platform adaptation
CEPC for x86 reference platform
ODO for Hitachi reference platform
ODODub for ODO with dial-up boot loader
SDB8XX for Blue Planet reference platform
Place your platform-specific files in this directory
![Page 27: Module 2: Configuring Windows CE](https://reader036.vdocument.in/reader036/viewer/2022062315/56815930550346895dc663af/html5/thumbnails/27.jpg)
The Public Directory
Platform-independent set of components and configurations
Location: %_WINCEROOT%\Public
Three types of subdirectories:
Module and component subdirectories (Common, Wceshellfe, Wceappsfe, IE, MSMQ)
Reference configuration subdirectories (Minshell, Maxall, etc.)
Custom configuration subdirectories
![Page 28: Module 2: Configuring Windows CE](https://reader036.vdocument.in/reader036/viewer/2022062315/56815930550346895dc663af/html5/thumbnails/28.jpg)
The SDK Directory
Location: %_WINCEROOT%\SDK
Contains tools and library to support Platform Builder
Processor compilers (x86, SH3, Arm, MIPS)
Development tools
Remote tools
![Page 29: Module 2: Configuring Windows CE](https://reader036.vdocument.in/reader036/viewer/2022062315/56815930550346895dc663af/html5/thumbnails/29.jpg)
The Others Directory
Location: %_WINCEROOT%\OTHERS
Contains:
Run-time libraries (VB, MFC, ATL)
Platform Manager component
ATL and MFC Samples
Device driver test tools
![Page 30: Module 2: Configuring Windows CE](https://reader036.vdocument.in/reader036/viewer/2022062315/56815930550346895dc663af/html5/thumbnails/30.jpg)
Platform Settings
![Page 31: Module 2: Configuring Windows CE](https://reader036.vdocument.in/reader036/viewer/2022062315/56815930550346895dc663af/html5/thumbnails/31.jpg)
Modifying Configuration Files
.BIB files
.REG files
.DAT files
.DB files
![Page 32: Module 2: Configuring Windows CE](https://reader036.vdocument.in/reader036/viewer/2022062315/56815930550346895dc663af/html5/thumbnails/32.jpg)
The Configuration Files: .BIB Files
Indicate module/component to be included in the image
Text files with four types of sections:
The FILES section: Memory reservation for static data files
The MODULES section: Specifies object module to be loaded in memory
;Name Path Memory Type-----------------------------------------------------Tahoma.ttf $(_FLATRELEASEDIR)\Tahoma.ttf NK SHU
;Name Path Memory Type-----------------------------------------------------Tahoma.ttf $(_FLATRELEASEDIR)\Tahoma.ttf NK SHU
Taskman.exe $(_FLATRELEASEDIR)\Taskman.exe NK Taskman.exe $(_FLATRELEASEDIR)\Taskman.exe NK
![Page 33: Module 2: Configuring Windows CE](https://reader036.vdocument.in/reader036/viewer/2022062315/56815930550346895dc663af/html5/thumbnails/33.jpg)
The Configuration Files: .BIB Files (continued)
The MEMORY section: Platform memory information
The CONFIG section: Define other image information (compression, ROM size)
Name Start address Size(bytes) Type-----------------------------------------------NK 8C800000 00800000 RAMIMAGERAM 8C050000 007AFFFF RAM
Name Start address Size(bytes) Type-----------------------------------------------NK 8C800000 00800000 RAMIMAGERAM 8C050000 007AFFFF RAM
![Page 34: Module 2: Configuring Windows CE](https://reader036.vdocument.in/reader036/viewer/2022062315/56815930550346895dc663af/html5/thumbnails/34.jpg)
The Configuration Files: .REG Files
Define default registry settings
COMMON.REG, IE.REG, MSMQ.REG, WCEAPPS.REG, WCESHELL.REG - registry settings for Windows CE modules
PLATFORM.REG: platform-dependent registry settings (device drivers entries)
PROJECT.REG: Application entries, autolaunch
As a .reg file in Windows NT
[HKEY_LOCAL_MACHINE]\Init“Launch10”=“shell.exe”“Launch20”=“device.exe”
[HKEY_LOCAL_MACHINE]\Init“Launch10”=“shell.exe”“Launch20”=“device.exe”
![Page 35: Module 2: Configuring Windows CE](https://reader036.vdocument.in/reader036/viewer/2022062315/56815930550346895dc663af/html5/thumbnails/35.jpg)
The Configuration Files: .DAT Files
Define folder structures of your image
COMMON.DAT, IE.DAT, MSMQ.DAT, WCEAPPS.DAT, WCESHELL.DAT
PLATFORM.DAT
PROJECT.DAT
Example:
Root:-Directory(“Program Files”)Directory(“\Program Files”):-Directory(“My Projects”)
Root:-Directory(“My Documents”)Directory(“\My Documents”):-File(“MyFile.doc”)
Root:-Directory(“Program Files”)Directory(“\Program Files”):-Directory(“My Projects”)
Root:-Directory(“My Documents”)Directory(“\My Documents”):-File(“MyFile.doc”)
![Page 36: Module 2: Configuring Windows CE](https://reader036.vdocument.in/reader036/viewer/2022062315/56815930550346895dc663af/html5/thumbnails/36.jpg)
The Configuration Files: .DB Files
Define default image databases
COMMON.DB, WCEAPPS.DB, WCESHELL.DB
PLATFORM.DB
PROJECT.DB
![Page 37: Module 2: Configuring Windows CE](https://reader036.vdocument.in/reader036/viewer/2022062315/56815930550346895dc663af/html5/thumbnails/37.jpg)
Building a Selected Component
![Page 38: Module 2: Configuring Windows CE](https://reader036.vdocument.in/reader036/viewer/2022062315/56815930550346895dc663af/html5/thumbnails/38.jpg)
Lab B: Fine -Tuning the Build Process
![Page 39: Module 2: Configuring Windows CE](https://reader036.vdocument.in/reader036/viewer/2022062315/56815930550346895dc663af/html5/thumbnails/39.jpg)
Understanding the Build Process
Overview of the Build Process
Step 1: System Generation
Step 2: Compile and Link Phase
Step 3: Building the Flat Release Directory
Step 4: Making an (NK.BIN) Image
![Page 40: Module 2: Configuring Windows CE](https://reader036.vdocument.in/reader036/viewer/2022062315/56815930550346895dc663af/html5/thumbnails/40.jpg)
Overview of the Build Process
COMMONDCOM
DIRECTXIE
MSMQSCRIPT
SERVERSWCEAPPSFE
WCESHELLFE
..\cesysgen\ddk
..\cesysgen\oak
..\cesysgen\sdk
Step 1. System Generation
Step 2. Compile & Link
Step 3. Build Release Directory
Step 4. Make Image NK.BIN
..\platform\..
C:\WINCE300\PUBLIC\pc2MinKern\RelDir\
X86_Debug>
![Page 41: Module 2: Configuring Windows CE](https://reader036.vdocument.in/reader036/viewer/2022062315/56815930550346895dc663af/html5/thumbnails/41.jpg)
Step 1: System Generation (CESYSGEN.BAT)
Complete header files (.h)
Complete system libraries
Module definitions (.def)
Cesysgen.bat
System-specific header files
Linked libraries
Specific .def files
SYSGEN.BAT
![Page 42: Module 2: Configuring Windows CE](https://reader036.vdocument.in/reader036/viewer/2022062315/56815930550346895dc663af/html5/thumbnails/42.jpg)
Step 2: Compile and Link Phase
Compile source code (directories and subdirectories)
Process
Uses DIRS files to determine which subdir to compile
Uses SOURCES files to determine which files to compile
Calls NMAKE.EXE to compile and link object modules
Creates a binary file into a “target” folder for .exe, .dll (ex : Target\Shx\Sh3\CE\Debug)
Creates a binary file into a “lib” folder for .lib(ex : Lib\Shx\Sh3\CE\Debug)
![Page 43: Module 2: Configuring Windows CE](https://reader036.vdocument.in/reader036/viewer/2022062315/56815930550346895dc663af/html5/thumbnails/43.jpg)
Step 2: Compile and Link Phase (continued)
DIRS file
Lists subdirectories to build
Subdirectories can contain DIRS files
Example :
DIRS =\Display \Mouse \Keyboard \Ethernet
DIRS =\Display \Mouse \Keyboard \Ethernet
![Page 44: Module 2: Configuring Windows CE](https://reader036.vdocument.in/reader036/viewer/2022062315/56815930550346895dc663af/html5/thumbnails/44.jpg)
Step 2: Compile and Link Phase (continued) SOURCES file
Provides build.exe information, i.e., which file to compile, which type of module to build (.exe, .dll, .lib)
Example:
TARGETNAME = KbdmouseTARGETTYPE = DynalinkDLLENTRY = DllMainTARGETLIBS = \$(_COMMONSDKROOT)\Lib\$(_CPUINDPATH)\Coredll.libINCLUDES = $(_COMMONSDKROOT)\IncSOURCES = \
ioport.cpp \vgaports.cpp \
TARGETNAME = KbdmouseTARGETTYPE = DynalinkDLLENTRY = DllMainTARGETLIBS = \$(_COMMONSDKROOT)\Lib\$(_CPUINDPATH)\Coredll.libINCLUDES = $(_COMMONSDKROOT)\IncSOURCES = \
ioport.cpp \vgaports.cpp \
![Page 45: Module 2: Configuring Windows CE](https://reader036.vdocument.in/reader036/viewer/2022062315/56815930550346895dc663af/html5/thumbnails/45.jpg)
Step 3: Building the Flat Release Directory
Copies all platform files in the release directory
Copies all binaries in the release directory
Build all Platform Builder Projects (pbp) at the end of this step
![Page 46: Module 2: Configuring Windows CE](https://reader036.vdocument.in/reader036/viewer/2022062315/56815930550346895dc663af/html5/thumbnails/46.jpg)
Step 4: Making an (NK.BIN) Image
Merges release folder files to make the Windows CE image
Process
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)
Compress reginit.ini in a binary registry file (DEFAULT.FDF)
Replace resources in .exe and .dll for language adaptation
From ce.bib, combine binaries and files into a Windows CE image (NK.BIN)
![Page 47: Module 2: Configuring Windows CE](https://reader036.vdocument.in/reader036/viewer/2022062315/56815930550346895dc663af/html5/thumbnails/47.jpg)
Adding Components to the Platform Builder Catalog
Creating a Component File
The CECInfo Block
The ComponentType Block
The Implementation Block
The BuildMethod Block
Adding a Component File to the Catalog
![Page 48: Module 2: Configuring Windows CE](https://reader036.vdocument.in/reader036/viewer/2022062315/56815930550346895dc663af/html5/thumbnails/48.jpg)
Creating a Component File
List of blocks in a text file that describes components to be included in the catalog
Four types of blocks:
CECInfo Block
ComponentType block
Implementation block
BuildMethod block
![Page 49: Module 2: Configuring Windows CE](https://reader036.vdocument.in/reader036/viewer/2022062315/56815930550346895dc663af/html5/thumbnails/49.jpg)
The CECInfo Block
Information about CEC file
Example:
CECInfo (
Name(cepc)
GUID({1850C9B1-98A2-11d3-993F-00105AC7264F})
CECVersion(3.00)
Vendor("Microsoft")
Description("CEPC components")
)
![Page 50: Module 2: Configuring Windows CE](https://reader036.vdocument.in/reader036/viewer/2022062315/56815930550346895dc663af/html5/thumbnails/50.jpg)
The ComponentType Block
Component information to be associated with it
Example:
ComponentType (Name (“OAL”) Description(“OEM Adaptation Layer”)Vendor (“Vendor name”) GUID( “{B3509B44-F1E4-11D2-85F6-004005365450}”)Implementations(Implementation(…
)
ComponentType (Name (“OAL”) Description(“OEM Adaptation Layer”)Vendor (“Vendor name”) GUID( “{B3509B44-F1E4-11D2-85F6-004005365450}”)Implementations(Implementation(…
)
![Page 51: Module 2: Configuring Windows CE](https://reader036.vdocument.in/reader036/viewer/2022062315/56815930550346895dc663af/html5/thumbnails/51.jpg)
The Implementation Block
Defines implementation for a component
Example:
Implementation (Name (“Keyboard”) Description(“Keyboard Driver Tests”)Vendor (“Vendor name”) Date( “2000-10-31” )GUID( {B45875B0-C958-4288-9139-0589CAD59E6C} )CPU("default")Children ()BuildMethods(BuildMethod(…
)
Implementation (Name (“Keyboard”) Description(“Keyboard Driver Tests”)Vendor (“Vendor name”) Date( “2000-10-31” )GUID( {B45875B0-C958-4288-9139-0589CAD59E6C} )CPU("default")Children ()BuildMethods(BuildMethod(…
)
![Page 52: Module 2: Configuring Windows CE](https://reader036.vdocument.in/reader036/viewer/2022062315/56815930550346895dc663af/html5/thumbnails/52.jpg)
The BuildMethod Block
Provides information needed to build the component
Example:
BuildMethod(Step( “BSP” )GUID( {EE70A156-867F-4ba7-993F-2D04D98F47EF} )InputFiles()OutputFiles()Action('#BUILD(SOURCES,
"$(_WINCEROOT)\others\ddtk30\testsrc\realtime")')
BuildMethod(Step( “BSP” )GUID( {EE70A156-867F-4ba7-993F-2D04D98F47EF} )InputFiles()OutputFiles()Action('#BUILD(SOURCES,
"$(_WINCEROOT)\others\ddtk30\testsrc\realtime")')
![Page 53: Module 2: Configuring Windows CE](https://reader036.vdocument.in/reader036/viewer/2022062315/56815930550346895dc663af/html5/thumbnails/53.jpg)
Valid Actions
Actions Cesysgen Step
BSP Step
Buildrel step
MakeImg Step
#BUILD(DIR,…) NO YES NO NO
#BUILD(SOURCES,…)
NO YES NO NO
#BUILD(MAK, …) NO YES NO NO
#CUSTOM(…,…) NO YES YES NO
#COPY(…,…) YES NO YES NO
#ENV(…,…) NO YES NO YES
![Page 54: Module 2: Configuring Windows CE](https://reader036.vdocument.in/reader036/viewer/2022062315/56815930550346895dc663af/html5/thumbnails/54.jpg)
The BuildMethod Block (continued) Three types of build methods:
Build projects defined by DIRS or SOURCES files:
Build projects defined by a platform builder project:
Copy the module directly in the $_FLATRELEASEDIR:
#BUILD(SOURCES,“$(_WINCEROOT)\Platform\Cepc\Drivers\Pcmcia”)
#BUILD(DIRS,”$(_WINCEROOT)\Platform\Sherry\Kernel”)
#BUILD(SOURCES,“$(_WINCEROOT)\Platform\Cepc\Drivers\Pcmcia”)
#BUILD(DIRS,”$(_WINCEROOT)\Platform\Sherry\Kernel”)
#BUILD(PBP,”$(_WINCEROOT)\Public\Myplat\Mycomp\Simple.pbp”)#BUILD(PBP,”$(_WINCEROOT)\Public\Myplat\Mycomp\Simple.pbp”)
#COPY(“$(_TARGETPLATROOT)\Drivers\Mouse)”,“$(_FLATRELEASEDIR)”)
#COPY(“$(_TARGETPLATROOT)\Drivers\Mouse)”,“$(_FLATRELEASEDIR)”)
![Page 55: Module 2: Configuring Windows CE](https://reader036.vdocument.in/reader036/viewer/2022062315/56815930550346895dc663af/html5/thumbnails/55.jpg)
Adding a Component File to the Catalog
![Page 56: Module 2: Configuring Windows CE](https://reader036.vdocument.in/reader036/viewer/2022062315/56815930550346895dc663af/html5/thumbnails/56.jpg)
Lab C: Customizing the Platform Builder Catalog
![Page 57: Module 2: Configuring Windows CE](https://reader036.vdocument.in/reader036/viewer/2022062315/56815930550346895dc663af/html5/thumbnails/57.jpg)
Review
Introduction to Platform Builder
Platform Development Life Cycle
Setting up the CE Device
Modifying a Platform
Understanding the Build Process
Adding Components to the Platform Builder Catalog