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.