I would like to write a post about unit testing and the Windows CETK. To go deeply in this suject I would like to know your background experience with this tool or if you are using other tools for unit testing of your applications under Windows Embedded CE or Windows Mobile.
You can submit all your testimonials to nbesson.blog@gmail.com
Thanks for your help.
- Nicolas
Tuesday, January 13, 2009
Req : Using Windows CE Test Kit for Unit Testing
Posted by
Nicolas BESSON [MVP]
0
comments
Labels: Debugging, General, Windows CE 6.0, Windows Mobile
Monday, November 24, 2008
Debugging Windows Mobile devices
Another boring notification while debugging Windows Mobile devices, is linked to the default security level of the OS. On every start of the debugger, VS2005 launch required applications on the device that are not digitally signed, so device warn you.
One solution to disable those warning messages, is to disable and change the security level. Of course this will completely remove all the security on the device... so make sure to revert your changes after debugging process to avoid any damages on your device.
On the device you have to set the following :
[HKEY_LOCAL_MACHINE\Security\Policies\Policies]
"00001001"=dword:1
"0000101a"=dword:1
- Nicolas
Posted by
Nicolas BESSON [MVP]
0
comments
Labels: Debugging, VS2005, Windows Mobile
ActiveSync Tweak
If you are like me, connecting, disconnecting, all day long, various Windows Mobile and Windows CE devices to you computer through ActiveSync, at each connection ActiveSync bother you make a partnership !
Partnership are nice while it's your personal or business device and you bring it everywhere with you to get an updated schedule and email... but while you are debugging applications, you don't want to be prompted.
ActiveSync have a "secret" registry key to always associate connected device as guest and will never prompt you anymore for any partnership.
[HKEY_LOCAL_MACHINE\Software\Microsoft\Windows CE Services]
"GuestOnly"=dword:1
Set this value on your desktop computer and then plug your devices !!!
To revert this, just set GuestOnly to 0(zero) and partner ship will be enabled.
- Nicolas
Posted by
Nicolas BESSON [MVP]
1 comments
Labels: ActiveSync, Debugging, Windows CE 6.0, Windows Mobile
Tuesday, October 14, 2008
Flash back to Windows CE .Net 4.2
typedef struct _SERIAL_PACKET_HEADER
{
UCHAR headerSignature[HEADER_SIGNATURE_BYTES];
UCHAR pktType;
UCHAR Reserved;
USHORT payloadSize;
UCHAR crcData;
UCHAR crcHdr;
} SERIAL_PACKET_HEADER;
With :
- headerSignature : the signature of the header : { 'k', 'I', 'T', 'L' }
- pktType : use by KITL to identify the service associated to the frame
- payloadSize : packet data size, not including this header
- crcData : packet data check sum (simple, 8-bit crc)
- crcHdr : header data checksum (simple, 8-bit crc)
The simple 8 bits check sum algorithm :
UCHAR ComputeChecksum(PUCHAR pBuf, USHORT len)
{
USHORT s = 0;
UCHAR csum = 0;
for(s = 0; s < len; s++)
csum += *(pBuf + s);
return csum;
}
- Nicolas
Posted by
Nicolas BESSON [MVP]
0
comments
Labels: Debugging, KITL, Windows CE 4.2
Monday, February 11, 2008
Dynamic JIT Debugging [Updated]
If the debugger is not launched exceptions are not handled correctly, and second chance exceptions neither.
Inclusion of the JIT Debugger
In the project.bib file of the current OSDesign, add the following lines in the FILES section :
kd.dll $(_FLATRELEASEDIR)\kd.dll NK SHK
osaxst0.dll $(_FLATRELEASEDIR)\osaxst0.dll NK SHK
osaxst1.dll $(_FLATRELEASEDIR)\osaxst1.dll NK SHK
The files are added to the FILES instead of the MODULE section to ensure that the debugger will not be launched 'till you launch it manually.
[Update 07/25/08] You can also include the loaddbg.exe file to the runtime image to avoid the loading of this files over KITL. But do not include hd.dll, otherwise the debugger will be started automatically at startup.
OSDesign configuration
Select the following options for the OSDesign:
- Unselect Kernel debugger
- Enable KITL
Launch the debugger
To launch the debugger when required, you just have to launch the loaddbg.exe application using the target control window.
s loaddbg.exeNote : When activating the debugger, the system may take few seconds load all the symbols files from your hard drive.
- Nicolas
Posted by
Nicolas BESSON [MVP]
0
comments
Labels: Debugging, Windows CE 5.0, Windows CE 6.0
Friday, December 28, 2007
Enable Remote Display Application - CERDisp
The server :
C:\WINCE600\PUBLIC\COMMON\OAK\BIN\I386
The Client :
[HKEY_LOCAL_MACHINE\SOFTWARE\CERDISP]
"Hostname"="nameoftheserver"
Tip to use this tool :
[HKEY_LOCAL_MACHINE\COMM\TELNETD]
"IsEnabled "=dword:1
"UseAuthentication"=dword:0
Launch CERDisp :
- Nicolas
Posted by
Nicolas BESSON [MVP]
6
comments
Labels: Debugging, Windows CE 5.0, Windows CE 6.0
Tuesday, November 20, 2007
Static IP address for KITL (VMINI)
- TCP/IP
- Wired Local Area Network (802.3, 802.5)
- KITL support in you OSDesign settings
If your network have a DHCP server enable, this interface will get an IP Address automatically. If it's not the case, you will have a default IP address (169.254.50.67) associated to this network interface and unfortunately this interface cannot be used as is. You must provide a valid IP address to this VMINI network driver through the registry.
; Enable static IP address for VMINI1Note : VMINI1 is the correct key path to point to the registry settings used by this driver.
[HKEY_LOCAL_MACHINE\Comm\VMINI1\Parms\Tcpip]
"EnableDHCP"=dword:0 ; Disable the DHCP/ enable static IP
"IPAddress"="192.168.1.3"
"SubnetMask"="255.255.255.0"
Those settings must be added to your project.reg as those settings are specific to your current OSDesign and not linked to the BSP.
Using the same technique you can set a Static IP address to other network interfaces available on your device.
; Enable static IP address
[HKEY_LOCAL_MACHINE\Comm\NE20001\Parms\Tcpip]
"EnableDHCP"=dword:0 ; Disable the DHCP/ enable static IP
"IPAddress"="192.168.1.3"
"SubnetMask"="255.255.255.0"
- Nicolas
Posted by
Nicolas BESSON [MVP]
1 comments
Labels: Debugging, KITL, Windows CE 6.0
Tuesday, August 14, 2007
Debugging technics for Windows CE (Part 1)
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.
-Nicolas
Posted by
Nicolas BESSON [MVP]
0
comments
Labels: Debugging, KITL, Windows CE 6.0