Dissecting the Windows CE Build Process James Y. Wilson Principal Engineer, Windows Embedded MVP CalAmp, Inc. James Y. Wilson Principal Engineer, Windows.

Slides:



Advertisements
Similar presentations
Operating-System Structures
Advertisements

Device Drivers Witawas Srisa-an Embedded Systems Design and Implementation.
MODULE 3: OS & APP LAYERS. Agenda Preparing and importing a gold image Creating and understanding Install Machines Creating basic Application layers Understanding.
Building Embedded Systems With Windows® CE Platform Builder 3
Creating a Dialog-Based Comet Windows Program Brian Levantine.
Lots of content, the hope is that they will be used as reference material after the presentation.
Premier Director Document Imaging
Tutorial 12: Enhancing Excel with Visual Basic for Applications
SYSTEM PROGRAMMING & SYSTEM ADMINISTRATION
Operating System Security : David Phillips A Study of Windows Rootkits.
Drives, Directories and Files. A computer file is a block of arbitrary information, or resource for storing information. Computer files can be considered.
The Web Warrior Guide to Web Design Technologies
Scripting Automated Solutions for Siemens PLM Software
MC365 Ant. Today We Will Cover: Overview of Ant Installing Ant Using the Ant command line tool Various Ant commands available Using Ant in Eclipse.
14.1 © 2004 Pearson Education, Inc. Exam Planning, Implementing, and Maintaining a Microsoft Windows Server 2003 Active Directory Infrastructure.
A Guide to Oracle9i1 Creating an Integrated Database Application Chapter 8.
Presented by IBM developer Works ibm.com/developerworks/ 2006 January – April © 2006 IBM Corporation. Making the most of Creating Eclipse plug-ins.
Hands-On Microsoft Windows Server 2003 Administration Chapter 5 Administering File Resources.
Lesson 18: Configuring Application Restriction Policies
SETUP AND CONFIGURATIONS WEBLOGIC SERVER. 1.Weblogic Installation 2.Creating domain through configuration wizard 3.Creating domain using existing template.
Application Repackaging - Naushad Ali T Doddamani.
 Visual Studio has great support for building ASP.NET web applications  Real web application development involves more than just copying the files created.
National Instruments Confidential Deployment Techniques for LabVIEW ™ Applications Kennon Cotton LabVIEW R&D Group Manager.
Introduction to The Linaro Toolchain Embedded Processors Training Multicore Software Applications Literature Number: SPRPXXX 1.
1 Introduction to Tool chains. 2 Tool chain for the Sitara Family (but it is true for other ARM based devices as well) A tool chain is a collection of.
Lesson 4 Computer Software
IBM Software Group AIM Enterprise Platform Software IBM z/Transaction Processing Facility Enterprise Edition © IBM Corporation 2005 TPF Users Group.
Chapter-4 Windows 2000 Professional Win2K Professional provides a very usable interface and was designed for use in the desktop PC. Microsoft server system.
Sikuli Ivailo Dinkov QA Engineer PhoneX Team Telerik QA Academy.
SCRAM Software Configuration, Release And Management Background SCRAM has been developed to enable large, geographically dispersed and autonomous groups.
Introduction to Embedded Software Development School of software Engineering OS Development.
© 2008, Renesas Technology America, Inc., All Rights Reserved 1 Introduction Purpose  This training course provides an overview of the installation and.
© 2008, Renesas Technology America, Inc., All Rights Reserved 1 Purpose  This training course describes how to configure the the C/C++ compiler options.
Computing IV Visual C Introduction with OpenCV Example Xinwen Fu.
An intro to programming. The purpose of writing a program is to solve a problem or take advantage of an opportunity Consists of multiple steps:  Understanding.
Chapter Fourteen Windows XP Professional Fault Tolerance.
Lab 11 Department of Computer Science and Information Engineering National Taiwan University Lab11 - Porting 2014/12/9/ 26 1.
Capture and Replay Often used for regression test development –Tool used to capture interactions with the system under test. –Inputs must be captured;
®® Microsoft Windows 7 for Power Users Tutorial 13 Using the Command-Line Environment.
C O M P U T E R G R A P H I C S Jie chen Computer graphic -- OpenGL Howto.
9 Chapter Nine Compiled Web Server Programs. 9 Chapter Objectives Learn about Common Gateway Interface (CGI) Create CGI programs that generate dynamic.
Scalable Game Development William Roberts Senior Game Engineer
© 2005 Pearson Education, Inc., Upper Saddle River, NJ. All rights reserved. Data Structures for Java William H. Ford William R. Topp Appendix E The EZJava.
Introduction to C Programming CE Lecture 7 Compiler options and makefiles.
Introduction to Eclipse CSC 216 Lecture 3 Ed Gehringer Using (with permission) slides developed by— Dwight Deugo Nesa Matic
Introduction to the Adapter Server Rob Mace June, 2008.
Operating Systems Session 1. Contact details TA: Alexander(Sasha) Apartsin ◦ ◦ Office hours: Homepage:
Operating System What is an Operating System? A program that acts as an intermediary between a user of a computer and the computer hardware. An operating.
Operating Systems Session 1. Contact details TA: Alexander(Sasha) Apartsin ◦ ◦ Office hours: TA: Sasha Alperovich.
WDO-It! 102 Workshop: Using an abstraction of a process to capture provenance UTEP’s Trust Laboratory NDR HP MP.
MuSL Builder Handcrafting custom Mu Scenarios. MuSL in the Mu Scenario Editor.
3 Copyright © 2004, Oracle. All rights reserved. Working in the Forms Developer Environment.
IST 222 Day 3. Homework for Today Take up homework and go over Go to Microsoft website and check out their hardware compatibility list.
J.P. Wellisch, CERN/EP/SFT SCRAM Information on SCRAM J.P. Wellisch, C. Williams, S. Ashby.
Plug-in Architectures Presented by Truc Nguyen. What’s a plug-in? “a type of program that tightly integrates with a larger application to add a special.
Implementation of Embedded OS Lab3 Porting μC/OS-II.
SPI NIGHTLIES Alex Hodgkins. SPI nightlies  Build and test various software projects each night  Provide a nightlies summary page that displays all.
Using Workflow With Dataforms Tim Borntreger, Director of Client Services.
David M. Kroenke and David J. Auer Database Processing Fundamentals, Design, and Implementation Appendix I: Getting Started with Web Servers, PHP and the.
Unit 9 ITT TECHNICAL INSTITUTE NT1330 Client-Server Networking II Date: 2/17/2016 Instructor: Williams Obinkyereh.
 Wind River Systems, Inc Chapter - 4 CrossWind.
