Partager via


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

1/6/2010

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 for your purposes, such as in-house debugging.

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 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 Platform Builder for Windows Embedded CE 6.0, choose Open, and then choose Project/Solution, open the directory for your OS design, and then open the associated Platform Builder OS Design (*.pbxml) file.

  2. From the Build menu, choose Configuration Manager, 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 menu, choose Global Build Settings, and then verify that Copy Files to Release Directory After Build and Make Run-Time Image After Build are selected.

  4. From the Build menu, to build a run-time image without modified source code, choose Advanced Build Commands, and then 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 (Visual Studio).

    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 menu, choose Global Build Settings, and then verify that Copy Files to Release Directory After Build and Make Run-Time Image After Build are selected.

  9. From the Build menu, choose Global Build Settings, and then 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.

To build private code from the command line

  1. From the Build menu, choose Open Release Directory in Build Window.

  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 menu, choose Global Build Settings, and then verify that Copy Files to Release Directory After Build and Make Run-Time Image After Build are selected.

  8. From the Build menu, choose Rebuild and Clean Sysgen.

See Also

Tasks

How to Use the IDE to Create, Customize, and Build a Run-Time Image

Concepts

Using Shared Source Code in an OS Design
Creating a Backup of the Source Code Files

Other Resources

CeBackup Tool