Thursday, August 16, 2007

Windows CE CEDebugX

On his blog, Mike Hall introduces one of the cool new features available with the Windows CE SP1, the CEDebugX. This tool gives you the possibility to debug your platform applications and drivers, by detecting memory leak, memory corruption, deadlocks ....
Here's a link to the MSDN Channel 9 Video Page - and a link to the full screen video (WMV).


Wednesday, August 15, 2007

Debugging technics for Windows CE (Part 2)

In Part1, we removed the driver or the application from the Windows CE image, but how to make sure that the file in my RAM file system is the last one I built !! Because if I modify my application and I did not re-download my Windows CE image, there is an instance of my driver or application already available in the RAM file system (downloaded by the OS on the previous launch of this module).There is an option in Platform Builder to force the system to always load the file from the desktop even if an instance is available on my RAM file system. You have to go in Target followed by Release Directory Modules then click on Add, and select the corresponding binary file in the list.
Now the OS will load it frmo your hard drive..


Tuesday, August 14, 2007

Debugging technics for Windows CE (Part 1)

Everybody want to reduce the time used to debug developments, so I will share with you my tips to spend less time in debugging for your drivers, applications ...
First things that we can avoid is to download the Windows CE image to the device every time we made a modification of the driver or the application. So the idea is to exclude the driver or the application from the nk.bin. So in that case how my driver or application can be loaded ?
If KITL is enable in your Windows CE image you have by default an NFS (Network Filesystem) mounted in the RAM filesystem under Release folder. This NFS is the content of you _FLATRELEASEDIR on you desktop computer. By using this NFS you can access the content of your _FLATRELEASEDIR directly from Windows CE. When accessing a file for loading, the OS is using this NFS partition to find missing files in the current RAM filesystem. In our case the file is not available in the RAM filesystem but in the NFS partition, so the OS will copy it from this network path to the RAM filesystem.
In other words, if your binary file is not in the NK.bin but available on your harddrive in the _FLATRELEASEDIR, the system will be able to load it.

You can imagine now how to avoid the download of the Windows CE image every time you modify your source code.


Tuesday, August 7, 2007

Windows CE 6.0 and SDKs

Every time you have to develop an application using VS2005 for Windows CE devices (smart devices) you have to generate the SDK associated to the OSDesign used to generate the current Windows CE binary image.
The SDK contains all the API enabled by selecting components in the OSDesign for the Common component and specific components (drivers, BSP applications, ...). Those APIs will be available in you VS2005 project, so the compiler will be able to build your application. This protect you on the usage of unsupported API by your Windows CE Image, in that case checking is done a build time and not at runtime.
Under VS2005 development environment they are some restrictions, that will be solved in the future by Microsoft (Hope so !). You must add the following components to your OSDesign, even if you do not need those functionalities :
  • AYGShell API Set
  • Windows Networking API/Redirector (SMB/CIFS)
Otherwise you will have that kind of error during the build :
fatal error C1083: Cannot open include file: 'winnetwk.h': No such file or directory