Slide 1 © 2016, Lera Technologies. All Rights Reserved. Oracle Data Integrator By Lera Technologies.
C Copyright © 2009, Oracle. All rights reserved. Using SQL Developer.
Node.js Modules Header Mastering Node.js, Part 2 Eric W. Greene
INF230 Basics in C# Programming
Introduction Purpose Objectives Content Learning Time
Contiki and Code Composer Studio
Unit 9 NT1330 Client-Server Networking II Date: 8/9/2016
1/14/2019 3:57 AM © 2004 Microsoft Corporation. All rights reserved.
Overview of System Development for Windows CE.NET
Presentation transcript:

Dissecting the Windows CE Build Process James Y. Wilson Principal Engineer, Windows Embedded MVP CalAmp, Inc. James Y. Wilson Principal Engineer, Windows Embedded MVP CalAmp, Inc.

Agenda Build Architecture Command Line Tools Extending the Build Controlling the Build Build Strategies Build Scenarios (Labs) Complete Session Evaluations Build Architecture Command Line Tools Extending the Build Controlling the Build Build Strategies Build Scenarios (Labs) Complete Session Evaluations

Build Architecture Batch Files Environment Variables Sysgen Make File Defines initial build environment Executes build for PUBLIC and PRIVATE tree Selects build targets through SYSGEN_ variables and knowledge of intermodule dependencies. Builds PLATFORM COMMON and BSP trees. Constructs content of release directory Calls user defined batch files at various points in the Build and Sysgen stage. Defines initial build environment Executes build for PUBLIC and PRIVATE tree Selects build targets through SYSGEN_ variables and knowledge of intermodule dependencies. Builds PLATFORM COMMON and BSP trees. Constructs content of release directory Calls user defined batch files at various points in the Build and Sysgen stage. Build Make Files

