joi, 15 septembrie 2011

Debug Windows CE Applications Via TCP/IP

It is sometimes required to debug application on Windows CE devices without an ActiveSync connection, but over TCP/IP. In order to enable debugging using Visual Studio 2005, a few setup steps are required.
1. Create a OS image or copy the files listed below in the \Windows folder. It is more convenient to create a OS image in the case that Windows CE is loaded in RAM and the copied files would be deleted upon a subsequent restart. These files can be typically found in C:\Program Files\Common Files\Microsoft Shared\CoreCon\1.0\Target\wce400\<Target CPU>, where target CPU can be for instance armv4i. There you will need to find these files:
- clientshutdown.exe
- ConmanClient2.exe
- eDbgTL.dll
- TcpConnectionA.dll

2. In Visual Studio, navigate to Tools|Options|Device Tools|Devices. Select the "Windows CE 5.0 Device" from the list of devices and click Properties.
3. In the Properties window, select TCP Connect Transport under Transport and then click Configure.
4. Under Configure TCP/IP Transport, select the IP address of the device. In my case this is Click OK to close this window and the other windows and return to Visual Studio.
5. On the device side, open the command prompt, change the directory to \Windows were you have already copied the files specified on step 1 and execute ConmanClient2.exe. After that, execute CMAccept.exe. Alternatively, you can open the Windows folder using Explorer and double click on these files in the specified order.
6. Within three minutes of performing these steps, connect to the device using Visual Studio - that is, start debugging your application against the Windows CE environment.

That's it, you are ready to go!

Niciun comentariu:

Trimiteți un comentariu