Click here to learn
about this Sponsor:
Home  |  News  |  Articles  |  Forum

  Home arrow Windows For Devices Articles arrow Windows CE and Windows XP together on the same PC

Windows CE and Windows XP together on the same PC
By Staff

Rate This Article: Add This Article To:

Windows XP doesn't provide real-time capabilities, hindering its utility for industrial applications. However, because it supports so many apps, sometimes it would be useful to have it running on the same platform as Windows CE.



That's possible with the CeWin extender from Kuka Roboter, which enables Windows CE and Windows XP to run together on one PC.

This paper will describe the technology. CeWin is software only real time extension technology for the desktop Windows has been developed, which guarantees deterministic response on interrupts which are targeted to Windows CE. Theses interrupts can be generated by any PCI- or ISA- PC plug in board controlled by Windows CE and have always a higher priority than the desktop Windows.



As long as at least one Windows CE task is active, the processor’s execution time is available exclusively for Windows CE. In other words, only if all Windows CE tasks have given up their execution time, Windows will be reactivated. This is done when Windows CE falls into the so called idle task of Windows CE. From this point of view, one can say, desktop Windows runs as the idle task of Windows CE. The Windows CE idle task controls the re-activation of Windows. This makes it possible for the programmer to control the sharing of the processor between the two operating systems according to the requirements of the application.

There are two members within Kuka's CeWin product family: CeWin PE (Professional Edition) and CeWin LE (Light Edition). While CeWin PE has the full and unlimited functionality of the original Windows CE, the CeWin LE as a low cost entry product has some limitations:
  • Pre-configured images with several fixed sizes that cannot be modified
  • Additional OS features cannot be included
  • Development environment: Embedded Visual Studio and Visual Studio.NET, Platform Builder cannot be used
  • Only one user process is supported
  • Does support TCP/IP communication between Windows and WinCE but with no routing (IP Forwarding) support

However, both versions do support:
  • Access of the local Windows hard disk (i.e. to load the user application)
  • Win32 subset API, C++ Support
  • Windows CE console accessible using Telnet



The CeWin product license from KUKA Roboter only consists of the coupling mechanisms to have both operating systems concurrently on the same PC. However, it does not include the two also needed original Microsoft licenses for Windows XP and Windows CE. Those have to be procured at the official Microsoft distributors. After installing the two original software products, the installation of CeWin has to be done at last.

Communication between Windows CE and desktop Windows
The TCP/IP-protocol is used for communication between Windows CE and Windows XP using shared memory areas. For this purpose two corresponding network drivers have been developed for both sides, Windows XP and Windows CE.

Both systems can exchange data over the commonly accessible shared memory area as they would do via an Ethernet line. Using the Windows built in IP-Forwarding feature, Windows CE can access other systems, which are connected to the Windows XP TCP/IP network.

This communication method has the advantage, that the two systems can be torn apart and connected by a real Ethernet line without changing one of the applications. This makes sense, if the real time target system is not only PC-based but also an embedded system like a stand alone controller without Windows PC functionality.

For a more direct TCP/IP connection to systems outside of the PC an additional Ethernet hardware can be used. An Ethernet board, which is supported by a standard Windows CE driver, can be plugged in into the PC. Usually, this will be an additional Ethernet board beside the first one, which is used by Windows. CeWin can control this Ethernet board directly.

Using the standard TCP/IP protocol, any additional Windows CE products can be used together with CeWin, e. g. development systems like Platform Builder or Kernel Tracker. As Windows CE and Windows XP run on the same processor, no special host is required for the development.

For the run time system, TCP/IP sockets etc. can be used for proprietary communication protocols between Windows and Windows CE programs. Alternatively standard mechanisms like DCOM or SOAP may be used for communication.

From the point of view of the Windows CE or the Windows XP applications there is no difference between running under CeWin on the same PC or as usual running on two different systems. Host and target system are identical.



Loading and starting of CeWin

After Windows XP is up and running, CeWin can be started by uploading the Windows CE image file with a little loader tool which is a Win32 application and easily can be integrated into a user written Windows XP application. This application communicates with the CeWin interface driver which was loaded during the boot sequence of Windows XP. Initially, the loader calls the driver to allocate memory that Windows CE later uses for code and data. The allocated memory is guaranteed to be fixed (not swapped to disk) and the code running in this memory has the highest privilege level (Ring 0). The next step of the loader is to read the Windows CE image from disk, and copy it to the allocated memory on behalf of the driver. After the code and data are relocated to the loading address, Windows CE is started by calling the init function of Windows CE. As soon as all initialization tasks are idle, the init function returns and the loader terminate. From now on, Windows CE only will be activated by real time interrupts followed by task scheduling.



