Saturday, August 30, 2008

XP Embedded: ACPI Issues while Building for Multi-Core Processor Systems

By now you are very well adjusted to building XPE images for single processor systems utilizing the "Advance Configuration and Power Interface (ACPI) PC" component. However, if you're like me and use an XPE initial .slx template to get your project started with the basic features, you may run into some issues with collisions between two or more components. In particular, if you have imported a PMQ file that is derived from a multi-core processor system and you use your single core template to start building, you will find that there is an error: 1106 that will stop your dependency check process from completing. The reason behind this is that your PMQ file has inherited the "ACPI Multiprocessor PC" component into the build. Since you already have your previous ACPI component included, there is a conflict.

To resolve the error, simply disable "Advance Configuration and Power Interface (ACPI) PC" and re-run your dependency checker. You should find that it completes without a problem and allows you to proceed to the build process.

Tuesday, August 5, 2008

XP Embedded: Upgrading Components in Target Designer

So you've been buiding XPe images under SP1 with no problem and made a choice to upgrade to SP2 w/ Feature Pack 2007. Some may have noticed that when the device PMQ is added to the build, an error is now seen as follows "Error 1120: Configuration needs to be upgraded. Service pack level mismatch between current configuration and some components". You will also notice that your PMQ does not show settings options.
To correct this, you need to upgrade the whole configuration. Right Click on *Components* and click upgrade. This should upgrade the whole configuration.

Thursday, July 17, 2008

Windows CE Platform Builder 6.0 and Visual Studio 2008

Some of you may have already tried running Platform Builder for Windows CE 6.0 on Visual Studio 2008 and have been unsuccessful. It appears as though Platform Builder for CE 6.0 has strict requirements of being run on Visual Studio 2005 Professional. When an attempt is made to install over Visual Studio 2008, a message stating that the system does meet the minimum requirements will stop you dead in your tracks.

Windows CE 6.0 - Errors Generated adding Platform Manager

Do you receive an error message after adding the Platform Manager catalog item into your OS Design in Platform Builder for Windows CE 6.0?

In Platform Builder for Windows CE 5.0, Platform Manager was a common feature added to manage the connectivity between the target CE device and the development workstation running Visual Studio 2005. With the introduction of Windows CE 6.0, the Platform Manager resources were no longer included in the install under what should have been the C:\WINCE600\OTHERS\platman\ directory. For some reason or other, the catalog area was overlooked and the Platform Manager radio selection is still available within Platform Builder for Windows CE 6.0. For developers migrating from CE 5.0 to CE 6.0, it may be a common habit to add the Platform Manager feature. However, CE 6.0 now utilizes CoreCon for connectivity between a target device and Visual Studio 2005. It is now required for the developer to start ConManClient2.exe and CmAccept.exe from the target CE device in order to debug or deploy a run time image. Both of these executables have a 3 minute window for Visual Studio 2005 to establish connectivity.

Thursday, June 26, 2008

Embedded System Demo Boot Time Comparison

The following post reflects the different boot times experienced on the same platform running XP Embedded when the compact flash card is swapped to one with better performance. The one on the right has the compact flash with better performance.

Wednesday, June 18, 2008

Hibernate Once Resume Many (HORM) Benchmark

This can serve as a general reference for Windows XP Embedded boot up time performance differences between using Hibernation Once Resume Many (HORM) and standard booting.

The following test were run on a Celeron M 1GHz with a 1G Apacer compact flash card.

1. System with 512MB DRAM memory
Normal boot: 43.7 seconds
HORM boot: 24.2 seconds

2. System with 256MB DRAM memory
Normal boot: 38.9 seconds
HORM boot: 19.9 seconds

The results above should vary depending on the compact flash card being used as well. The important information to look at is not the total time, but the time differential between Normal boot and a HORM boot.

What is Enhanced Write Filter (EWF)

Enhanced Write Filter (EWF) provides the ability to write-protect a run-time image. By redirecting all write requests to either a separate disk partition or RAM, EWF allows the run-time image to maintain the appearance of a writeable run-time image.


