Configuring a Run-time Image for Kernel-Mode Debugging
To debug a device driver on a Windows XP Embedded-based device, you must configure your run-time image to support kernel-mode debugging.
To open a kernel-mode debugging session on the target device
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 XP Embedded" /debug /debugport=com1 /baudrate-1
These flags make it possible to debug a Windows XP Embedded-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.
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>
Note 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_PORT=COM1
set _NT_DEBUG_BAUD_RATE=115200
set _NT_SYMBOL_PATH=C:\sym
C:
cd C:\debuggers
start windbg -k
Connect the host system to the target with a null modem cable.
See Also
Remote Debugging | How to Configure a Device for Remote Debugging
Last updated on Wednesday, October 18, 2006
© 2006 Microsoft Corporation. All rights reserved.