Activation of CeWin by interrupts

The interrupts for Windows CE as well as for Windows are received directly from the Programmable Interrupt Controller (PIC) of the PC. However, the real time Extension technology assures that the interrupts enabled for Windows CE always have higher priority than everything in Windows (including Windows interrupts). These interrupts will interrupt Windows XP or CeWin tasks within a few microseconds and call the corresponding Windows CE interrupt service routine (ISR). After returning from the ISR, but before returning to Windows, the system checks, if there are any Windows CE tasks ready to run. If this is the case (one or more tasks has been activated within the ISR), the system will not return to Windows, but it will activate the corresponding Windows CE task, first. Those tasks keep on running until all of them will be suspended again. The system then enters the idle task of Windows CE, which will lead to a return to Windows XP. Since Windows XP only will be re-activated, if all Windows CE tasks are idle, one can say that Windows XP runs as the idle task of Windows CE. The Windows CE idle task controls the re-activation of Windows. This makes it possible for the programmer to control the sharing of the processor between the two operating systems.




State diagram of CeWin



Exception Handling of Windows CE

Whenever Windows CE is activated via the ISRs a new exception table is loaded by only one assembler instruction. Therefore the exception handling for page faults, debugging, and so on is exactly the same as it is by Windows CE running stand alone. Before falling back to Windows, its exception table is re-loaded.
The arithmetic Co-Processor also can be used within CeWin without any restrictions. Since it is possible that the interrupted Windows has the Co-Processor currently in use, the state of the arithmetic Co-Processor is saved whenever Windows CE needs it and restored before returning to Windows.

Target Market
  • Real Time Extender for Windows XP using Windows CE
  • PC-based automation (PLC, Motion Control)
  • Real Time Measurements and Controls
  • PC and HMI add on for existing Windows CE applications
  • Windows CE target simulation with real time behavior and hardware access

Technical Features
  • Full usage of the RTOS Windows CE concurrently to desktop Windows
  • Multitasking, Intertask communication, Win32 API
  • TCP/IP Stack, ISAPI, ASP, SOAP etc.
  • Optional Products
  • Runtime environment for C, C++, C#, Visual Basic etc.
  • Software only solution, no additional hardware necessary
  • Usage of the well known Microsoft development tools for desktop Windows as well as for the RTOS development
  • Graphical real time analysis tools (Kernel Tracker etc.)
  • High resolution real time timer, granularity ca. 0.8 us
  • Hardware access to ISA and PCI plug in boards
  • Usage of the original Win32 API for Windows CE
  • All additional features of Windows CE are usable
  • Communication between desktop Windows and Windows CE via shared memory TCP/IP. Usage of DCOM or SOAP possible.
  • Access of the Windows hard disc (using a directory share)

Commercial Features
  • No need for additional intelligent co-processor board nor separate control
  • Reduction of hardware costs
  • Less hardware components: Reduction of failures
  • More compact controls possible
  • Small learning curve
  • Known tools (Visual Studio, Visual Basic etc.)
  • Win32 API
  • Re-usage of existing Windows CE Software and Know How is possible
  • Two scaled versions available
  • Low cost entry product CeWin LE (Light Edition)
  • Full version CeWin PE (Professional Edition)

How to work with it?
  • Microsoft tools as the Integrated Development Environment (IDE) to develop and debug real time applications
  • Wizards to generate applications
  • Development, test and debugging of the real target (no simulation) possible on the same PC with Visual Studio
  • Communication between desktop Windows and Windows CE via shared memory TCP/IP
  • Start and stop of the RTOS can be done after Windows is up and running by a Win32 application. This application can be built in into a user application (DLL).


Author Heinrich Munz is a strategic product manager at KUKA Roboter GmbH, a Windows Embedded MVP company.




Discuss Windows CE and Windows XP together on the same PC
 
>>> Be the FIRST to comment on this article!
 
 
 
>>> More Windows For Devices Articles Articles          >>> More By Staff
 



Windows XP for Embedded Applications
This white paper describes the benefits of using Windows XP when developing embedded applications.

A Manager's Guide to Selecting a Mobile Device Operating System
This white paper offers a comparative review of Microsoft Windows CE and Windows Mobile.

