Print function summary RETAILMSG (...) DEBUGMSG (...) nkdbuplintfw (..)

Source: Internet
Author: User

 

Go to: http://blog.csdn.net/jiereliyi/article/details/4504136 whether in WinCE5.0 or WinCE6.0, we will use the print function when debugging the driver or application. In the driver, we may use DEBUGMSG (...), RETAILMSG (...), and nkdbuplintfw (..). Before using these print functions to debug our program, we need to implement the serial port printing function. In the BSP of WinCE, if you want to call DEBUGMSG (..) or RETAILMSG (..) to print information from the serial port, we must find debug at the OAL layer in our BSP. c. Implement the following four functions in this file: void OEMInitDebugSerial (void): Initialize the serial port int OEMReadDebugByte (void) used to print information: Read a byte from the serial port, when an error occurs, OEM_DEBUG_COM_ERROR is returned. If no data exists, OEM_DEBUG_READ_NODATvoid OEMWriteDebugByte (BYTE ch) is returned. Write a byte to the serial port void OEMWriteDebugString, this function is actually called by calling OEMWriteDebugByte (..). After the above four functions are implemented, You can debug the program through serial port printing. Generally, these four functions are implemented in debug. c of OAL. In BSP, we usually use three functions to print: DEBUGMSG, RETAILMSG, and nkdbuplintfw. A Brief Introduction: The nkdbuplintfw (...) function is generally only used in OAL. It can print information directly from the serial port without being affected by the compilation options. The DEBUGMSG (...) function prints information only after the project is compiled in Debug mode. If it is compiled in Release mode, the information will not be printed. RETAILMSG (..) both the Debug mode and the Release mode output debugging information. However, if you select "Enable ship Build" in "build option" in the project attribute ", then the RETAILMSG function will not print information.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.