You are on page 1of 6

In the context of software development, debugging can be considered

as an art and as said Every art is incomplete without good &


sophisticated tools, there is no exception in this case too.
Developers face troubles when their application crashes due to
unhandled exceptions/Invalid memory accesses. In the absence of
good tools, tracking the exact cause of these software errors in the
code will take up your lot of development time and effort.
Microsoft Visual Studio with Windows CE tools provides run time
debugging support. This will come for a great rescue when you are
facing Data abort exceptions or application hanging. Also step by step
execution enables you to find some of known/unknown/hidden bugs
which are very difficult to trace in a manual debugging method.
This post explains the step-by-step procedure on How to use the
Visual Studio debugging tool to run/debug your standalone
C/C++ application build for Windows CE 5.0 or 6.0 devices.
Debugging is possible even when your application is deployed and
running on your WinCE device platform.
So here are the 4 simple steps after which you will start analyzing
your code like never before!
Note: It is assumed that the reader knows how to download a WinCE
image(NK.bin) to the target device either through EBOOT or by any
other means.
Step 1: Setting the Project Properties:
Set the project properties by right clicking on your solution and
selecting Properties.
Recent Posts
iWaves Yet Another Design
Win with i.MX6 Qseven
Module August 9, 2014
Yocto for i.MX6 Qseven
SOM August 8, 2014
Categories
Select Category
Archives
August 2014
July 2014
May 2014
April 2014
March 2014
February 2014
January 2014
December 2013
November 2013
October 2013
September 2013
August 2013
July 2013
June 2013
February 2013
December 2012
November 2012
Search
Debugging WinCE Device Applications
4 Easy Steps!
January 23rd, 2012 | Posted by Ashfaque Ahamed in Embedded Technology
POSTS NEWSLETTERS PRODUCTS FPGA IP CORES
LATEST & INNOVATIVE INFO ABOUT US
Project Properties
Select Deployment option under Configuration Properties. Select
Windows CE 5.0 device as the Deployment device. Click OK to save
the changes.
Device Deployment
Step 2: Configuring the device options.
Go to Tools->Options and select the Device Tools->Devices.
August 2012
July 2012
June 2012
March 2012
January 2012
December 2011
Select Windows CE 5.0 device->Properties. Make sure the Transport
is set as TCP Connect Transport and Bootstrapper is set as
ActiveSync Startup Provider.
Select the Configure and check Use specific IP address. Set this IP
address as read from the target device. You can get the device IP
address with ipconfig command.
Step 3: Preparing the device for connection
Boot the device with your WinCE 5.0 or 6.0 image (NK.bin). Wait till
default WinCE desktop comes up.
Copy the following 6 Apps/Dlls from
C:\Program Files\Common Files\Microsoft
Shared\CoreCon\1.0\target\wce400\armv4i
to
My Device->Windows folder in the target device.
1. Clientshutdown.exe
2. CMAccept.exe
3. ConmanClient2.exe
4. DeviceDMA.dll
5. eDbgTL.dll
6. TcpConnectionA.dll
Start the connection by running following commands in sequence.
Before that open the command prompt in the device and make your
current directory as Windows with cd windows command.
Start ConmanClient2.exe
Start CMAccept.exe
After running CMAccept.exe, you should start debugging by
connecting to the device.
Go to Visual Studio IDE and Connect to device from Tools->Connect
to Device. For the first time connection, a dialog will open asking for
the correct device. Select Windows CE 5.0 device and press Connect.
A dialog box with Connection Succeeded message should be
displayed. If any error messages are shown, try following.
1. Make sure the IP address of the target device is same as that set in
the Device Properties (Refer Step 2).
2. Run the ConmanClient2.exe and CMAccept.exe applications in the
target device again. Then try reconnecting the device.
Step 4: Start Running/Debugging the application
You can put breakpoints at any place in the application, just go to
the line and press F9.
Start debugging by Debug->Start Debugging or by pressing F5. This
will compile your application again(if any changes) and load the
generated exe to the target device and run.
You can also do step by step debugging by pressing F10 or stepping
into/ stepping over a block of code by pressing F10 and F11
respectively.
You can stop the debugging by Debug->Stop Debugging.
If there any run time exceptions, the debugger automatically points
the place of exception with Call Stack details.
Hope this method helps programmers working with WinCE Device
Applications.
Best of Luck!
Let others know about this
Copyright 2014 iWave Systems Technologies Pvt. Ltd.. Designed by
Application Debugging , Windows CE 6.0
You can follow any responses to this entry through the RSS 2.0 Both comments
and pings are currently closed.

You might also like