Build Architecture “Common Build” aka “Build” Builds Private and Public source trees (generates mostly LIB files) “Sysgen” Assigns SYSGEN_, results in _MODULES, and _COMPONENTS variables assignment Combines selected (_MODULES and _COMPONENTS) component LIB files into DLL and EXE modules Filters header files,.BIB files,.REG files, etc. Builds BSP and Platform Common trees Builds Workspace tree Populates RELDIR Creates OS Image file Essentially, everything else in the build “Common Build” aka “Build” Builds Private and Public source trees (generates mostly LIB files) “Sysgen” Assigns SYSGEN_, results in _MODULES, and _COMPONENTS variables assignment Combines selected (_MODULES and _COMPONENTS) component LIB files into DLL and EXE modules Filters header files,.BIB files,.REG files, etc. Builds BSP and Platform Common trees Builds Workspace tree Populates RELDIR Creates OS Image file Essentially, everything else in the build

Build Architecture BldDemo.bat CeBuild.bat Initiates build from within command shell initialized by WinCE.bat WinCE.bat Establishes environment variables used globally, generates DEPTREE, loads developer and project specific environment Enumerates DEPTREE entries, and calls CeBldTree.bat for each entry CeBldTree.bat If enabled builds (compiles) source tree (DEPTREE entry) in Private and Public (Common Build). Initiates Sysgen. CeBuild1.bat Called to build (compile) specified source tree using Build.exe Sysgen.bat CeSysgen.bat Enumerates DEPTREE entries, and calls project specific batch file and CeSysgen.bat for each entry, in four passes (preproc, pass1, pass2, and report). Finally calls “make” to generate EXE and DLL targets.

Build Architecture SysgenPlatform.b at Runs CeSysgen.bat (same as above), then builds Platform source tree. BuildRel.bat Enumerates DEPTREE entries, and calls BuildRel1.bat for each.

Make Files MAKEFILE: Rules referenced in Makefile.def SOURCES: Assigns variables defining source files, target type, and build options SOURCES.CMN: Contains common SOURCES file entries (in parent directory). _OBJECTS.MAC: List of.obj targets produced during dependency scan. DIRS: Used by Build.exe when performing dependency scan MAKEFILE: Rules referenced in Makefile.def SOURCES: Assigns variables defining source files, target type, and build options SOURCES.CMN: Contains common SOURCES file entries (in parent directory). _OBJECTS.MAC: List of.obj targets produced during dependency scan. DIRS: Used by Build.exe when performing dependency scan

Command Line Tools Build.exe Processes DIR file Identifies dependencies, determines which files to build after scanning Calls NMake.exe to perform compilation CEFilter.exe statements to filter out contents of build and header files for undefined SYSGEN_ PBXMLUtils.exe Used to generate environment (variables and files) from existing PB workspace Used during build to generate certain batch files just before execution Build.exe Processes DIR file Identifies dependencies, determines which files to build after scanning Calls NMake.exe to perform compilation CEFilter.exe statements to filter out contents of build and header files for undefined SYSGEN_ PBXMLUtils.exe Used to generate environment (variables and files) from existing PB workspace Used during build to generate certain batch files just before execution

Command Line Tools SysgenMake.exe Used instead of NMake.exe when auto cloning enabled Overrides.lib file dependencies using specially formatted environment variables Appears to call NMake.exe after override SysgenMake.exe Used instead of NMake.exe when auto cloning enabled Overrides.lib file dependencies using specially formatted environment variables Appears to call NMake.exe after override

Inspecting Build Progress Build.log Provides more detailed build output, including full error strings SysgenSettings.out Allows inspection of final SYSGEN_ variables set MakeImg.out Contains output from image creation Build.log Provides more detailed build output, including full error strings SysgenSettings.out Allows inspection of final SYSGEN_ variables set MakeImg.out Contains output from image creation

Customization: Batch File Hooks %_WINCEROOT%\developr\%USERNA ME%\pblddemo.bat Runs at the beginning of the BldDemo.bat. Could be used to retrieve files from version control %_PROJECTROOT%\BldNuke.batCalled when “nuke” is parameter to BldDemo.bat %_WINCEROOT%\developr\%USERNA ME%\setenv.bat Allows setting of developer specific build environment. Used for command line builds. %_WINCEROOT%\developr\%USERNA ME%\Source Run at very end of build process to build developer specific project. %_WINCEROOT%\developr\%USERNA ME%\pbuildrel.bat Allows release process (copying targets to RelDir) to be customized.

Customization: Batch File Hooks %_PROJECTROOT%\postWinCE.batRuns at end of WinCE.bat, project (not user) specific, another possible location for automated retrieval from version control %_PROJECTROOT%\BldNuke.batCalled when “nuke” is parameter to BldDemo.bat

