How To Install and Use Visual C++ 6.0 Debugger with Windows CE 2.11 Target Devices (264038)



The information in this article applies to:

  • Microsoft Windows CE Operating System, Versions 2.11

This article was previously published under Q264038

SUMMARY

There are a number of options for debugging applications on Windows CE target devices including Windbg, PlatformBuilder (PB) IDE debugger, and Visual C++ (VC++) IDE debugger. This article explores the details of setting up and using the Visual C++ IDE debugger.

MORE INFORMATION

The following steps take you through the set up and usage of the Visual C++ 6.0 debugger to debug an application developed for a Windows CE target device. You do not need any other debug services like eshell, ceterm, or Windbg.

Prerequisites:
  • Microsoft Windows CE Platform Builder version 2.11.
  • Microsoft Visual C++ 6.0.
  • Microsoft Windows CE Toolkit for Visual C++ 6.0.
  • Microsoft Windows NT 4.0 with Service Pack 4 or later.
  • An x86 (CEPC) target device.
  • A bi-directional parallel port (for downloading).
  • A compatible product ethernet adapter (for debugging).
  • An optional serial port (for watching debug messages).
  1. Open a build window for your platform (for example, CPEC-Maxall). Before you invoke the Build window, make sure that the build icon's properties are similar to: C:\WINNT\system32\CMD.EXE /k C:\WINCE211\public\common\oak\misc\wince.bat x86 i486 CE MAXALL CEPC

  2. Set the environment variable CEPC_NE2000_ISA=1. This specific environment variable value is for an ISA based network card; yours may be different. For more information, refer to the "environment variables" topic in the Platform Builder Online documentation.
  3. Make sure that the ...\release\platform.reg file is updated with the net card interrupt and IO base address as follows:
    [HKEY_LOCAL_MACHINE\Comm\NE20001\Parms]
       "BusNumber"=dword:0
       "BusType"=dword:1
       "InterruptNumber"=dword:0B      ; change this to your hex interrupt
       "IoBaseAddress"=dword:240       ; change this to your hex base address
    					
  4. At the Build window navigate to the release directory and run the makeimg command. Do not do a full build or you will overwrite the platform.reg changes you made.
  5. At the Build window, to open a CESH window, type:
    start cesh -p cepc nk.bin
    					
  6. At a DOS prompt on the CEPC target, type:
    loadcepc /b:38400 /c:1 /d:2 /p nk.bin
    You will see progress bars on the CEPC target and in the CESH window during the download. You should then see a Windows CE> prompt in the CESH window. Your operating system is now running.

  7. Run Platform Builder 2.11. To open Platform Builder, follow these steps:
    1. From the Build menu, click Export SDK ... and then click Maxall211.exe (Maxall211.exe is a self-extracting EXE file).
    2. Select a directory in which you will store the SDK, and then follow the remaining instructions.
    After the export, run the program to install all the DLL files and Include files for your platform into the Visual C++ environment.

    NOTE: This step is performed only once per installation. After you complete this step, your Visual C++ menus are updated and you can connect to your target platform.

  8. Click the Test button. An animated cable between a workstation and a target is displayed. When the connection has been established, the following message appears:
    Connection to device established.
    Select OK in all the dialog boxes until you return to the main Visual C++ user interface.
  9. To download the EXE file you built to your target, from your Visual C++ Build menu, click Update Remote Output File. You can now use the IDE debugger from Visual C++. A debug toolbar appears after debugging starts.
NOTE: This debugger configuration is very slow. Each single-step in the debugger takes about 10-15 seconds to run and return. This is due to how the cemon.exe file (the agent that handles debug interactions with the workstation) handles page exceptions. This is a known problem.

REFERENCES

Platform Builder 2.11 BooksOnLine, MSDN January 2000

Modification Type:MinorLast Reviewed:3/9/2005
Keywords:kbhowto kbSCRAPKeep KB264038