Using WPP Software Tracing in KMDF Drivers
To add tracing messages to your framework-based driver, you must:
Add an #include directive to each of your driver's source files that contains any of the WPP macros. This directive must identify a trace message header (TMH) file. The file name must have a format of <driver-source-file-name>.tmh.
For example, if your driver consists of two source files, called MyDriver1.c and MyDriver2.c, then MyDriver1.c must contain:
and MyDriver2.c must contain:
When you build your driver in Microsoft Visual Studio, the WPP preprocessor generates the .tmh files.
Open the Property Pages for your driver project. Right-click the driver project in Solution Explorer and select Properties. In the Property Pages for the driver, click Configuration Properties, and then Wpp. Under the General menu, set Run WPP Tracing to Yes. Under the File Options menu, you should also specify the framework's WPP template file, for example:
For more information about adding tracing messages to your driver, see Adding WPP Macros to a Driver.
The AMCC5933, NONPNP, KMDF_FX2, PCIDRV, PLX9x5x, and Serial sample drivers use WPP software tracing.