Windows XP Embedded uses EWF.
Windows XP PRO does not use EWF.

Tuesday, June 17, 2008

DLL Registration Issues

Often times during installations, it may be found that it is impossible to install software that has previously been installed with no problems. After some investigation, you may find that this is attributed to a DLL not being registered in Windows correctly.

This is commonly verified when a regsvr32 with the .dll's name is called and an error stating that it could not register the dll occurs even though the file can clearly be seen in the directory where it resides.

This type of problem is characteristic of the .dll file becoming corrupt. Even though the file appears in the directory, it may still be corrupt and thus the message: " .dll was loaded but the .dll RegisterServer entry point was not found. The file cannot be located" will be seen.

To correct the issue, the following can be used:

1) Download a new copy of the .dll that is needed for the software application to the desktop.
2) Find the original .dll file in the directory and rename it to dll file name “OLD” or similar.
3) Copy and paste the desktop .dll file into the directory.
4) Go to: Start>run Type: “cmd” > Type “regsvr32 name of .dll”>enter.

One other alternative should the above fail, is to run the system file checker tool.

To run this XP native tool:

1) Start > run > Type: sfc /scannow
2) Insert XP Pro CD to copy any files that should be found to be missing or corrupt.

If this is a custom .dll file provided by a 3rd party vendor and is not native to the XP Pro build, I would strongly suggest contacting the 3rd party vendor for the .dll file with the issue.

Creating a DOS Bootable USB KEY

With the ever popular USB Keys increasing in size and convenience, many have requested directions on how to make one USB bootable. This will of course be dependent on the BIOS supporting the USB boot feature on the unit in question and the proper setup of the USB Key device. Provided the device is USB bootable and the appropriate setting have been made to the BIOS to boot from a USB device, here are the instructions for setting up the USB KEY:

Create a DOS bootable floppy disk on a separate machine such as a desktop that has a floppy drive attached to it. Just in case you do not have a prepared DOS bootable disk to boot from ready and are a little hazy on how to create it, you can get the free boot disk creator from bootdisk.com. This will provide you the utility which you can use to make a DOS bootable floppy Disks.
The utility will automatically look for a floppy to create DOS bootable:








For USB Key, you will need to use a utility called "HP USB Disk Storage Format Tool" which you can download from http://files.filefront.com/HPUSBFWEXE/;7241778;/fileinfo.html.
The utility is used as follows:



















The Device section should have a drop down menu to select the USB Key device that you would like to create into a DOS bootable drive (mine is a SanDisk Cruzer). In addition to the device, you will also need to check mark the area that reads "Create a DOS startup disk" and "using DOS system files located at:" (in my case this was the G drive). Use the square browse box to select the location of your DOS bootable floppy created above (it may be a:\ in your case).
Select "Start" to see the following:





Select "Yes" and see:























At this point, your USB Key drive should be DOS bootable.

Intel Embedded Display Chipset Behavior

Lost VGA display when boot up without a monitor connected on previous boot

Background:
The problem that many embedded users are faced with comes from using the on board VGA/CRT connector as the primary display rather than the on board LVDS/TTL flat panel output.

Under XP Embedded (or XP Pro for that matter), if the unit is boot up without a display connected to the primary VGA/CRT display, the user is greeted with a blank screen the next time they try to boot into the desktop. From a users perspective, it is an unacceptable behavior as they are no longer able to see anything on the screen to make modifications to correct the problem. However, in actuality, the chip set driver is behaving as it should. Since the chip set is an embedded chip set (typically used on laptops), it contains and expects LVDS (flat panel) output which would translate to the flat panel display you see on your laptop. Unfortunately, the Intel Graphics Media Accelerator driver for the chip set does not have the ability to detect that an LVDS panel is connected to the chip set therefore when no CRT display is detected, it assume that an LVDS panel is connected and sets itself to output to LVDS discarding any settings on the Intel Graphics Media Accelerator driver. For this same reason (since it cannot detect LVDS - whether connected or disconnected), it does not restore the settings to the driver once back in the OS (because it assumes that an LVDS panel is connected from this point on until told otherwise through a manual settings change).

