Serial port output method for debugging information in embedded system

A technology of embedded system and debugging information, applied in the field of serial communication, it can solve the problems of unsmooth operation, affecting the efficiency of software operation, and the operation interface is stuck, so as to achieve the effect of improving operation efficiency.

Inactive Publication Date: 2016-07-27
HUIZHOU DESAY SV AUTOMOTIVE
View PDF4 Cites 3 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

For the entire embedded system, if multiple processes need to output through the serial port, and each process needs to output more data, it will greatly affect the overall operating efficiency of all software in the entire embedded system
Especially when the user process simply outputs debugging information to the serial port device through the main thread, without certain optimization for this serial port output process, it will cause frequent freezes and unsmooth operation in the operation interface of the process.

Method used

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
View more

Image

Smart Image Click on the blue labels to locate them in the text.
Viewing Examples
Smart Image
  • Serial port output method for debugging information in embedded system

Examples

Experimental program
Comparison scheme
Effect test

Embodiment Construction

[0034] The implementation of the present invention will be described in detail below in conjunction with the accompanying drawings. The accompanying drawings are only for reference and description, and do not constitute a limitation to the protection scope of the present invention.

[0035] In this example, if figure 1 As shown, this embodiment provides a serial output method for debugging information in an embedded system, including:

[0036] Create a serial port service process in the embedded system, the serial port service process includes a main thread, a data buffer area and a data output thread;

[0037] The main thread takes over the debugging information data output by all user processes, and saves the input debugging information data in the data buffer in order;

[0038] The data output thread detects the data buffer area, and outputs the debugging information data stored in the data buffer area to the serial port device in sequence.

[0039] In the above embodimen...

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to view more

PUM

No PUM Login to view more

Abstract

The invention provides a serial port output method for debugging information in an embedded system. The method comprises the following steps: creating a serial port service process in the embedded system, wherein the serial port service process comprises a main thread, a data cache area and a data output thread; taking over debugging information data output by all the user processes by the main thread, and storing the input debugging information data into the data cache area in sequence; detecting the data cache area by the data output thread, and outputting the debugging information stored in the data cache area to serial equipment in sequence. According to the method provided by the invention, the debugging information of the user processes is output to the serial equipment in a non-blocking manner, the output data of the user processes is uniformly and temporarily stored through a data cache area form, and the debugging information is output in sequence in a uniform cache queue form, so that the output of the debugging information of the user processes is not influenced, the output sequence of the debugging information of a plurality of user processes can be ensured, and the operation efficiencies of the user processes can be improved.

Description

technical field [0001] The invention relates to the technical field of serial port communication of an embedded system, in particular to a serial port output method of debugging information in an embedded system. Background technique [0002] With the rapid development of information technology, many embedded devices such as mobile phones, MP3 players and smart appliances have sprung up in our lives. The development of embedded devices has also increased the development requirements of embedded software. In view of the limitations of current embedded systems on system cost, volume, power consumption efficiency, etc., in embedded software development, software developers often need to use serial devices to output debugging information to the PC for verification and development. [0003] However, although this approach is simple, because the transmission rate of the serial port is very limited, when there is a lot of output information, it will often cause the software proces...

Claims

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to view more

Application Information

Patent Timeline
no application Login to view more
Patent Type & Authority Applications(China)
IPC IPC(8): G06F13/10
CPCG06F13/102
Inventor 冯升常何平潘荣涛
Owner HUIZHOU DESAY SV AUTOMOTIVE
Who we serve
  • R&D Engineer
  • R&D Manager
  • IP Professional
Why Eureka
  • Industry Leading Data Capabilities
  • Powerful AI technology
  • Patent DNA Extraction
Social media
Try Eureka
PatSnap group products