Emin Şenay


WinCE Tutorial - 3 - Running WinCE under VMware - 2

WinCE Tutorial - 2 - Running WinCE under VMware - 1

Running the Image in VMware

First, create a custom Virtual Machine with VMware Workstation 6 hardware and select Ms-Dos as the operating system.

You do not have to change anything else for now. You may change the disk size according to your needs.

Booting the Operating System

There are a couple of ways to boot the system and install the created CE image. These are:

  • Local install
  • Remote download & install using serial connection
  • Remote download & install using ethernet connection

For all of the connections, an MS-DOS startup disk is always a requirement.

Local Install

To be able to install the nk.bin image locally, we need loadcepc.exe. It can be found under $(WINCEROOT)\PLATFORM\CEPC\SRC\BOOTLOADER\DOS\BOOTDISK.

loadcepc.exe location

In this install type, it is easy to use an MS-DOS boot cd instead of a floppy because of the empty space we can use. Created nk.bin can directly be included in the cd-rom and be loaded easily. If we have selected the floppy, we would have needed an another medium to load the generated image from.

MS-DOS boot CD can be created using the MS-DOS BootCD program. First, download the bootcd.zip from the site. After unpacking the file, copy the loadcepc.exe and generated nk.bin files under the CD directory.

BootCD CD folder

After that, generate an MS-DOS iso file by running the Build-ISO.cmd. BootCD.iso file will be created by the application.

After creating the bootable cd, go to the VMware Virtual machine options of the MS-DOS image you created. Go to the CD/DVD options and use the ISO file you created.

VMWare Virtual Machine CD Options

Now, you are ready to start the MS-DOS VMware image. After starting, you will see a screen like below:

DOS VMware image screen 1

You can select 1. After that, go to the CD Drive (X) and start the Windows Embedded CE 6.0 by entering the command “loadcepc /L:800x600x16 nk.bin”.

DOS VMware image screen 2

The operating system should be ready after a couple of seconds.

Working Windows Embedded CE 6.0 under  VMware

Alternatively, you can use the attached Autoexec.bat and Config.sys to skip the command line parts and start the CE 6.0 automatically. You need to replace autoexec.bat and config.sys files located under the Floppy folder of the bootcd with the ones given with this zip file.

Remote Download&install Using Serial Connection

Windows CE image can also be downloaded from the developer computer automatically using the serial connection. Moreover, this can directly be done in Visual Studio. Required steps are as follows (Developer system is also a VMware OS in this example):

  • Add 2 COM ports to the development and CE VMware images.
  • Settings for development computer:
    • Use named pipe (\\.\pipe\com_1 and \\.\pipe\com_2)
    • This end is the client
    • The other end is a virtual machine

VMware serial connection Settings Screen

  • Settings for CE:
    • Use named pipe (\\.\pipe\com_1 and \\.\pipe\com_2)
    • This end is the server
    • The other end is a virtual machine
    • Yield CPU on poll is selected.
  • Open the Visual Studio project. From Target → Connectivity Options, choose the following options:
    • Target Device: CE Device
    • Download: Serial, settings → COM2, baud rate 115200, data bits 8, parity None, flow control None, stop bits 1.
    • Transport: Serial, settings → same as above.
    • Debugger: KdStub

VS Target Device Connectivity Options Screen

  • Apply and Close the window.
  • Create a new HyperTerminal connection for debug messages coming from CE. Settings → COM1, 38400 bps, data bits 8, parity None, stop bits 1, flow control None.
  • Create an MS-DOS boot disk using the floppy template shipped with platform builder. It is easier using a floppy image file instead of a physical drive. Navigate to the VMware development image settings (VM → Settings) and from the hardware tab, select floppy (if you don’t have a floppy disk, create one by selecting add). Select “use floppy image” file and create an image.

VMware Floppy Settings

  • Navigate to the %ProgramFiles%\Microsoft Platform Builder\6.00\CEPB\Utilities directory, and then run MakeImageDisk.exe.
  • From the MakeImageDisk window, choose Open, and navigate to %ProgramFiles%\Microsoft Platform Builder\6.00\CEPB\Utilities, and choose CepcBoot.144. After that press start.
  • Disconnect the floppy disk from development VM and connect it to the CE VM.
  • Start the CE VM. From the boot menu, select “Boot CE/PC (serial via sboot.bin)”

DOS Boot Startup Menu

  • From development VM visual studio, select “Attach Device” from the Target menu. Download window will be displayed shortly. You can check the Hyperterminal for any messages if anything goes wrong.

Runtime Image Download Screen

  • After download completes, Windows CE will start automatically.
Remote Download&install Using Ethernet Connection

Normally, created nk.bin image can also be downloaded using the ethernet. However, this couldn’t be done for vmware because of a couple of reasons:

  • Ethernet bootloader must recognize the ethernet device that is installed into the system. Ethernet bootloader shipped with the Platform Builder does not recognize any of virtual ethernet cards which are available for Vmware.There are 2 different virtual ethernet cards which can be used with Vmware. These are Amd Pcnet ethernet card and Intel e1000 gigabit ethernet card. For the first one, two different drivers, vlance and vmxnet, can be used under the supported operating systems. Vmxnet is the faster driver and is only available with Vmware guest additions, which is not available for Windows Embedded CE.In order to support the ethernet download capability, ethernet bootloader (eboot.bin) must be modified and linked with a special “edbg” driver written for the ethernet card. This driver is different than the normal ndis driver written for Windows CE 6.0.
  • We currently don’t have edbg driver for any of the ethernet cards supported by Vmware.
  • edbg driver code for some Amd and Intel cards is shipped with the Platform Builder, but even if the source code can be modified to work with vmware, it is non-trivial to generate an edbg driver .lib file which then must be linked to the bootloader.

WinCE Tutorial - 4 - Running WinCE under VMware - 3