Solution 1:
The manual settings changes are located in the Intel Graphics Media Accelerator driver. Essentially, the user needs to regain the primary display to VGA/CRT by using CTRL+ALT+F1. However, the Hot Keys must be enabled as seen below:

















(Hotkeys are typically enabled by default)

Solution 2:
Embedded motherboard manufacturers also offer custom BIOS modifications to disable the flatpanel output making the on board VGA/CRT the primary display (even after it enters the operating system). If booting the unit without a VGA/CRT monitor is a common practice, it may be a better idea to contact the motherboard manufacturer for a customized BIOS to address the display behavior.

Solution 3:
Intel provides the Intel Embedded Graphics Driver 8.0 editor to modify the display chipset output behavior. The utility can be downloaded from the following site: http://downloadcenter.intel.com/T8Clearance.aspx?url=/13824/eng/IEGD_8_0_GOLD_1063.exe&agr=Y&ProductID=2159&DwnldID=13824&lang=eng

Chipsets effected:

Intel 965GME
Intel 945GM/GME
Intel 915G/GV/GM/GMS
Intel 910GMLE
Intel 855GM
Intel 852GM/GME

Windows Embedded Standard 2009

The next generation of Windows XP Embedded Operating Systems from Microsoft is Windows Embedded Standard 2009. This operating system will be targeting developers that do not wish to spend time on the operating system development but rather concentrate on their specific software application. The operating system will be distributed as an install (like XP Pro) where options can be selected or deselected depending on the application needs.

The standard features will include:

- Support for Windows Server 2008
- Remote Desktop Protocol
- Security & Management
- Wi-Fi Protected Access 2
- Microsoft Silverlight
- Windows Internet Explorer 7
- Windows Media Player 11
- Microsoft .NET Framework 3.5

The targeted markets will be:

Advanced Set-top Boxes
Fuel Pumps
Full Featured Point of Service
Gaming Devices
Home Automation Gateways
Industrial Controls
Intelligent Appliances
Multimedia Internet Devices
Kiosks
Media Servers
Mobile Point of Service
Monitoring Devices
Multi-Function Printers
Networked Media Devices and Servers
Windows-based Terminals

Reference:
http://www.microsoft.com/windows/embedded/products/westandard/default.mspx

Thursday, May 31, 2007

Windows CE > Intel IXP-422 BSP

The Intel IXP-422 is an embedded RISC based processor tailored for Networking applications. Specification on this processor can be downloaded from the following link: http://www.intel.com/design/network/products/npfamily/ixp422.htm

The Board Support Package (BSP) can be found on the Third Party Solutions for Windows CE 5.0 CD under board support packages.

If you are currently working with this processor or plan to in the near future, I encourage you to install this and begin getting familiar with the environment.

Tuesday, May 15, 2007

Windows CE > How to use Debug under Microsoft Visual Studio 2005

With Microsoft Visual Studio 2005 released for use for development and Windows CE 6.0, many I have gone ahead and come up with a simple step by step process for using the debugging features.

Steps for process:

(1) Copy "commanclient2" and "cmaccept" to the target machine running Windows CE

(2) You will then need to make sure you get a hold of Visual Studio 2005 Professional version (will not work on standard version)

(3) Start Visual Studio and navigate to "tools> options".

(4) Further navigate to "device tools > devices" highlight the "Windows CE 5.0 Devices" tab and select "properties".

(5) Under these properties, select "TCP Connect Transport" for Transport.

(6) Select "Configure" and add the IP address of the remote CE machine.

(7) At this point, you should be able to add breakpoints on your program to analyze a specific segment of choice.

(8) Simply right click the line that will have a breakpoint included and "Insert Breakpoint"

(9) Use multiple breakpoints to step over from breakpoint to breakpoint depending on the area that you would like to monitor.

(10) Start both .exe files in step "1" on the remote CE machine by double clicking them (not in command prompt).

(11) Hit "start debugging" from Debug drop down menu.

(12) Choose Windows CE 5.0 Device > Deploy.