Directory Structure C:\WINCE500\PUBLIC\CEBASE\OAK\MISC: Contains SysGen batch files C:\WINCE500\PUBLIC\COMMON\OAK\MISC: Contains build command batch files C:\WINCE500\PLATFORM: Contains drivers and kernel code changes C:\WINCE500\PBWorkspaces: Contains RELDIR, local Public tree, cloned projects C:\WINCE500\PBWorkspaces\%_TGTPROJ%\WINCE500\%_TGT PLAT%\OAK\MISC: Contains parent CESysgen, and a CESysgen hook batch file OAK/DDK/SDK build product folders: OAK contains platform specific modules and libs, DDK contains platform specific interface components, SDK contains Microsoft supplied platform independent, modules and components C:\WINCE500\PUBLIC\CEBASE\OAK\MISC: Contains SysGen batch files C:\WINCE500\PUBLIC\COMMON\OAK\MISC: Contains build command batch files C:\WINCE500\PLATFORM: Contains drivers and kernel code changes C:\WINCE500\PBWorkspaces: Contains RELDIR, local Public tree, cloned projects C:\WINCE500\PBWorkspaces\%_TGTPROJ%\WINCE500\%_TGT PLAT%\OAK\MISC: Contains parent CESysgen, and a CESysgen hook batch file OAK/DDK/SDK build product folders: OAK contains platform specific modules and libs, DDK contains platform specific interface components, SDK contains Microsoft supplied platform independent, modules and components

Platform Builder Options Build OS “Sysgen”: Use when Public SYSGEN_ variable has changed “Build and Sysgen”: Use when code in Public tree has changed “Build and Sysgen Current BSP”: Use when Platform SYSGEN_ variable has changed or Platform code has changed Build Project “Build and Sysgen Current Project”: Used when project consists of Public component or module “Build Current Project”: Used for all Platform projects and anything else Build OS “Sysgen”: Use when Public SYSGEN_ variable has changed “Build and Sysgen”: Use when code in Public tree has changed “Build and Sysgen Current BSP”: Use when Platform SYSGEN_ variable has changed or Platform code has changed Build Project “Build and Sysgen Current Project”: Used when project consists of Public component or module “Build Current Project”: Used for all Platform projects and anything else

Build Strategies Create ALL source code in PBWorkspace and Platform (only if making BSP) tree Clone (see Lab for manual cloning) to minimize changes to Platform tree Try hard to avoid changes to Public tree Strive for a Workspace only build (unless creating a BSP) to provide a greater degree of “Project Portability” Create ALL source code in PBWorkspace and Platform (only if making BSP) tree Clone (see Lab for manual cloning) to minimize changes to Platform tree Try hard to avoid changes to Public tree Strive for a Workspace only build (unless creating a BSP) to provide a greater degree of “Project Portability”

Build Strategies Build without generating a new OS image and use RelDir mirroring to download changes Reserve OS image generation for flashing image to target Build in background console window(s) Build using –M {n+2} even on uniprocessor systems for 30% to 40% enhancement Build on XP x64, install using link in references Build without generating a new OS image and use RelDir mirroring to download changes Reserve OS image generation for flashing image to target Build in background console window(s) Build using –M {n+2} even on uniprocessor systems for 30% to 40% enhancement Build on XP x64, install using link in references

Lab Exercise 1 Creating a Command Line Build Environment

Lab Exercise 2 Manual Cloning of a Platform Common Component

Lab Exercise 3 Manual Cloning of a Public Driver

Lab Exercise 4 Using External IDE’s

Conclusion PBWorkspaces provides total flexibility to modify PUBLIC and PLATFORM components Possible to customize an OS design entirely from PBWorkspaces Various options are provided to hook into build Ability to maintain command line build configured from PB IDE Running multiprocessor builds saves time, more common as dual core processors proliferate PBWorkspaces provides total flexibility to modify PUBLIC and PLATFORM components Possible to customize an OS design entirely from PBWorkspaces Various options are provided to hook into build Ability to maintain command line build configured from PB IDE Running multiprocessor builds saves time, more common as dual core processors proliferate

References Visit for more discussion on this topichttp:// For a batch file debugging and command shell replacement see: Provides single-step debugging Compatible with default XP command shell For information on PB install under XP x64 see: 24/ aspx 24/ aspx Visit for more discussion on this topichttp:// For a batch file debugging and command shell replacement see: Provides single-step debugging Compatible with default XP command shell For information on PB install under XP x64 see: 24/ aspx 24/ aspx

Please Complete Session Evaluations