Microsoft Windows XP Embedded: Syslogic User's Manual Document Ordercode: IPC/WINXPE-6A
Microsoft Windows XP Embedded: Syslogic User's Manual Document Ordercode: IPC/WINXPE-6A
Content
1 General Remarks 4
2 Introduction 4
2.1. Boards Supported 4
3 Getting Started 5
3.1. Booting XPe 5
3.2. User and Password Settings 5
3.3. Drive Write Protection 5
3.4. Touchscreen or PS/2 Mouse (exclusive) 7
6 Power Failure 16
6.1. Overview 16
6.2. Power Failure - FBWF enabled 16
6.3. Power Failure – FBWF disabled 16
8 Remote Debugging 18
8.1. Connect and Debug 18
11 References 27
12 Contact 27
List of figures
figure 1 – Compact Flash FBWF setup 6
figure 2 – fbwfmgr.exe utility 10
figure 3 – disk C: properties 12
figure 4 – no wear leveling 13
figure 5 – dynamic wear leveling 13
figure 6 – static wear leveling 13
figure 7 – filemon output 14
figure 8 - Auto Reboot feature 17
figure 9 - Remote Application Debugging 18
figure 10 – Remote Debugging Setup 19
figure 11 – XPe filecopy setup 21
1 General Remarks
The content and presentation of this document has been carefully checked. No responsibility is
accepted for any errors or omissions in the documentation. Note that the documentation for the
products is constantly revised and improved. The right to change this documentation at any
time without notice is therefore reserved.
Syslogic is grateful for any help referring to errors or for suggestions for improvements.
The following registered trademarks are used:
2 Introduction
Windows XP Embedded SP2 Feature Pack 2007 (short XPe) is the componentized version of
Microsoft Windows XP Professional. In fact, both Operating Systems are based on the same
binaries.
XPe is enhanced with special tools to target the needs of embedded systems that run
continuously. While a desktop OS like XP Professional is optimized for maximum user
interaction, an embedded OS is the opposite. Embedded systems often run in environments
where few user interactions are desired. Embedded systems often supervise safety critical
facilities and thus need to be very robust, reliable and autonomous.
This user manual covers some tools and techniques that help to reduce possible
software/hardware breakdowns concerning the operation of Windows XP Embedded on a
IPC/NETIPC or IPC/NETSBC based CPU in an industrial environment. It details some
embedded features that can be configured.
3 Getting Started
This chapter will give you a “quick start” on how to get XPe running on a IPC/NETPC-6A
CPU board. The same procedure applies for IPC/NETSBC and IPC/NETIPC-6L boards.
CMOS Setup:
Boot 1st: Drive C:
Ide 0: 3 = AUTOCONFIG, LBA
Hit “ESC” to leave the configuration screen and select “Write to CMOS and Exit” (confirm
with Y or Z key). Now, the system should boot into Windows XP Embedded. You do not
always have to change these CMOS settings when booting XPe, as these CMOS settings are
stored permanently if (and only if) the battery is inserted and operational. If you change the
battery, you must redo the correct settings.
This protection is achieved through the File Based Write Filter (FBWF) shipped with Windows
XP Embedded1. If FBWF is enabled (which is not the default in the Syslogic XPe Image), all
write operations to the system drive C: except the ones to the data directory are redirected to a
RAM layer, thus the Compact Flash is protected against writes (see figure 1).
C:\Windows
write-protected
C:\Program Files
by FBWF Filter
C:\*.*
not write
C:\data
protected
Per factory default the FBWF is disabled. So if you boot into XPe and change some system
settings, these settings will persist between reboots.
Note:
If FBWF is enabled, system and drive C: settings are write protected, except the files in
the folder C:\data
If you create a file C:\Windows\myfile.txt with FBWF enabled, this file will not exist after the
next reboot. We heavily encourage you to read the following sections, especially the section on
the “File Based Write Filter”, to get further information on how to enable/disable and use the
FBWF features.
1
FBWF is the successor of the „Enhanced Write Filter“ (EWF). It was first introduced in
Feature Pack 2007 for Windows XP Embedded.
Note:
PS/2 Touchscreen and PS/2 mouse can not coexist.
Of course, you must first disable the FBWF drive C: protection (see section 5.2) in order to
make the changes permanent. Also don’t forget to re-enable the FBWF protection after
uninstalling the touch screen driver. Please note that the USB driver for the mouse is not
affected and can coexist with either PC/2 mouse driver or PS/2 Touch Screen driver installed.
If you want to calibrate the PS/2 touch screen, you can use the calibration tool
C:\TOUCHSCREEN\hwincal.exe. Please note that, again, you have to disable the FBWF drive
C protection before doing the calibration.
Note:
Disable FBWF when installing/uninstalling or calibrating the touch screen.
3.5. Audio
Only the IPC/NETIPC-6A has an audio chip assembled and the audio features of XPe must be
enabled prior to using the audio features of the IPC/NETIPC-6A.
Open Start / Settings / Control Panel / System / Hardware / Device Manager and click on the
Sound, video and game controller node.
Then right click on the GeodeLX Audio Driver (WDM) and select enable to activate the audio
driver in XPe.
So do not expect to have the full Desktop XP Pro feature set included in out standard image.
But be also aware of the fact that you can install your own missing drivers and software
packages at will like on a regular Windows XP system.
Below you will find a list of features that are included/not included in our standard
configuration. This list is not complete, it may only give you an overview of the basic software
bundles that are shipped with our XPe standard image.
Features included:
- Windows XP user interface, full Desktop with Taskbar and start menu
- Command Shell, Control Panel, CMI Scripting Interface
- Internet Explorer 6.0, Windows File Explorer
- Microsoft .NET 2.0 CLR
- Microsoft Installer
- Windows Media Player 9.0
- Remote Desktop Connection, Hyperterminal
- Remote Folder Share, Drive Mapping, basic Networking utilities
- Drivers for Board Hardware (Mouse & Keyboard PS/2 & USB, Flash-Memory-Stick,
Video, Sound).
- Touch Screen driver and calibration utility.
Please consult the XPe build logfile NETIPC6_XPE_Vnnn.log from the product DVD-ROM to
see the full list of packages which are included into the XPe release.
Thus it’s extremely important to protect the Compact Flash card in terms of write accesses. The
File Based Write Filter “FBWF” shipped with Windows XP Embedded protects the flash card.
If the FBWF is enabled, every data written to drive C: is actually redirected to a RAM layer,
thus the Compact Flash is protected against writes (see figure 1).
Important:
When using Compact flash with Windows XPe, the FBWF must be enabled.
Of course, this setup results in a stateless system. After a reboot, all data previously written
will be lost. If FBWF is enabled, the Windows XPe OS is also secured against accidental
system file damages (i.e. if an application deleted some important system files.
If you want to store application data permanently, you can use the unprotected folder C:\data or
you can disable the FBWF.
To enable or disable the FBWF RAM overlay of drive C:, one must open a shell console in
Windows XP Embedded and use the following command:
This will install or remove the RAM overlay of partition drive C:. These operations require a
complete system reboot to effect the changes. Don’t expect the FBWF being enabled/disabled
just by executing the appropriate command. A power cycle is mandatory.
Important:
Each configuration change of the FBWF needs a complete system reboot until the
change is effective.
If you like to add some folders that are permanently writable, you could make use of the
“addexclusion” argument of FBWF. The following example will change the directory test state
from protected to unprotected.
Again, reboot the system and note that the directory test still exists.
For further usage examples of the FBWF manager tool, please consult the document FBWF.pdf
from the DVD-ROM.
This might be confusing but it is not a system fault. With FBWF enabled, the write cycles to
drive C: are filtered into RAM layer which is limited to 64MBytes. So if you download a file
of size 10MBytes from the Internet to the Desktop, the free space would decrease 10MBytes. If
you delete that file or if you reboot, the 10MBytes would be free again.
With FBWF disabled, you would see the “real” free space on the Compact flash card which
would be around 510 MBytes.
d
1 1 1 0 99 0
If the Compact flash card does not implement wear-leveling, then all 99 writes happen on the
same block and the flash is destroyed soon (see figure 2 – the numbers represent the write
access count of each block).
Dynamic Wear Leveling
d
1 1 1 33 33 33
If the Compact flash does implement a dynamic wear leveling algorithm, then the write
accesses are evenly distributed across the free blocks, if the application always writes to the
same file. This leads to much better endurance of the flash (see figure 3).
Static Wear Leveling
d
17 17 17 17 17 17
Maximum endurance is achieved with a Compact flash card that implements Static Wear-
Leveling. This algorithm spreads the write cycles over the entire flash capacity, including the
blocks that are protected by FBWF.
You might wonder where the FBWF protection has gone with static wear-leveling. On the first
glance, the FBWF features seem useless with a Compact flash card that implements static
wear-leveling.
If you use a file monitor tool (e.g. FILEMON from www.sysinternals.com), you will notice a
lot of write activity caused by the XPe system. E.g. if you open the internet explorer
application on the desktop, the window properties will be stored in the file user.dat as shown in
the following figure.
The main reason for FBWF is to protect the Compact flash card from suffering damage by
these XPe internal system activities. As the programmer of the embedded system often has
total control over his application and the amount of write accesses to an unprotected file, the
flash protection against user program write accesses is not the main concern/problem.
In fact, Compact flash cards implementing static wear leveling have so much better endurance
concerning write accesses, that the advantage might overwhelm the fact that the system files on
a Compact flash card implementing dynamic wear-leveling are undestroyable.
Big Picture:
dynamic wear-leveling and FBWF:
- XPe system blocks can never be damaged
- application can not write much user data to unprotected files
static wear-leveling and FBWF:
- XPe system file blocks can suffer damage when the flash wears out
- application can write much more data to unprotected files before damage can
occur.
Syslogic recommends the use of Compact Flash cards that implement Static Wear-Leveling
like the SiliconDrive™ Compact flash card from Silicon Systems.
CardSize
Years =
WriteRate ⋅ 310
Data size unit is MBytes and WriteRate is in MBytes per Second. For an application with a
Compact flash capacity of 1024 MBytes and a data file of 0.1MBytes that is written 10 times
per second, this formula results in a card endurance of 3.3 years.
With SiliconSystems Compact flash cards, the max. write transfer rate is 6MBytes/s, so the
minimal endurance for the 1024MByte card is 0.5 years, assuming full write workload.
Please note that the formula above is only an approximation and only correct for Compact flash
drives that implement Static Wear-Leveling. Drives that use other algorithms like Dynamic
Wear-Leveling or no Wear-Leveling have much less endurance.
Note: The Compact Flash block endurance is assumed as 100k write cycles in the formula
above. For other block endurance specifications, the formula can be simply scaled linear with
the block endurance enhancement factor.
6 Power Failure
6.1. Overview
Writing a file (consisting of multiple sectors/blocks) to a Compact Flash card is not an atomic
operation, so there could be a possible file system corruption upon a power loss. FAT32 file
systems typically used under Windows XP can be corrupted. NTFS file systems are less
sensitive to corruption, as they implement a journal that keeps track of the directory structure
and recovers the inconsistencies while booting. But it is also possible to corrupt an NTFS file
system.
Good to know:
FBWF also protects the system files from corruption in case of a power failure.
Good to know:
For a system with FBWF disabled, use a NTFS formatted file system.
8 Remote Debugging
Application debugging can be done from the Visual Studio .NET 200x integrated development
environment running on a distant host. The debug session runs over an Ethernet connection.
The application and its source files are built, debugged and executed on the target.
ETHERNET TCP/IP
A monitor application also runs on the target and communicates symbol information back to
the Visual Studio debugger. The XP Embedded target must share the application folder with
the Development system (map network drive).
Boot the target and try to ping it from a development system’s command window:
C:\>ping XPE
Pinging XPE [192.168.1.41] with 32 bytes of data:
Reply from 192.168.1.41: bytes=32 time<10ms TTL=128
In the same command window, use NET.EXE to map the remote XPe drive C: as a local drive
W: into the development machine.
Create your embedded application “Sample” with Visual Studio on the shared network drive
W:. In the project settings under “Debugging”, make the following configurations:
On the embedded XPe device, start the debug monitor from within a command shell.
C:>cd MSVCMON
C:\MSVCMON>msvcmon –tcpip -anyuser
.
Now you can compile the Project and start the debug session within Visual Studio on your
Development system (menu Debug/Start). Enjoy remote application debugging!
Eventually you will need to delete all partitions to set up a partition table from a fresh, clean
starting point. Select (3.) and choose the partitions to delete.
Basically we must set up one partitions for Windows XPe, system drive C. We will not give a
step-by-step guide for handling the fdisk utility here but rather show the final partition table for
XPe. You can list this partition table by pressing the key (4.).
A new partition can be created with menu entry (1.). Please set up your partition table as shown
in the table above. After setting everything up, hit ESC to save the new partition table on the
Compact flash card (You are prompted to confirm by pressing Alt-Ctrl-Delete). The partitions
need to be formatted next. Restart the IPC and execute the following commands in the shell:
You are now ready to transfer the XPe files onto the Compact flash card. Power off the
IPC/NETIPC and remove the Compact flash card.
HOST-PC
When Embedded DOS-ROM has booted, execute the following commands on the shell:
Hit y or z here to confirm. Power-cycle the IPC/NETIPC board, press and hold the “Delete”
key on the keyboard again to enter the system BIOS screen. Select “Basic CMOS
Configuration”, where you have to enter the following settings:
- Boot 1st: Drive C:
Hit “ESC” to leave the configuration screen and select “Write to CMOS and Exit” (confirm
with Y or Z key). Now, the system should boot into Windows XP Embedded from drive C:.
Note:
When first booting XPe after installing it, there’s a setup program called FBA (First
Boot Agent) running that takes a lot of time to complete (~20 minutes). Do not interrupt
the FBA or the system will get into an unstable state. After the FBA has set up
everything, Windows XPe will boot normally.
WinIo has the following function interface defined (listing not complete):
(1) Place winio.dll, winio.vxd and winio.sys in the directory where your application's
executable file resides.
(2) Add winio.lib to your project file by right clicking on the project name in the Visual C++
workview pane and selecting "Add Files to Project...".
(3) Add the #include "winio.h" statement to your source file.
(4) Call InitializeWinIo.
(5) Call the library's functions to access I/O ports and physical memory.
(6) Call ShutdownWinIo.
Copy the WINIO/Bin directory from the DVD-ROM to the Windows XPe device and run
TestProg.exe (WinIo.dll and WinIo.sys must be in the same directory as TestProg.exe).
1. GRANT OF LICENSE: Subject to the terms below, Yariv Kaplan ("AUTHOR") hereby grants you a non-exclusive,
non-transferable, non-assignable license to install and to use the downloadable version of WinIo ("SOFTWARE").
a. Redistributable Code. You may reproduce and distribute the object code form of the SOFTWARE solely in
conjunction with, and as part of, your application ("Permitted Application"); provided that you comply with the
following:
If you redistribute any portion of the Redistributable Code, you agree that: (i) you will only distribute the
Redistributable Code in conjunction with, and as part of, your Permitted Application which adds significant
functionality to the Redistributable Code and that distribution of the Permitted Application does not compete with the
AUTHOR's distribution of the SOFTWARE; (ii) you will include a valid copyright notice on your Permitted
Application; (iii) you will not permit further redistribution of the Redistributable Code; and (iv) you will indemnify,
hold harmless, and defend the AUTHOR from and against any claims or lawsuits, including attorneys' fees, that arise
or result from the use or distribution of your Permitted Application.
b. License to use Source Code. You may not sell, lease, rent, transfer or sublicense the source code of this
SOFTWARE.
2. MODIFICATION: SOFTWARE Source Code may be modified without the prior written permission of the
AUTHOR. Any modifications made to the SOFTWARE will continue to be subject to the terms and conditions of this
AGREEMENT.
3. COPYRIGHT: All rights, title, and copyrights in and to the SOFTWARE and any copies of the SOFTWARE are
owned by the AUTHOR. The SOFTWARE is protected by copyright laws and international treaty provisions.
Therefore, you must treat the SOFTWARE like any other copyrighted material.
4. TITLE: You acknowledge that no title to the intellectual property in the SOFTWARE is transferred to you. Title,
ownership, rights, and intellectual property rights in and to the SOFTWARE shall remain the exclusive property of the
AUTHOR. The SOFTWARE is protected by copyright laws of the United States and international treaties.
5. LIMITATION OF LIABILITY: You must assume the entire risk of using the SOFTWARE.
IN NO EVENT SHALL THE AUTHOR BE LIABLE TO ANY PARTY FOR DIRECT, INDIRECT, SPECIAL,
INCIDENTAL, OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OF THIS SOFTWARE, ITS
DOCUMENTATION, OR ANY DERIVATIVES THEREOF, EVEN IF THE AUTHOR HAS BEEN ADVISED OF
THE POSSIBILITY OF SUCH DAMAGE.
THE AUTHOR SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, AND NON-
INFRINGEMENT. THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, AND THE AUTHOR HAS NO
OBLIGATION TO PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR
MODIFICATIONS.
11 References
- Syslogic firmware documentation
(Document Order code: DOC/NETIPCFW-E), available at www.syslogic.ch.
12 Contact
Our distributors and system integrators will gladly give you any information about our
products and their use. If you want to contact the manufacturer directly, please e-mail a
message containing a short description of your application and your request or use one of our
request forms on our homepage.
Syslogic Datentechnik AG
Switzerland
Homepage: www.syslogic.ch