|
|
Windows CE and Windows XP together on the same PC
2003-03-04
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:
However, both versions do support:
![]() 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
Technical Features
Commercial Features
How to work with it?
Author Heinrich Munz is a strategic product manager at KUKA Roboter GmbH, a Windows Embedded MVP company.
|