Configuring a Run-time Image for Kernel-Mode Debugging (Windows Embedded Standard 2009)


To debug a device driver on a Windows Embedded Standard-based device, you must configure your run-time image to support kernel-mode debugging.

  1. On the target device, edit the Boot.ini file to start Windows kernel-mode debugging by adding the /debug /debugpoart=com1 /baudrate-1 flags to your boot ARC path. The following syntax shows an example:

    Multi(0)disk(0)rdisk(0)partition(1)\WINDOWS="Windows Embedded Standard" /debug /debugport=com1 /baudrate-1

    These flags make it possible to debug a Windows Embedded Standard-based run-time image through the COM1 port at a baud rate of 115 Kbps. You can modify both the port settings and baud rate to support your device.

  2. After the target device is configured for kernel debugging, you must update the environment variables of the host system to enable it to connect to the target device. Set the following variables:

    _NT_DEBUG_PORT=<host system debugging port>
    _NT_DEBUG_BAUD_RATE=<port baud rate>
    _NT_SYMBOL_PATH=<path to symbol files>
    The baud rate specified in the _NT_DEBUG_BAUD_RATE must match the baud rate listed in the target device Boot.ini file. These variables can be added to a batch file for ease of execution. The following syntax shows an example:
    @echo off
    set _NT_DEBUG_BAUD_RATE=115200
    set _NT_SYMBOL_PATH=C:\sym
    cd C:\debuggers
    start windbg -k

    Connect the host system to the target with a null modem cable.

Community Additions