This document describes how to build a device driver to enable stop mode debugging.
Device Driver debugging is similar to kernel-mode debugging, as drivers run as part of the Kernel. Debug versions of the drivers can be debugged using debug tools such as Lauterbach through a JTAG interface or an IDE. Other debug tools such as Metro TRK can also be used.
Most of the hardware platforms supported by Symbian platform are ICE-enabled. Kernel developers and those porting the operating system to new hardware often have access to development boards exposing the JTAG interface, which allows the use of CPU-level debuggers. Using a host PC debugger, such as Carbide.c++ or CodeWarrior configured for remote debugging, a debug ROM image (including drivers) can be downloaded to the target and debugged over a JTAG interface.
For debugging, debug versions drivers are built, and the ROM image is built to include the kernel debug DLL, which enables kernel-side (stop mode) debugging. This is done by using the STOP_MODE_DEBUGGING flag while building the ROM image. For example:
rom –v=h4hrp –I=armv5 –define=STOP_MODE_DEBUGGING
This includes the kernel extension kdebug.dll in the ROM image, which provides a stop mode debugger API.
When the ROM image is downloaded to the target, the system boots up and the Kernel or driver can be debugged using the host based IDE interface. Code can be stepped through and halted, and memory on the target can be viewed.
Symbian also provide a debug monitor (sometimes called the crash debugger) to provide information on Kernel crashes. See Debug Monitor Tool for more details.
Copyright ©2010 Nokia Corporation and/or its subsidiary(-ies).
All rights
reserved. Unless otherwise stated, these materials are provided under the terms of the Eclipse Public License
v1.0.