Building a Run-Time Image Using Modified Shared Source Code (Windows CE 5.0)

You can build a run-time image using modified shared source code, which is typically in the %_WINCEROOT%\Private directory. Follow the instructions to build a run-time image containing modified shared source code in the IDE.

Private code, which is provided in %_WINCEROOT%\Private, is covered by the Microsoft Shared Source License Agreement, which allows you to make modifications to the code strictly for noncommercial use, such as in-house debugging.

Before releasing a device for commercial use, you must restore the original files and binaries and rebuild your run-time image.

You cannot ship modified private code in any shipping device. Follow the instructions to build private code from the command line.

If you are creating an OS design, for information, see How to Use the IDE to Create, Customize, and Build a Run-Time Image.

After you perform these procedures, you have a run-time image containing modified shared source code that you can download to your device for debugging and verification.

For information about verifying a component, see Verifying a New Component.

To build a run-time image containing modified shared source code

  1. From the File menu in the Platform Builder IDE, choose Open Workspace, open the directory for your OS design, and then open the associated Platform Builder Workspace (*.pbxml) file.

  2. From the Build OS menu, choose Set Active Configuration, then select the debug configuration of your run-time image, and choose OK.

    This permits you to use Shared Source code in your OS design.

  3. From the Build OS menu, verify that Copy Files to Release Directory After Build and Make Run-Time Image After Build are selected.

  4. From the Build OS menu, to build a run-time image without modified source code, choose Sysgen.

    This becomes the original run-time image, from which you can back up the files.

  5. Before modifying code, locate the source code you want to modify and make sure you have done the following:

    • You created a backup of the original source code files in %_WINCEROOT%\Private.
    • You used CeBackup to create a backup of the original Microsoft-provided libraries.

    For information about CeBackup, see CeBackup Tool.

  6. After your source and binaries are backed up, modify the source code with the changes you want to make; then save your changes.

  7. Set or clear environment variables as needed.

    For more information, see Setting or Clearing an Environment Variable.

    For information about environment variables that you can set, see Environment Variables.

  8. To include the modified code in your run-time image, from the Build OS menu, verify that Copy Files to Release Directory After Build and Make Run-Time Image After Build are selected.

  9. From the Build OS menu, choose Build and Sysgen.

    Note   You can build specific components from the IDE by running a targeted build. However, you should build private code from the command line.

However, not all shared source components in %_WINCEROOT%\Private can be built. For information on determining whether your component can be built, see Shared Source Code Directories.

To build private code from the command line

  1. From the Build OS menu, choose Open Release Directory.

  2. To list the variables set for your OS design, including new components, at the command prompt, enter the following command.

    Set

  3. If you need to set additional variables, at the command prompt, enter Set, and then enter the variables you want to set, separated by spaces.

    For example, to remove USB support from your OS design, enter Set BSP_NOUSB=1.

    For information about variables you can set, see Environment Variables and Sysgen Variables.

  4. Change your directory to the directory that contains the Shared Source code you have modified and make sure the current directory contains a dirs or sources file.

  5. Perform a clean build at the command prompt by entering the following command.

    Build -c

    You have built libraries from modified Shared Source code.

  6. In the IDE, if errors occur during the build process, review the Build.err and Build.log files, in the root directory the build process was called from.

  7. To build your run-time image with the binaries you built, from the Build OS menu, verify that Clean Before Build, Copy Files to Release Directory After Build and Make Run-Time Image After Build are selected.

  8. From the Build OS menu, choose Build and Sysgen.

See Also

How to Use the IDE to Create, Customize, and Build a Run-Time Image | Creating a Backup of the Source Code Files | Using Shared Source Code in an OS Design | CeBackup Tool

Last updated on Thursday, February 02, 2006

Send Feedback on this topic to the authors

Feedback FAQs

© 2006 Microsoft Corporation. All rights reserved.