Visual Basic 6.0 to .NET Migration
This paper focuses on the methodology and techniques which Infosys (Microsoft Technology Center) has developed for migrating VB 6.0 Applications to .NET. Our approach ensures a smooth, cost effective, and efficient migration.

Mobile Device Security: Securing the Handheld, Securing the Enterprise
This whitepaper identifies security threats to corporate data on mobile devices and details how mobile devices can become a "backdoor" to the enterprise.

Mobile Device Security: The Eight Areas of Risk
It's common knowledge that adding mobile devices to your network increases security risks. There are multiple facets to mobile security, all of which should be paid close attention to. This E-Guide presents a more in depth look into the eight key areas of securing wireless devices.

Quality Assurance and .NET
This paper discusses best practices for functional, regression and load testing of .NET applications.

SCADA Security in Integrated Networks
As businesses leverage their SCADA systems by integrating them into the business networks, they must also assure the security of the SCADA system.

The Advantages of Small Form Factor HMI
HMIs have mutated and changed with new requirements, and they have become more flexible and capable. And while they've been doing that, they've become smaller and more useful.

9 Critical Requirements for Web Application Security
Learn why your Web applications expose dangerous security breaches and what’s required to effectively protect your Web applications and the sensitive information behind them.

Got a HOT tip?   please tell us!
Free weekly newsletter
Enter your email...
Click here for a profile of each sponsor:
PLATINUM SPONSORS
(Become a sponsor)

ADVERTISEMENT
(Advertise here)

Updated! The latest Windows-powered...

mobile phones!

other cool
gadgets

HOT TOPICS
Microsoft targets PNDs with new embedded OS
Microsoft tips .NET MF 3.0 highlights
Microsoft previews Windows Embedded Standard
Microsoft offers free Windows CE 6.0 textbook
Microsoft renames embedded operating systems
Microsoft unveils Windows Mobile 6.1
New Atom models target low-cost PCs
REFERENCE GUIDES
Windows Device Showcase
Intro to Windows Embedded
Intro to Shared Source
Real-time Windows Embedded
Windows Embedded books
Join our Windows Embedded discussion forums:
Windows XP Embedded
Windows CE
Windows Mobile


Windows Embedded developer newsgroups
Windows CE
XP Embedded
PocketPC
Smartphone

Microsoft's Windows Embedded resources
Embedded dev center
Mobile dev center
Windows CE tutorials
XP Embedded tutorials
Windows Embedded seminars
Windows Embedded application categories
3rd-party partners


BREAKING NEWS

• Pico-ITX PC takes to the road and the skies
• Thin client offers legacy ports
• Boards add watchdog functionality to PC/104-Plus systems
• 11.6-inch netbook has AMD processor
• Microsoft planning riposte to Google's "Chrome OS"?
• Embedded student competition winner is buggy (on purpose)
• Asus preps convertible netbooks
• Media-savvy reference design sports touchscreen, DVB-H
• Sony joins the netbook fray
• 2010 Census kicks off with Windows Mobile
• Sprint offers 99-cent netbook
• SODIMM module has industrial focus
• Microsoft picks finalists in Embedded Development competition
• Cortex-A8 SBCs target signage and kiosks
• Student competition offers a different kind of fireworks


MOST POPULAR (last 90 days)
• "Netbook" uses Intel's Atom N270
• Windows CE takes on Linux in low-end netbooks
• HTC ups Touch resolution
• Microsoft unleashes new embedded OS
• Windows Mobile phone gets 800 x 480 display
• HTC spins WiMAX phone?
• Smart camera sports Atom
• Dual-core AMD netbook gets rave review
• Windows Mobile 7 "delayed"
• GPS phone uses new Marvell "Tavor" chip
MOST POPULAR (Classics from the vault)
Windows XP Embedded USB boot
Troubleshooting Windows XPe's blue screen "Stop 0x0000007B" error
Asus reveals $190 mini notebook
Windows Mobile 6 SDKs available for download
Windows Mobile VPN client plays with Cisco
HTC adds GPS to Windows Mobile Touch line
Microsoft unveils Windows Mobile 6.1
Guide to HTC's Windows Mobile smartphone platforms
• HTC releases Touch Diamond ROM upgrade
Customizing Windows XP Embedded thin clients

Also visit our sister sites:

Sign up for WindowsForDevices.com's...


Or, follow us on Twitter...