Emin Şenay


WinCE Tutorial - 1 - Introduction & Installation

Edit after 7 years: Before starting to read these pages, please keep in mind that I stopped working on WinCE (or any other embedded OS) a couple of months after preparing this tutorial. Unfortunately I don’t remember anything valuable other than the written contents of it. Therefore, I’ll most probably keep your support requests or questions unanswered.

A couple of months ago, we started a new project about a device driver for Windows Embedded CE 6.0. In this project, my first task was preparing a toolchain. We needed a running environment for the operating system and because of some reasons which I won’t mention here, we didn’t want to buy a real hardware. So, I started searching virtualization solutions. At first, I thought that it will be easy to find a running WinCE bsp for one of the virtual machines. After a dozen of unsuccessful Google searches, it started to be clear that I could not find an easy solution. After that, I started collecting some bits and pieces from many different web sites. Adding my own experience created this tutorial. Your comments and corrections are always welcome.

I also want to clarify why I’ve chosen English here: As I’ve written in my previous posts, I don’t normally write anything English into this blog. However, I decided to make an exception for this tutorial. First of all, most of this tutorial is already written in English and I don’t have enough time to translate it into Turkish. Secondly, it is very difficult to find a tutorial which covers all of the following sections written. Personally, I couldn’t find any. I thought that it can be better to publish all these information in English for a broader audience.

Ok, one more last thing: I am not responsible for any loss resulting from the use of this tutorial.

Toolchain

The development environment will look like the following schema:

Toolchain Schema

The reason of developing in a VM instead of the host PC is keeping the native system clean. Also, snapshots can be taken and reverted back in the learning process if something goes terribly wrong. Note that some Platform Builder versions won’t work if installed side-by-side and may corrupt or even crash your installation.

To develop a Windows Embedded CE 6.0 image (NK.bin file), copy all device-specific sources from ClearCase into the Platform-Builder-Directories of the virtual machine. Make your changes and build an image.

To debug the image you created, set your create and configure a network for your development and test virtual machines. After that, you can transfer the generated data to your target-device and start debugging.

Following sections explain the development processes in detail.

Preparing the Environment for WinCE Development

There are a couple of steps to follow before starting application/driver development for Windows Embedded CE 6.0. These are:

  1. Installing the required packages to development system.
  2. Preparing the bsp and creating the CE image.
  3. Running the image in target VM.

Second and third steps are dependent upon the target virtual machine we are using. You can think of different virtual machine programs as different physical machines which contain different hardware. Since bsp is created for a specific hardware platform, we need different bsps for different virtual machines.

For development system, Vmware is chosen as the virtual machine because of its advanced settings and speed. It has already been used for some other jobs by some of the developers of the team, which also affected the choice. We’ve already had the required license for the software (workstation), but it is theoretically possible to use the free alternatives VMware Player and VMX Builder.

For the test VM, VMware was tried first. After some effort, it was understood that debugging an application or a driver would be very difficult in Vmware because of the lack of ethernet debug drivers. Hence, Vmware WinCE images could only be debugged using trace messages, which is very uncomfortable.

As a second option, Virtual PC was taken into consideration. It was at first difficult to set up a working network between Vmware development system and Virtual PC test system in our corporate network. After setting up a functioning network, WinCE image could be loaded and debugged with the ethernet interface successfully.

In the following sections, both of the target virtual systems, as well as detailed information about the things done to support debugging using ethernet card in VMware will be explained. The user can choose one of the target systems. Note that two VMware images cannot be emulated using VMware Player at the same time.

Installing Packages

The following packages should be installed into the development computer for Windows Embedded CE Development:

Other monthly update packages may also be released at the time you are reading this document. Please check Microsoft download site and install all updates.

Note: At the time the original document was written, R3 hasn’t been released yet. You can directly install R3 after installing R2. R3 probably includes monthly updates given above.

Because of a proxy problem, one may not install the Windows Embedded CE 6.0 and R2 from the links above (It was the case for me). If you encounter a problem installing these packages, you have two options to overcome it:

  1. Installing from the CD: Microsoft sends the Evaluation edition CDs without cost (except shipping) if requested.
  2. Hacking the internet installation: The problem is that the setup tries to download some packages during install. If you have a proxy with authentication, setup cannot download the required packages and installation fails (probably because of a bug in the setup). If you can manually download the packages and put them under the same directory of the msi file of the setup, setup uses these files and installs the embedded cd without any problem. msi files of the Embedded CE and R2 are automatically created under temp (C:\Documents and Settings\<username>\Local Settings\Temp) directory after clicking the setup.exe downloaded from the links above. All packages that may be used in install process can be found here (Required files are extracted from the msi files by opening them with Orca Msi Editor). Depending on the checkboxes you selected in the install process, actual required packages might be a subset of them. After downloading the files given above, just execute .msi files.

Installing the packages is straightforward. Only make sure that you installed x86 support. Installing “Shared source” may also be useful in the future.

WinCE Tutorial - 2 - Running WinCE under VMware - 1