This eliminates the trouble of re-generating NK images.ProgramThe debugging flow driver is efficient, fast, and transparent.
1. Compile the driver source file under EVC to generate the driver DLL.
Note: Pay attention to project setting during compilation. To add the driver's export file, add/DEF: "IR. def ", this step is very important, otherwise the driver cannot be called by the application.
2. Use EVC to compile a dynamic driver program, for example:
// Dynamically load the stream driver;
Handle m_hir;
M_hir = registerdevice (text ("irc"), 1, text ("irc. dll"), 1 );
If (m_hir = NULL ){
Dwerr = getlasterror ();
Strerr. Format (L "error code = % d \ n", dwerr );
: MessageBox (null, strerr, _ T ("irc device test program"), mb_ OK );
}
// Uninstall the stream driver;
Deregisterdevice (m_hir );
M_hir = NULL;
3. Copy the DLL file generated by the driver project to the Windows directory of the target platform, and then use the application to dynamically load the driver.
In the driver, you can use retailmsg to track and debug the driver. The debugging information is printed from the serial port of the platform.