You can debug a Windows Embedded Compact application right on your device as you develop it. This debug method uses an Ethernet connection and Visual Studio, but it does not require you to use Platform Builder. That is, your application is a stand-alone Visual Studio solution; it is not a subproject of an OS design solution in Platform Builder. This article is intended for developers who have intermediate knowledge of Windows Embedded Compact.

In this article:

 


Prerequisites

Before you begin this procedure, verify that your setup meets the following software, hardware, and network prerequisites:

  • Hardware: Your device has an Ethernet port and also supports a non-Ethernet file transfer method, such as a USB drive or an SD card drive.
  • Software: Your device runs Windows Embedded Compact 7. Your development computer has Visual Studio 2008 installed.
  • Windows Embedded Compact OS configuration: Your Windows Embedded Compact 7 OS is configured to support network utilities (such as Ipconfig.exe), a console window, a non-Ethernet file transfer method, such as a USB drive or an SD card drive, and a connection to a LAN. If you are an OEM (the OS designer), see Developing an Operating System Design for information about how to configure your Windows Embedded Compact 7 OS.
  • Platform Builder settings: Your Windows Embedded Compact 7 OS does not have the kernel-independent transport layer (KITL) or the kernel debugger enabled in Platform Builder. To disable KITL and the kernel debugger in the OS image, see How to Keep the OS Functioning When Disconnecting from Platform Builder.
  • Application is stand-alone: Your application is a stand-alone Visual Studio solution (it is not a subproject of an OS design solution in Platform Builder). You based your application on an SDK for the Windows Embedded Compact OS that is running on your device.
  • Network: Your development computer and your device are connected to the same LAN.
  • Setup: Your application was created in Visual Studio, and the OS is running on your device.

 

Step-by-step

Step 1: Copy the connectivity files to your device

In order for your development computer to connect to your device, copy the following files to any directory on your device by using Windows Explorer and a USB drive:

  • Clientshutdown.exe
  • Cmaccept.exe
  • ConmanClient2.exe
  • DeviceDMA.dll
  • eDbgTL.dll
  • TcpConnectionA.dll

On your development computer, these files are automatically installed when you install Visual Studio 2008. They typically install to C:\Program Files\Common Files\Microsoft Shared\CoreCon\1.0\Target\Wce400\<Target device>. For example, the files to use for the TI OMAP 3530 EVM: ARMv7 BSP are in C:\Program Files\Common Files\Microsoft Shared\CoreCon\1.0\Target\Wce400\Armv7. 

 

Step 2: Obtain the IP address of your device

Obtain the IP address of your device by doing a command-line search of the Ethernet adapter settings.

To obtain the IP address of your device

  1. On your device, open a console window.
  2. At the command prompt, type: ipconfig

    The console window should display the Ethernet adapter settings.  (If it does not, Ipconfig.exe may not be supported by your OS.)

  3. Write down the IPv4 Address. 

 

Step 3: Prepare Visual Studio to connect to your device

You need to prepare Visual Studio to connect to your device before you prepare your device to connect with Visual Studio.

To prepare Visual Studio to connect to your device

  1. Open your application's Visual Studio project.
  2. On the Tools menu, click Options.
  3. In the left pane, click Device Tools, and then click Devices.
  4. In the right pane, in the Show devices for platform list, select the SDK that you used to create your application. 
  5. In the Devices list, select your device.
  6. Click Properties.
  7. In the Properties dialog box, to the right of the Transport list, click the Configure button.
  8. In the Configure TCP/IP Transport dialog box, under Device IP address, select Use specific IP address.
  9. Enter your device's IP address.
  10. Click OK three times to return to Solution Explorer.

Visual Studio is now prepared to connect to your device. In Step 4, you prepare your device to connect to Visual Studio.

 

Step 4: Prepare your device to connect to Visual Studio

Now that you have set up Visual Studio to connect to your device, you need to prepare your device to connect to Visual Studio.

To prepare your device to connect to Visual Studio

  1. On your device, open a console window, and by using the command line, navigate to the directory to which you copied the connectivity files.
  2. At the command prompt, type: conmanclient2
  3. Open another console window, and again, navigate to the directory to which you copied the connectivity files.
  4. At the command prompt, type: cmaccept

 

 Important
Quickly move to the next step because you have only three minutes to initiate a connection between your development computer and your device.

 


Step 5: Deploy your application for debugging

  • In the Visual Studio project for your application, on the Debug menu, click Start Debugging.

    Visual Studio will connect to your device and download your application onto it.

You can now debug your application on your device.

 


Community Resources

 


See Also