Compartilhar via


How to Migrate a Windows CE .NET 4.2 OS Design to Windows CE 5.0

If you created an OS design using Platform Builder for Microsoft® Windows CE .NET 4.2 and want to continue developing it using Windows CE 5.0, you must migrate your OS design to Windows CE 5.0.

Before migrating an OS design, familiarize yourself with the migration information available in Migrating from an Earlier Version of Windows CE.

For this how-to, it is assumed that the OS design you want to migrate was created using Windows CE .NET 4.2. For information about migrating from earlier versions, see Migrating from an Earlier Version of Windows CE.

Much of the terminology has changed from earlier versions of Windows CE to Windows CE 5.0. The terminology in the following instructions is used throughout Windows CE 5.0. For more information about the terminology changes, see Terminology.

If you want to use Platform Builder to create an OS design for Windows CE 5.0, see How to Use the IDE to Create, Customize, and Build a Run-Time Image.

If you want to use the command line to create an OS design for Windows CE 5.0, see How to Use the Command Line to Create, Customize, and Build a Run-Time Image.

Assumptions

  • The OS design that you want to migrate to Windows CE 5.0 was created using Windows CE .NET 4.2.
  • You have familiarized yourself with the content in What's New.

Note   Some steps are optional, depending on your OS design.

To track your progress in the following table, select the check box next to each step.

  Step Topic
1. In Windows CE .NET 4.2, select and open an existing OS design that you want to migrate to Windows CE 5.0.

The OS design in Windows CE .NET 4.2 is typically located in C:\WINCE420\Public\<OS design name>\<OS design name>.pbw.

Not applicable.
2. Perform the following tasks:
  • From the Build menu, select Set Active Configuration and then select the configuration you want.
  • From the Build menu, if you have not modified your OS design, select Build Platform; otherwise, select Rebuild Platform.
  • After the build completes, save a copy of the file C:\WINCE420\Public\<OS design name>\<OS design name>_SetEnv.bat as a text file.

    For this example, use the name MyMigration_<ConfigurationName>.txt.

    <OS design name>_SetEnv.bat contains the list of Sysgen and environment variables that are set in the configuration for the OS design; each subsequent build overwrites existing content in the file.

Not applicable.
3. Familiarize yourself with the list of Sysgen and environment variables in MyMigration_<ConfigurationName>.txt.

Use the Sysgen and environment variables in this file to add the appropriate Catalog items and environment settings to your Windows CE 5.0-based OS design.

Not applicable.
4. In Windows CE 5.0, use the Custom Device OS design template to create an OS design that does not include Catalog items. Creating an OS Design
5. Search the Catalog for the Sysgen variables listed in MyMigration_<ConfigurationName>.txt and add the corresponding Catalog items to your OS design.

Each Catalog item you add is displayed with an icon that identifies it as a user-specified Catalog item.

Note   If a Catalog item you add has dependencies on other items, Platform Builder automatically adds those items to your OS design.

For information about valid Sysgen variables in Windows CE 5.0, see Sysgen Variables.

Searching the Catalog

Adding an Item from the Catalog

6. Migrate the environment variable settings to your OS design. Migrating Environment Variable Settings to Windows CE 5.0
7. (Optional) Configure the platform settings for your OS design.

For more information, see Platform Settings Dialog Box.

Modifying OS Design Settings
8. (Optional) Configure custom build actions for your OS design. Specifying Custom Build Actions
9. Build a run-time image based on your OS design by doing the following:
  1. From the Build OS menu, verify that the following are selected:

    Copy Files to Release Directory After Build

    Make Run-Time Image After Build

  2. From the Build OS menu, choose Build and Sysgen.
Not applicable.
10. Verify that the new run-time image contains the same functionality as the old by comparing the contents of the following files:
  • %_WINCEROOT%\PBWorkspaces\OSDesign\OSDesign_SetEnv.bat
  • MyMigration_<ConfigurationName>.txt
Not applicable.
11. If the old OS design includes a project, use the New Project Wizard to create a project of the same type in the workspace containing your new OS design.

Complete steps 12 through 18 for each project you migrate.

For information about the types of projects you can create in Windows CE 5.0, see Creating a Project.

Creating a New Project
12. If migrating a project, copy the source and include files from the old project directory to the new project directory.

These files are used in the build system to build the files that are copied to the release directory for inclusion in the run-time image.

Adding Files to a Project
13. If your project contains files that are not used in the build process, add custom build steps to copy the files to the release directory.

For information about the files used in the build process, see Run-Time Image Configuration Files.

Adding a File to a Run-time Image
14. If migrating a project, configure custom compiler and linker flags that were set in your old project. Project Settings Dialog Box
15. If migrating a project, configure Platform Builder to generate verbose compiler and linker output when you build your project.

To do this, set the CL environment variable to /VERBOSE.

Setting the CL Environment Variable
16. If migrating a project, configure custom build settings for your project.

In Windows CE 5.0, custom build settings for a project are set at the project level and not at the file level.

Specifying Project Conditionals

Specifying Custom Build Steps for a Project

Configuring Selective Builds for a Project

17. If migrating a project, build your project by doing the following:
  1. From the Build Project menu, verify that the following are selected:

    Clean Before Building

    Make Run-Time Image After Build

  2. From the Build Project menu, choose Build and Sysgen Current Project.
Build Project Menu Options
18. If migrating a project, compare the build output from the old and new projects to ensure that both versions build identically. Not applicable.
19. Set up and configure a connection to a target device for downloading your run-time image.

For information about setting up the target device if it is a CEPC, see How to Configure and Download a Run-Time Image to a CEPC.

For information about setting up the target device if it is the Emulator, see Downloading a Run-Time Image to the Emulator.

Configuring a Connection for Downloading and Debugging
20. Configure a terminal emulation application, such as Microsoft HyperTerminal, to receive debug messages. Configuring HyperTerminal for BSPs
20. Download your run-time image to the target device as follows:
  • From the Target menu, choose Attach Device.
Note   You might need to reset the target device before the download can begin.

A dialog box displays a progress indicator for the download.

Not applicable.
21. Use remote tools to test the run-time image.

For example, you can use the Remote Process Viewer to list processes and threads running on a target device. For more information about remote tools, see Remote Tools.

Debugging and Testing a Run-Time Image

See Also

Migrating from an Earlier Version of Windows CE | Platform Builder User's Guide | How-to Topics | Catalog Item Icon Types

Last updated on Thursday, February 02, 2006

Send Feedback on this topic to the authors

Feedback FAQs

© 2006 Microsoft Corporation. All rights reserved.