(13) At this point the program should be observed to be running on the CE machine up until the point where the breakpoint was inserted.

(14) Debug > Windows > Auto can be used to show the current variable values to compare to expected values.

(15) Debug has a "time out" period, therefore if no activity is observed by the machine, debug will time out and will need to be re-started.

Saturday, April 7, 2007

Windows CE > Support list according to RISC CPUs

Current embedded software supported on RISC based CPUs are as follows:

- XScale
o IXP-422 - WinCE 5.0 / 6.0
o PXA-255 - WinCE 4.2
o PXA-270 - WinCE 5.0 / 6.0
o Monahan - WinCE 6.0
- Freescale
o IMX31 - WinCE 5.0
- Cirrus Logic
o EP9315 - WinCE 5.0

Windows CE 6.0 > Release, highlights and changes

WinCE 6.0 has now been released by Microsoft being the embedded operating system to succeed WinCE 5.0. The WinCE 6.0 Kernel offers a considerably larger expanded address space and more processes than that of WinCE 5.0.

New support features and changes:
- The number of supported processes has been increased from 32 to 32K!
- Both User mode and Kernel mode drivers are now supported
(User mode drivers interface with the kernel through a dedicated API rather than direct)
(Kernel mode drivers interface directly with the kernel)
- 32 MB address space for processes has now been increased to 1GB!
- CE 5.0 drivers can be ported over CE 6.0 in most cases
- No longer offer document viewers in CE 6.0.
(Document viewers were outsourced for CE 5.0.)


Unsupported Kernel APIs:

API Porting information
CeZeroPointer
This is no longer supported.
GetCurrentPermissions
Completely impossible, remove it. Likely this call wraps code that accesses another process’ virtual memory space; verify that the addresses you’re using are now getting duplicated / aliased for you, or else you will need to do so yourself.
MapPtrToProcess
This is no longer supported. If this is being used to access an API argument, you can remove the mapping call. If this is being used to access a pointer that is passed inside a structure or through some other means, you would need to explicitly switch to calling buffer marshalling and unmarshalling APIs.
MapCallerPtr
This is no longer supported. If this is being used to access an API argument, you can remove the mapping call. If this is being used to access a pointer that is passed inside a structure or through some other means, you would need to explicitly switch to calling buffer marshalling and unmarshalling APIs.
SetKMode
Completely impossible, remove it. Likely this call wraps code that accesses another process’ virtual memory space; verify that the addresses you’re using are now getting duplicated / aliased for you, or else you will need to do so yourself.
SetProcPermissions
Completely impossible, remove it. Likely this call wraps code that accesses another process’ virtual memory space; verify that the addresses you’re using are now getting duplicated / aliased for you, or else you will need to do so yourself.

* For more details click on: http://msdn2.microsoft.com/en-us/library/aa910715.aspx

Windows XP Embedded > Feature Pack 2007 Release

Microsoft announced the new XP Embedded Feature Pack 2007 on November 1st 2006.

The major improvements with this FP:

(1) USB Boot, File Based EWF
(2) XPE image Footprint Reduction
(3) .Net Frame Work 2.0 (used to be available only by OEM request)

For Detail, please click the following link : Microsoft FP2007 Specification

Windows CE > How to create a shortcut

1) Create a new text file on your desktop machine and name it as you’d like (ex. Deskshort.txt).
2) Edit your Deskshort.lnk file by opening it with some text editor and including text consistent with the following:

[number of ASCII characters]#[The linked file path] [optional parameters]
3) In our example, the text entered in our .lnk file will read as follows:
22#”\Windows\Deskshort.exe
(*red text above represents 22 characters. Thus the “22#”)
4) Change the extension of the file you have just created to “.lnk” (will now read Deskshort.lnk).

