Creating a Workspace from the Command-Line (Windows CE 5.0)

When you create a workspace from the command line, you begin by creating an operating system (OS) design directory, which holds the dynamic link library (.dll) files and the executable (.exe) files that are built during the Sysgen phase of the build process.

Platform Builder builds these files according to the build options that you select for your operating system (OS) design.

For more information about the Sysgen phase, see Build Phases.

Creating a workspace from the command line

  1. Create an OS design directory by copying the design template directory, in the Public directory of your Windows CE installation, typically C:\WINCE500, to a new location.

    The following code example shows how to copy the CEBASE directory to a directory named MyOSDesign.

    xcopy /s public\cebase \PBWorkspaces\MyOSDesign

    For more information, see Catalog Item Dependencies.

  2. From the Platform directory of your Windows CE installation, which contains the board support packages (BSPs) you selected when you installed Platform Builder on your development workstation, select the BSP you want to use for your OS design.

    For example, you can create an OS design based on the x86 BSP, targeted toward the Emulator.

    For information about BSPs, see Developing a Board Support Package.

  3. Create a batch application (.bat) file to set up your build environment.

    For easy reference, name this file after your OS design and locate it in the root directory on your development workstation.

    The following table lists the environment variables that you must set in the .bat file.

    Environment variable Description
    _WINCEROOT Set this to refer to your Windows CE installation directory, which is typically C:\WINCE500.
    _FLATRELEASEDIR Set this to refer to the directory where the final Nk.bin file should be built, which is typically the release directory in your OS design directory.
    WINCEDEBUG Set this to specify a debug or release configuration. By default, this is set to release.

    If you change the default setting, you must also reset _FLATRELEASEDIR to avoid conflicting debug and release binaries.

    The .bat file should also call Wince.bat, the Windows CE Build Environment tool, to set up the rest of the default build environment.

    The following code example shows how to set the build environment for an OS design named MyOSDesign, based on the x86 BSP, and using the Emulator as the target device.

    call %_WINCEROOT%\PUBLIC\common\oak\misc\wince.bat x86 MyOSDesign emulator

    In this file, set any Sysgen variables that you want to set in your OS design. You can call one of the sample configuration batch files to set up defaults for standard design templates.

    The following code example shows how to set the variables for a typical Mobile Handheld design template.

    call %_WINCEROOT%\Public\CEBASE\mobile_handheld.bat

    Finally, to enable you to remember the build environment you set up, change the title of the command-line build window.

    The following code example shows how to set the title for a build environment targeted toward a Mobile Handheld design template for the Emulator.

    cd /d %_WINCEROOT%
    

title WINCE BUILD - EMULATOR MOBILE

  1. Run the .bat file to create your build environment.

You have successfully created a workspace from the command line. You can now customize and build your OS design.

For information about customizing your OS design, see Catalog Item Management and Modifying an OS Design. For information about building the run-time image based on your OS design, see Run-Time Image Build Process.

See Also

Workspace Creation | Workspace Creation in the IDE | How to Use the Command Line to Create, Customize, and Build a Run-Time Image | Miscellaneous Environment Variables

Last updated on Thursday, February 02, 2006

Send Feedback on this topic to the authors

Feedback FAQs

© 2006 Microsoft Corporation. All rights reserved.