nullnullIntroduction to Embedded Software DevelopmentSchool of software Engineering
20055. OS DevelopmentAgendaAgendaIntroduction to Platform Builder
User Interface
Catalog and Feature
Platform Configuration
Platform Creation workflow
The Build System
Catalog CustomizationAgendaAgendaIntroduction to Platform Builder
User Interface
Catalog and Feature
Platform Configuration
Platform Creation workflow
The Build System
Catalog CustomizationIntroduction to Platform BuilderIntroduction to Platform BuilderAn integrated development environment (IDE) for building customized embedded platforms based on the Microsoft Windows CE operating system (OS).
Comes with all the development tools necessary for you to design, create, build, test, and debug a Windows CE–based platform.
The IDE provides a single integrated workspace in which you can work on both platforms and projects. What can PB do? (1)What can PB do? (1)The New Platform Wizard assists in creating a new platform.
The BSP Wizard streamlines the process of creating a board support package (BSP).
The Catalog displays a list of OS features that can be used to customize a platform.
Automated dependency checking ensures all features required to support a platform configuration are included in the OS image.
The Export Wizard exports custom Catalog features to other Platform Builder users.
Base configurations provide starting points for creating custom OSs. What can PB do? (2)What can PB do? (2)The Windows CE Test Kit provides a collection of driver-testing tools.
The kernel debugger debugs a customized OS image and provides the user with information regarding the performance of that image.
The application debugger debugs applications on a customized OS image.
The remote tools perform a variety of debugging and information gathering tasks on a Windows CE–based target device.
The Emulator speeds and simplifies development by emulating hardware, allowing the user to test platforms and applications on a development workstation.
The Export SDK Wizard enables the user to export a custom software development kit (SDK). Review of Platform WizardReview of Platform WizardThe New Platform Wizard guides you through the process of creating a Windows CE–based platform.Platform Wizard 4 StepsPlatform Wizard 4 StepsSelecting an installed board support package (BSP).
Selecting a platform configuration for your device.
Selecting a configuration variant that is appropriate for your device.
Selecting additional features for your platform. Platform Builder UIPlatform Builder UIText EditorWorkspace WindowSearch TextConnectivity Device NameOutput WindowsDebug tool status indicatorsMultiple views of the workspaceBuild ConfigurationCatalog ViewCatalog ViewConsists of a list of BSPs, drivers, configurations for core OS, and Platform Manager transports. The items in the Catalog represent ALL the technologies you can select when designing your Microsoft Windows CE based platform. Catalog organizationCatalog organization Board Support Packages
Core OS: includes headless devices and display-based devices:
Applications and Services Development
Applications - End User
Communication Services and Networking
Core OS Services
File Systems and Data Store
Fonts
International
Internet Client Services
Multimedia Technologies
Security
Shell and User Interface
Device Drivers
Platform Manager Feature Group and FeatureFeature Group and FeatureA feature group defines a general type of feature without specifying a specific implementation. A feature group is resolved when you select an implementation and thus specify the functionality.
A feature is any logical grouping of OS components. Feature Icon TypeFeature Icon TypeFeature Icon Type (2)Feature Icon Type (2)Feature PropertyFeature PropertyDisplays information for the selected feature. Feature DependencyFeature DependencyShow the dependency of a selected featureChallenge for EngineerChallenge for EngineerKnow as many features as possibleChallenge for EngineerChallenge for EngineerRequires your experience and knowledge
Can NOT design required platform without this.
Can Windows CE has a Chinese IME?
Does Windows CE support VBScript?
Detailed feature functionality reference at :
About Windows CE.NET -> Catalog FeaturesPlatform SettingPlatform SettingEnables you to view and modify options for individual features and for an entire platform.
Menu : Platform -> Settings…Build Options (1)Build Options (1)Enable CE Target Control Support
Select the Enable CE Target Control Support check box to enable target control support during the boot process. Selecting this also enables Kernel Independent Transport Layer (KITL).
Enable Eboot Space in Memory
Select Enable Eboot Space in Memory to reserve memory space in the Config.bib file. This allows the boot loader to save data that the operating system (OS) can read at boot time.
Enable Event Tracking during Boot
Select Enable Event Tracking to start the event-tracking subsystem.
Enable Full Kernel Mode
Select Enable Full Kernel Mode to run threads in kernel mode. Enabling full kernel mode will leave the entire system vulnerable, but will increase performance.
Enable Image for Flash
Select the Enable Image for Flash check box to allow the image to be written to flash after download. Build Options (2)Build Options (2)Enable Kernel Debugger
Allow the debugger to connect and pass debugging information from the target device to the host device.
Enable KITL
Select the Enable KITL check box to enable KITL. This should be checked to allow communication between the development workstation and the target device. Deselecting this will also deselect Enable CE Target Control Support if it is selected.
Enable Profiling
Select the Enable Profiling check box to enable Windows CE log kernel profiling in the platform image.
Enable Ship Build
This flag can be used to conditionally compile code. If set, the OS will provide verbose debug messages to aid debugging.
Flush Events to Release Directory
Select the Flush Events to Release Directory check box to flush events to the release directory. Selecting this also turns on Event Tracking. Platform Configuration FilesPlatform Configuration FilesPlatform Builder uses two general categories of configuration files:
source code configuration files
The Build tool uses source code configuration files to build modules and features, and to build the source code for your operating system (OS) image.
image configuration files
The Make Binary Image Tool calls a number of tools, which use image configuration files to create the OS image.Source code configuration filesSource code configuration filesImage Configuration FilesImage Configuration FilesParameter ViewThe Configuration Files: .BIB FilesThe Configuration Files: .BIB FilesIndicates the modules and components that should 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 SHUTaskman.exe $(_FLATRELEASEDIR)\Taskman.exe NK The Configuration Files: .BIB FilesThe Configuration Files: .BIB FilesMEMORY section
defines the platform memory information
Partitions the physical memory into Data memory and Program memory
The CONFIG section
Is not mandatory
Is used to set properties, such as compression or ROM sizeName Start address Size(bytes) Type
-----------------------------------------------
NK 8C800000 00800000 RAMIMAGE RAM 8C050000 007AFFFF RAMThe Configuration Files: .REG FilesThe Configuration Files: .REG FilesDefine default registry settings
COMMON.REG, IE.REG, WCEAPPS.REG, WCESHELL.REG: define registry settings for Windows CE modules
PLATFORM.REG: platform-dependent registry settings, such as device drivers entries
PROJECT.REG: defines registry settings relative to your project[HKEY_LOCAL_MACHINE\init]
“Launch10”=“shell.exe”
“Launch20”=“device.exe”The Configuration Files: .DAT FilesThe Configuration Files: .DAT FilesDefine folder structures of your image
COMMON.DAT, IE.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”,“\
Windows\Myfile.doc”)The Configuration Files: .DB FilesThe Configuration Files: .DB FilesDefine default image databases
COMMON.DB, WCEAPPS.DB, WCESHELL.DB
These .DB files are the databases relative to the Common, Wceapps, and Wceshell modules
PLATFORM.DB
The PLATFORM.DB file contains the platform-specific default databases
PROJECT.DB
The PROJECT.DB file contains the project-specific default databases Making an ImageMaking an ImageMerges release folder files to make the Windows CE image
Process
Merge configuration files: All .bib files into CE.BIB All .reg files into REGINIT.INI All .dat files into INITOBJ.DAT All .db files into INITDB.INI
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) The Build PhasesThe Build PhasesSysgen phase
Feature Build phase
Release Copy phase
Make Image phasewhen you select the Build Platform command on the Build menu in the IDE, the build system builds a platform in four sequentially executed phases:Sysgen phase tasksSysgen phase tasksLink the corresponding static libraries into modules
Make SDK
filters the system header files, creating headers that only contain prototypes for the functions exported by your platform.
Create Import libraries for the system modules
Build the board support package (BSP)System GenerationSystem Generation
Complete header and source code filesComplete system librariesModule definitions (.def)Cesysgen.batSystem-specific header filesLinked librariesSpecific .def filesSYSGEN.BATFeature Build phase taskFeature Build phase taskAll user features including Platform Builder project (.pbp) files, dirs files, sources files, and makefiles (.mak) files are compiled and built. Release Copy phase taskRelease Copy phase taskCopy all the files you need to make an OS image to the release directory. The modules and files created during the Sysgen phase are copied to this directory first, followed by the files created by the Feature Build phase. Make Image phase taskMake Image phase taskThe files in the release directory are combined in the binary image file Nk.bin.
This phase corresponds to the Make Image command on the Build menu. The Build ProcessThe Build ProcessCOMMON
DATASYNC
DCOM
DIRECTX
IE
RDP
SCRIPT
SERVERS
WCEAPPSFE
WCESHELLFE
…..\cesysgen\ddk
..\cesysgen\oak
..\cesysgen\sdk
\target, \filesStep 1. System GenerationStep 2. BuildStep 3. Building the Release DirectoryStep 4. Making an ImageNK.BIN..\platform\..
\target, \files%_FLATRELEASEDIR%Build ResultBuild Resultnk.bin :
Windows CE binary image data format
when executed, must loaded into memory first.
Organize code and data in sections
nk.nb0 :
Absolute Binary Data Format
Can be flashed into flash ROM
Can be executed by using XIPIntroduction to XIPIntroduction to XIPShort for Execute In Place
An application can execute code directly from read-only memory (ROM) rather than having to load it from random access memory (RAM).
Supported by NOR flashHow to resolve Build ErrorHow to resolve Build ErrorWatch the Output window
No enough hard disk space
Compile & link error
Examine Build.log & Build.err files in WINCE420 root directory
Detailed output informationLeverage your Windows Programming experience and knowledge to solve problems. Explaining Build ErrorsExplaining Build ErrorsErrors during the Sysgen
Caused by missing files, missing configuration of the operating system features, and applications built during the Sysgen phase
Errors during the Module build phases
Compilation errors or unresolved link errors
Errors during the building the release directory phase
File copy errors
Errors during the making an image phase
Romimage.exe failed in CE.BIB
Romimage.exe failed in reginit.ini
Warning: Image exceedsHomeworkHomeworkRead the “CEPC How-to Topics” and “Tutorial: Using Platform Builder with a CEPC” from Online Documentation and try to download and run your windows CE on x86 hardware
Hint :
Make wince boot disk and configure the IP address
Build your WinCE with cepc BSP
Boot a machine with your boot disk
Connect & download with TCP/IPAgendaAgendaIntroduction to Platform Builder
User Interface
Catalog and Feature
Platform Configuration
Platform Creation workflow
The Build System
Catalog CustomizationReview of App developmentReview of App developmentPlatform Creation WorkflowPlatform Creation WorkflowGet BSPs for specified Software Development Board (SDB)
Customize your platform with Platform Builder
Download, Debug and run your Platform via the SDB
Make release build of your platformStep 1 : Get the BSPStep 1 : Get the BSPFrom Microsoft
CEPC
From Third Party OEMs
Motorola Dragon ball
Advantech 7230…
Create our own BSP
To be discussed later…Where can we get BSPs?Install & Use BSPInstall & Use BSPIf BSP is provided as an MSI file, install it like other softwares
If BSP is provided as source code, add the .CEC file to PB
NOTE : You MUST install the corresponding CPU in PB support first.Demo :
Install and Use Motorola Dragon Ball MXL BSPDemo :
Install and Use Motorola Dragon Ball MXL BSPStep 2: Customize your platformStep 2: Customize your platformChoose one of Microsoft provided template and modify it
Customize from the very beginningHLBase and IABaseHLBase and IABaseHL mean headless, that means the OS has no graphic user interface.
If you choose IABase, the OS will include GUIStep 3: Download, Debug and run your Platform via the SDBStep 3: Download, Debug and run your Platform via the SDBGet Eboot or Sboot
Configure network
Configure Serial debug port (optional)
Configure Platform Builder connection
Download OS image to BoardGeneral Routines:Get Eboot or SbootGet Eboot or SbootBootloader is usually a part of BSP provided by the OEMs.
The general purpose of the boot loader is to place the OS image into memory and then jump to the OS startup routine.
Eboot : Ethernet Bootloader
Sboot : Serial Bootloader
Usually stripped in retail buildVariant BootloaderVariant BootloaderFlash into flash Rom
Use boot floppy disk
Use CF card
…Has only one purpose:
Download the OS imageConfigure network for SerialConfigure network for SerialJust plug the serial port connection cable
Shortcoming : too slowConfigure network for EthernetConfigure network for EthernetUsing network hubConfigure network for EthernetConfigure network for EthernetUsing an isolated networkConfigure Serial debug portConfigure Serial debug portPlug the RS232 serial adapter into the ADS board default serial debugport to the Com port on your workstation.
Activate a Hyperterm window by choosing Start Menu → Programs→ Accessories → Hyperterminal → Hyperterminal.HyperterminalHyperterminalConfigure PB connectionConfigure PB connectionFrom Target -> Configure Remote ConnectionConfigure PB connectionConfigure PB connectionEboot will send broadcast package to LAN, Platform Builder receive the message and display the device ID.Download OS image to BoardDownload OS image to BoardFrom PB, click on Target → Download/Initialize.You should be able to see this screen on deviceYou should be able to see this screen on deviceWhere are we?Where are we?Get hardware & BSP from OEMsNeed platform customization?Get platform & SDK from OEMsCustomize your Win CE platformExport your SDKCoding & TestingRelease to ManufactureAgendaAgendaIntroduction to Platform Builder
User Interface
Catalog and Feature
Platform Configuration
Platform Creation workflow
The Build System
Catalog CustomizationPB Directory StructurePB Directory StructureEnvironment VariablesEnvironment Variables%_WINCEROOT% - Root of the Windows CE build install
Typically C:\WINCE500
%_PUBLICROOT% - %_WINCEROOT%\PUBLIC
%_PLATROOT% - %_WINCEROOT%\Platform
Many others
Use ‘set’ in a command prompt build window to see a list of the environment variables currently set. The Platform DirectoryThe Platform DirectoryContains Hardware Platform-specific BSP files
Is located at the path %_WINCEROOT%\Platform
Contains subdirectories
Each subdirectory represents a Windows CE–specific platform adaptation
Each directory contains a dirs file and one or more batch files for unique BSP settings
Place your Hardware Platform-specific files in this directoryThe Public DirectoryThe Public DirectoryContains a platform-independent set of components and configurations
Is located at the path %_WINCEROOT%\Public
Contains subdirectories:
Module and component subdirectories- Common, Wceshellfe, Wceappsfe, IE, Servers
Reference configuration subdirectory- CEBASEThe SDK DirectoryThe SDK DirectoryIs located at the path %_WINCEROOT%\SDK
Contains tools to support Platform Builder
Processor compilers
Development tools
Miscellaneous utilities
The Others DirectoryThe Others DirectoryIs located at the path %_WINCEROOT%\OTHERS
Contains subdirectories:
ATL: Contains ATL headers, libraries and source code for debugging
DOTNET: Contains the .NET processor specific binaries and portable .NET Compact Framework files
MFC: Contains MFC Headers, Libraries and Source Code for debugging
SAMPLES: Contains the MFC and ATL sample applications
WCETK: Contains the Windows CE Test Kit (CETK) processor specific binaries The Private DirectoryThe Private DirectoryIs located at the path %_WINCEROOT%\PRIVATE
Must check option at installation time and agree to Shared Source License terms
You can ship modified versions of the private code with your product!
Premium (“Almost everything”) Source available
Contains source code for:
Kernel
GWES components
Filesys componentsReview of 4 build stepsReview of 4 build stepsOverview of Build SystemOverview of Build SystemThe IDE is a thin client over the command-line tools that make up the build system.
Command line tools use Environment Variables to identify the Build setting and call the compiler & linker
Command line utilities stored at :
%_PUBLICROOT%\COMMON\OAK\MISCEnvironment variablesEnvironment variablesImportant directories
%_WINCEROOT%
%_PublicRoot%
Selected OS feature
SYSGEN_AYGSHELL
SYSGEN_BATTERY
SYSGEN_STANDARDSHELL
Platform->Setting options
IMGAUTOFLUSH
WINCESHIP
IMGRAM64Source code configurationSource code configurationDIRS
SOURCES
MakeFile
makefile.defDIRS FilesDIRS FilesDIRS
Like a “Workspace” contains a list of “projects”
Text file that lists directories containing other DIRS or SOURCES files
BUILD.EXE will read the contents of DIRS files to determine what to build
Example:DIRS=\
Eboot \
Drivers
SOURCESSOURCESSOURCES
List of source code files for the project
TARGETNAME
Name of output target (without extension)
TARGETTYPE
PROGRAM – (.EXE) Application
DYNLINK – (.DLL) Dynamic Link Library
LIBRARY – (.LIB) Static libraryFile organizationFile organizationText file that is included into makefile.def to provide target specific information to the buildUseful Command line toolsUseful Command line toolsWince.bat
Blddemo.bat
Cebuild.bat
Build.exe
Sysgen.bat
Buildrel.bat
Makeimg.exeWince.batWince.batPrepares the development workstation build environment by using three input parameters
%_TGTCPU%
%_TGTPROJ%
%_TGTPLAT%
Ex: wince x86 MYPROJ CEPCBldDemo.bat BldDemo.bat Used to build and create an OS image.
It calls the three tools:
Cebuild.bat: Builds modules, features, and source code for a platform.
Buildrel.bat: Copies the files for a platform to a release directory.Make Binary Image tool
Makeimg.exe Generates an OS image.Build.exeBuild.exeApplication to traverse directory structure and build multiple items
Directory structure defined by DIRS files
Provides automatic dependency
本文档为【5.OS Development】,请使用软件OFFICE或WPS软件打开。作品中的文字与图均可以修改和编辑,
图片更改请在作品中右键图片并更换,文字修改请直接点击文字进行修改,也可以新增和删除文档中的内容。
该文档来自用户分享,如有侵权行为请发邮件ishare@vip.sina.com联系网站客服,我们会及时删除。
[版权声明] 本站所有资料为用户分享产生,若发现您的权利被侵害,请联系客服邮件isharekefu@iask.cn,我们尽快处理。
本作品所展示的图片、画像、字体、音乐的版权可能需版权方额外授权,请谨慎使用。
网站提供的党政主题相关内容(国旗、国徽、党徽..)目的在于配合国家政策宣传,仅限个人学习分享使用,禁止用于任何广告和商用目的。