5) Copy the Deskshort.lnk file to the release folder where build project is located
(\WINCE500\PBWorkspaces\ABC\RelDir\ABC_ARMV4I_Release)
6) Open platform.bib and add the following line in the FILES section of the file:
Deskshort.LNK $(_FLATRELEASEDIR)\Deskshort.LNK NK S
Save the changes and exit
7) Open platform.dat and add the following line:
Directory("\Windows\LOC_DESKTOP_DIR"):-File("MyShortcut.lnk","\Windows\Deskshort.lnk")
Save the changes and exit
8) Go back to workspace that will have the shortcut added into and select “Make Run-Time Image" from the Build OS drop down menu.
Resulting desktop will now have desktop.

Windows CE > How to Auto Run an application after bootup

1) In our example we will get Platform Settings (MyConfigurator.exe) to Auto Run as soon as our system boots
2) There are two ways to get the application to run depending on at what point you want the application to run.
a. Before anything else runs (ie. explorer)
b. After system has settled at the desktop.

*Before Anything else runs:
· Open platform.reg and add the following line:


[HKEY_LOCAL_MACHINE\init]
"Launch50"="MyConfigurator.exe"
"Depend50"=hex:14,00,1E,
Save the changes and exit. The LaunchXX key (where XX is a numeric value) simply points at the executable to launch and gives it it’s order (50 is usually explorer.exe). In the above case, the registry launches three processes, Shell, Device, and GWES. Device.exe (Launch20) has a dependency on Hex:0a (10 decimal). This equates to Launch10, or shell.exe, so the Shell process needs to signal the operating system that it's up and running so that any dependencies (in this case device.exe) can then be started. The same is also true of gwes.exe (launch30), device.exe depends on hex:14 (20 decimal), so GWES can't run until device.exe calls SignalStarted.
You can have multiple dependencies; for our case the dependencies will be on hex:14,00,1e,00 (Launch20 and Launch30), so both Device and GWES need to be up and running before the shell starts.
Go back to workspace that will have the Auto Run application added and select “Make Run-Time Image from the Build OS drop down menu.
* After system has settled at the desktop
· You simply need to change the code previously added in the platform.reg file to the following:

[HKEY_LOCAL_MACHINE\init]
"Launch79"="MyConfigurator.exe"
"Depend79"=hex:14,00,1E,00

· The above entry will no longer override the launch number that is originally used by explorer.exe and launch the application with the same dependencies as our example seen in “Before anything else runs”.

Windows CE > How to add a 3rd Party driver

There are two methods of adding a 3rd party driver in a workspace to be used on a specific platform.
a. Using a .cab file.
b. Manually modifying workspace files to include the driver into a platform build.

For our examples, we will assume that a fundamental knowledge of building a standard image is already known and that we are working with an existing workspace.

*Using a .cab file:
· Often times the 3rd party vender will provide the driver files and registry entries in the form of a .cab file. This allows the user to double click the .cab file to install all necessary drivers, resource files, and registry entries into their appropriate location.
a. Key Notes about .cab files:
i. Usually disappear upon implementation (make a copy!)
ii. Created using Visual Studio
iii.To use in your platform, CAB File Installer/Uninstaller must be added to the workspace in Platform builder.

*Manually adding in a 3rd party driver:
1) 3rd party vendor will provide the necessary driver .dll file, .reg file, and .bib file to be added to your workspace.

2) Once you have the necessary files from the vendor, open the workspace that will have the 3rd party driver added to it.

3) You will need to add the driver file in question into the workspace release folder (In this example we will use a touch screen driver):

Ex:\WINCE500\PBWorkspaces\ABC\RelDir\ABC_ARMV4I_Release

(Our touch screen driver in this case will called “touch_ce.dll”)

4) Open the platform.bib file and add the following entry provided by the vendor:

touch_ce.dll $(_FLATRELEASEDIR)\touch_ce.dll NK SH
Save and exit text editor
5) Open the platform.reg file and add the following entry provided by the vendor:
[HKEY_LOCAL_MACHINE\HARDWARE\DEVICEMAP\TOUCH] "DriverName"="Touch_CE.dll"
"CalibrationData"="2161,2497 701,1418 693,3573 3542,3545 3516,1399"
"MaxCalError"=dword:10
Save and exit text editor
6) Go back to workspace that will have the 3rd party driver added and select “Make Run-Time Image" from the Build OS drop down menu.