Building a Windows CE 5.0 PC (CEPC)

This is a short selection of assorted lessons I have learned setting up CEPC machines for software debugging.

Making a CEPC bootable flash disk

  1. Obtain a floppy with Microsoft boot files. Since Windows XP will refuse to make a bootable disk that is not a floppy - and modern PCs do not have floppy drives - I have used a Virtual Floppy Drive ( http://chitchat.at.infoseek.co.jp/vmware/vfd.html ) and "formatted" it.
  2. Obtain the HP flash format utility (HP keeps moving it around its Web site, and finally seems to get rid of it altogether, Google for "SP27213.exe")
  3. Format the flash disk using the utility. Few important points:
  4. Copy all files from WinCE 5.0 installation DOS subdirectory BOOTDISK (usually \WINCE500\PUBLIC\COMMON\OAK\CSP\X86\DOS\BOOTDISK) to the flash disk
  5. Copy the image of the OS and bootloader from your target directory (usually under \WINCE500\PBWorkspaces) to the flash disk
  6. If you are not planning to use DHCP, edit the Autoexec.bat file to add the target IP address to the line "set NET_IP="
  7. Add a reasonable screen resolution switch (say, /L:800x600x16) to the line "loadcepc /v nk.bin"

Dell Latitude Keyboard Problem

Under Windows CE 5.0, the CEPC keyboard driver always assumes that keyboard produces Code Set #2 (a.k.a. AT). Driver does a decent job trying to switch the mishmash of keyboards into this mode. For some reason, it does not work on Dell Latitude laptops - keyboard stays in Set #1 (XT) and therefore does not work. Older versions of Windows CE shipped with XT keyboard drivers, but with 5.0 you are out of luck, unless you are willing to change the supplied KEYBD driver. For those determined few, here is the patch courtesy of Fedor Sherstyuk. It should be applied in the PUBLIC\COMMON\OAK\DRIVERS\KEYBD\PS2_8042 directory and requires MODE_XT symbol to be defined at compile time.

Network Cards

Contrary to popular beliefs (and older documentation) Platform Builder KITL transport will work with many modern network cards. The correct information can apparently be found here: "Microsoft provides support for NE2000-compatible NICs, Realtek 8139, DB83815 (MacPhyter) and USB Remote NDIS in EBOOT for the CEPC". I have not been able to make the RNDIS work, but had easy time with 8139 chip (most low-cost PCs, both desktops and laptops, use this chip or its equivalents; it is also a popular aftermarket choice).

On the wireless front situation is much worse: according to this, the choice for the modern installation (with WPA) is between few truly obsolete Prism2/2.5 chipset-based cards (Microsoft MN-520, Linksys WPC11 ver.3). I had little problem obtaining WPC11 v3 cards via Ebay and similar venues. Note that v4 of the WPC11 is based on another chipset (Broadcom?) and is not supported at all.

While the Cisco Aironet 340/350 16-bit PCMCIA cards are supported, the PCI versions of these cards are not. Furthermore, even though the driver for these is available as a source code in the Windows CE distribution, Cisco driver included does not support WPA. Still, it is easy to get Aironet cards on Ebay, and if you do not need WPA, it should be your wireless card of choice, since the driver does not use card interrupts - and therefore the complex and hard to troubleshoot PC Card interrupt routing issues are bypassed.

PCMCIA Adapters

For PCMCIA cards to work, the CEPC should include a supported PCMCIA controller chip. In my experience, the easiest choice for PCMCIA is a laptop - simply adding the Intel I82365 bridge to the configuration usually solves the problem.

Official (a bit dated) Microsoft position can be found here: "Envoy Data PC Card Host Controller SBP-D2, TI-1250/1225, Intel 82365-based controller, ActionTec PC750". Note that the first and last items on the list are PCI-based cards.

The actual list in the TI driver file pcc_tipcard.reg includes the following vendor/device IDs: 

If laptops are among the planned targets, usually they include an equivalent of  i82365. On Dell laptop, I have found issues with interrupt routing, which I still did not resolve.

My best experience for desktop is with Actiontec PC750. This bridge is still sold in the stores, can be also picked up on Ebay, and worked for me out of the box. My attempts to use the most-popular Ricoh bridge cards so far have been unsuccessful.

Miscellaneous

Contrary to older documentation, WinCE 5.0 is working fairly well with shared PCI interrupts (despite many error messages in the log)  - it seems that all important drivers can share the interrupts now. Note that some drivers do not have interrupt sharing enabled in the registry, though.

An operational serial interface on the target is pretty important, as many important device-related messages apparently only go through this channel.