CN108647131B - Output system of running log - Google Patents
Output system of running log Download PDFInfo
- Publication number
- CN108647131B CN108647131B CN201810306274.1A CN201810306274A CN108647131B CN 108647131 B CN108647131 B CN 108647131B CN 201810306274 A CN201810306274 A CN 201810306274A CN 108647131 B CN108647131 B CN 108647131B
- Authority
- CN
- China
- Prior art keywords
- log
- control unit
- operation log
- intelligent chip
- micro control
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Active
Links
- 238000004891 communication Methods 0.000 claims description 63
- 238000000034 method Methods 0.000 claims description 29
- 238000010586 diagram Methods 0.000 description 11
- 230000006870 function Effects 0.000 description 11
- 238000012545 processing Methods 0.000 description 5
- 238000004590 computer program Methods 0.000 description 4
- 230000008569 process Effects 0.000 description 3
- 238000012360 testing method Methods 0.000 description 2
- 238000005538 encapsulation Methods 0.000 description 1
- 238000005516 engineering process Methods 0.000 description 1
- 230000003993 interaction Effects 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 230000002093 peripheral effect Effects 0.000 description 1
- 230000004044 response Effects 0.000 description 1
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/30—Monitoring
- G06F11/34—Recording or statistical evaluation of computer activity, e.g. of down time, of input/output operation ; Recording or statistical evaluation of user activity, e.g. usability assessment
- G06F11/3466—Performance evaluation by tracing or monitoring
- G06F11/3476—Data logging
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/30—Monitoring
- G06F11/34—Recording or statistical evaluation of computer activity, e.g. of down time, of input/output operation ; Recording or statistical evaluation of user activity, e.g. usability assessment
- G06F11/3466—Performance evaluation by tracing or monitoring
- G06F11/3495—Performance evaluation by tracing or monitoring for systems
Landscapes
- Engineering & Computer Science (AREA)
- General Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Computer Hardware Design (AREA)
- Quality & Reliability (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Debugging And Monitoring (AREA)
Abstract
The invention provides an output system of an operation log, which comprises: the system comprises an intelligent chip and a micro control unit which are configured on the same electronic device, wherein the intelligent chip bears an operating system of the electronic device, and the micro control unit runs a preset program of the electronic device; the micro control unit sends a target operation log to the intelligent chip, wherein the target operation log is an operation log generated by the micro control unit operating the preset program; and the intelligent chip receives the target running log and adds the target running log into a system log of an operating system so as to output the system log in a remote debugging mode when a remote output instruction aiming at the running log of the micro-control unit is detected. By the technical scheme of the invention, the running log can be saved; meanwhile, the running log can be output to the outside in a remote mode, and therefore output efficiency and user experience of the running log are improved.
Description
Technical Field
The invention relates to the technical field of terminal log processing, in particular to an output system of an operation log.
Background
A Microcontroller Unit (MCU) in an electronic device cannot store an operation log generated by the MCU due to limited storage space and processing capability, so that a developer cannot view the historical operation log of the MCU. Meanwhile, in the related art, remote viewing is not supported when the real-time running log of the MCU is output, but a developer needs to connect the electronic device on which the MCU is mounted to a serial port debugging tool (e.g., a computer) using a serial port line first, and then run the MCU and output the real-time running log through the serial port debugging tool. Therefore, in the related technology, developers must arrive at the site of the electronic equipment to call the real-time running log of the MCU, so that the efficiency is low, and the user experience is poor.
Disclosure of Invention
In view of this, the present invention provides an output system for running logs, which can solve the problem that the historical running logs of the MCU cannot be saved, and can support remote checking when the real-time running logs of the MCU are output, thereby improving the efficiency of outputting the running logs and user experience.
In order to achieve the purpose, the invention provides the following technical scheme:
according to a first aspect of the present invention, there is provided an output system of a running log, comprising: the system comprises an intelligent chip and a micro control unit which are configured on the same electronic device, wherein the intelligent chip bears an operating system of the electronic device, and the micro control unit runs a preset program of the electronic device;
the micro control unit sends a target operation log to the intelligent chip, wherein the target operation log is an operation log generated by the micro control unit operating the preset program;
and the intelligent chip receives the target running log and adds the target running log into a system log of an operating system so as to output the system log in a remote debugging mode when a remote output instruction aiming at the running log of the micro-control unit is detected.
According to a second aspect of the present invention, an output method of an operation log is provided, which is applied to an intelligent chip of an electronic device, wherein a micro control unit is further configured in the electronic device, the intelligent chip carries an operating system of the electronic device, and the micro control unit runs a preset program of the electronic device; the method comprises the following steps:
receiving a target operation log sent by the micro control unit, and adding the target operation log into a system log of an operating system, wherein the target operation log is an operation log generated by the micro control unit operating the preset program;
and outputting the system log in a remote debugging mode when a remote output instruction aiming at the running log of the micro-control unit is detected.
According to a third aspect of the present invention, an output method of an operation log is provided, which is applied to a micro control unit of an electronic device, wherein an intelligent chip is further configured in the electronic device, the intelligent chip carries an operating system of the electronic device, and a preset program of the electronic device is run by the micro control unit; the method comprises the following steps:
sending a target operation log to the intelligent chip, so that the intelligent chip adds the target operation log to a system log of an operating system, and outputting the system log in a remote debugging mode when a remote output instruction for the operation log of the micro-control unit is detected; the target operation log is an operation log generated by the micro control unit operating the preset program.
According to a fourth aspect of the present invention, an output device of an operation log is provided, which is applied to an intelligent chip of an electronic device, wherein a micro control unit is further configured in the electronic device, the intelligent chip carries an operating system of the electronic device, and the micro control unit runs a preset program of the electronic device; the device comprises:
the receiving unit is used for receiving the target running log sent by the micro control unit and adding the target running log into a system log of an operating system, wherein the target running log is a running log generated by the micro control unit running the preset program;
and the output unit is used for outputting the system log in a remote debugging mode when a remote output instruction aiming at the running log of the micro-control unit is detected.
According to a fifth aspect of the present invention, an output device of an operation log is provided, which is applied to a micro control unit of an electronic device, wherein an intelligent chip is further configured in the electronic device, the intelligent chip carries an operating system of the electronic device, and a preset program of the electronic device is run by the micro control unit; the device comprises:
the sending unit is used for sending a target running log to the intelligent chip so that the intelligent chip adds the target running log to a system log of an operating system, and outputting the system log in a remote debugging mode when a remote output instruction aiming at the running log of the micro-control unit is detected; the target operation log is an operation log generated by the micro control unit operating the preset program.
According to a sixth aspect of the present invention, there is provided an electronic device comprising: the system comprises a micro control unit and an intelligent chip, wherein the micro control unit runs a preset program of the electronic equipment, and the intelligent chip bears an operating system of the electronic equipment;
the micro control unit is used for sending a target operation log to the intelligent chip, wherein the target operation log is an operation log generated by the micro control unit operating the preset program;
the intelligent chip is used for receiving the target running log and adding the target running log into a system log of an operating system so as to output the system log in a remote debugging mode when a remote output instruction aiming at the running log of the micro-control unit is detected.
According to the technical scheme, the running log of the micro-control unit in the electronic equipment is added to the system log of the operating system of the electronic equipment, so that on one hand, the running log can be saved; on the other hand, the function of supporting remote debugging based on the system log can output the operation log to the outside in a remote way, and developers do not need to arrive at the site of the electronic equipment to call the operation log, so that the output efficiency of the operation log and the user experience are improved.
Drawings
Fig. 1 is a schematic diagram of a manner of outputting a run log in the related art.
Fig. 2 is a schematic diagram illustrating an output system for running a log according to an exemplary embodiment of the present invention.
Fig. 3 is a flowchart illustrating an output method based on a log of the smart chip according to an exemplary embodiment of the present invention.
Fig. 4 is a flowchart illustrating an output method based on a log of a micro control unit according to an exemplary embodiment of the present invention.
Fig. 5 is a flowchart illustrating an output method of a run log according to an exemplary embodiment of the present invention.
FIG. 6 is a schematic diagram illustrating one manner of outputting a run log in accordance with an exemplary embodiment of the invention.
FIG. 7 is a schematic diagram illustrating another manner of outputting a run log in accordance with an exemplary embodiment of the invention.
Fig. 8 is a schematic structural diagram of an electronic device based on a smart chip side according to an exemplary embodiment of the present invention.
Fig. 9 is a block diagram illustrating an output apparatus of the operation log according to an exemplary embodiment of the present invention.
Fig. 10 is a schematic structural diagram of an electronic device based on a micro control unit side according to an exemplary embodiment of the present invention.
Fig. 11 is a block diagram illustrating another output apparatus of the operation log according to an exemplary embodiment of the present invention.
Detailed Description
Reference will now be made in detail to the exemplary embodiments, examples of which are illustrated in the accompanying drawings. When the following description refers to the accompanying drawings, like numbers in different drawings represent the same or similar elements unless otherwise indicated. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present invention. Rather, they are merely examples of apparatus and methods consistent with certain aspects of the invention, as detailed in the appended claims.
The terminology used herein is for the purpose of describing particular embodiments only and is not intended to be limiting of the invention. As used in this specification and the appended claims, the singular forms "a", "an", and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise. It should also be understood that the term "and/or" as used herein refers to and encompasses any and all possible combinations of one or more of the associated listed items.
It is to be understood that although the terms first, second, third, etc. may be used herein to describe various information, these information should not be limited to these terms. These terms are only used to distinguish one type of information from another. For example, first information may also be referred to as second information, and similarly, second information may also be referred to as first information, without departing from the scope of the present invention. The word "if" as used herein may be interpreted as "at … …" or "when … …" or "in response to a determination", depending on the context.
Due to the fact that storage space and processing capacity of the MCU in the electronic equipment are limited, the MCU cannot store the running log generated by the MCU, and therefore developers cannot check the historical running log of the MCU. Meanwhile, in the related art, remote viewing is not supported when the real-time running log of the MCU is output, but a developer needs to connect the electronic device on which the MCU is mounted to a serial port debugging tool by using a serial port line, and then run the MCU and output the real-time running log through the serial port debugging tool. For example, as shown in fig. 1, when a developer checks an operation log (i.e., a real-time operation log) generated by the MCU100 in the android phone 10 in real time, the android phone 10 needs to be connected to the serial port debugging tool 20 (e.g., a notebook computer) through the serial port line 30, so that the MCU100 in an operating state outputs the operation log generated in real time to the serial port debugging tool through the serial port line 30, and the developer checks the real-time operation log of the MCU100 through the serial port debugging tool 20.
However, in the related art, the manner of outputting the real-time running log must be reached by the developer to the site of the electronic device, which results in inefficiency and poor user experience.
Therefore, the present invention solves the above-mentioned technical problems in the related art by improving a manner of outputting the operation log of the MCU. The following examples are given for illustrative purposes.
Referring to fig. 2, fig. 2 is a schematic diagram illustrating an output system of a log according to an exemplary embodiment of the present invention. As shown in fig. 2, the output system includes a smart chip 102 disposed on the same electronic device 10, and a micro control unit 100, where the smart chip 102 carries an operating system of the electronic device 10, and the micro control unit runs a preset program of the electronic device 10.
The micro control unit 100 sends a target operation log to the smart chip 102, where the target operation log is an operation log generated when the micro control unit operates the preset program;
the smart chip 102 receives the target operation log, and adds the target operation log to a system log of an operating system, so as to output the system log in a remote debugging mode when a remote output instruction for the operation log of the micro control unit 100 is detected.
Therefore, in the output system of the invention, the running log of the micro-control unit in the electronic equipment is added to the system log of the operating system of the electronic equipment, so that on one hand, the running log can be saved; on the other hand, the function of supporting remote debugging based on the system log can output the operation log to the outside in a remote way, and developers do not need to arrive at the site of the electronic equipment to call the operation log, so that the output efficiency of the operation log and the user experience are improved.
Referring to fig. 3, fig. 3 is a flowchart illustrating an output method of a log based on a smart chip according to an exemplary embodiment of the present invention. The output method is applied to an intelligent chip of electronic equipment, a micro-control unit is also configured in the electronic equipment, the intelligent chip bears an operating system of the electronic equipment, and the micro-control unit runs a preset program of the electronic equipment. As shown in fig. 3, the output method may include the steps of:
In this embodiment, the target operation log is an operation log generated when the micro control unit operates the preset program.
In this embodiment, the target operation log is encapsulated in a log field of a communication data packet by a micro control unit, the communication data packet further includes an identification field, and the identification field is used for marking the type of the log in the log field; the micro-control unit can therefore store a log identification in the identification field to indicate that the log field of the marked communication data packet contains the log generated by the micro-control unit. Based on the above encapsulation manner for the target operation log, the intelligent chip may first receive the communication data packet sent by the micro control unit, and then determine whether the identification field of the communication data packet contains the operation log identification; and when the identification field of the received communication data packet contains the running log identification, reading the log contained in the log field in the communication data packet, and adding the read log to the system log of the operating system. By adding the running log of the micro-control unit to the system log of the operating system (the intelligent chip supports saving of the system log), the saving function of the running log can be realized.
And step 304, outputting the system log in a remote debugging mode when a remote output instruction aiming at the running log of the micro-control unit is detected.
In this embodiment, the system log based on the smart chip supports the remote debugging function, and the operation log can be output to the outside in a remote manner (that is, the system log is output to the outside, and the system log includes the operation log of the micro control unit), so that a developer does not need to arrive at the site of the electronic device to call the operation log, and the output efficiency and the user experience of the operation log are improved.
Accordingly, fig. 4 is a flowchart illustrating an output method based on a log of the micro control unit according to an exemplary embodiment of the present invention. The output method is applied to a micro control unit of the electronic equipment, an intelligent chip is also configured in the electronic equipment, the intelligent chip bears an operating system of the electronic equipment, and the micro control unit runs a preset program of the electronic equipment. As shown in fig. 4, the output method may include the steps of:
In this embodiment, the micro control unit sends a target operation log to the smart chip, so that the smart chip adds the target operation log to a system log of an operating system, and outputs the system log in a remote debugging mode when a remote output instruction for the operation log of the micro control unit is detected; the target operation log is an operation log generated by the micro control unit operating the preset program.
Specifically, the micro control unit may encapsulate the target operation log in a log field of a communication data packet, store an operation log identifier in an identifier field of the communication data packet (the operation log identifier is used to indicate that the log field of the marked communication data packet contains the operation log generated by the micro control unit), and send the communication data packet to the intelligent chip. The micro control unit can send the communication data packet to the intelligent chip through a preset link (the preset link is used for transmitting data between the micro control unit and the intelligent chip and can comprise the following types of USB, SPI and IIC). By adding the operation log of the micro control unit into the system log of the operating system, the functions of saving the system log and remotely debugging the system log can be 'given' to the operation log generated by the micro control unit.
According to the technical scheme, the running log of the micro-control unit in the electronic equipment is added to the system log of the operating system of the electronic equipment, so that on one hand, the running log can be saved; on the other hand, the function of supporting remote debugging based on the system log can output the operation log to the outside in a remote way, and developers do not need to arrive at the site of the electronic equipment to call the operation log, so that the output efficiency of the operation log and the user experience are improved.
For the convenience of understanding, the technical solution of the present invention is described in detail below with reference to the interaction process between the micro control unit and the smart chip.
Referring to fig. 5, fig. 5 is a flowchart illustrating an output method of a running log according to an exemplary embodiment of the present invention. As shown in fig. 5, the output method may include the steps of:
step 502, the micro control unit encapsulates the target operation log in a communication data packet.
In this embodiment, a micro control unit (hereinafter abbreviated as MCU) is configured in the electronic device, and is used to run a preset program of the electronic device (for example, a program for power management of the whole device; a program for controlling touch channel switching of the whole device, etc.); the electronic device is further configured with an intelligent chip, and the intelligent chip is used for bearing an operating system (e.g., operating systems such as Windows, Android, Linux, etc.) of the electronic device. The MCU generates a corresponding running log when running a preset program; the intelligent chip can also generate a corresponding system log when the operating system is operated.
The MCU may encapsulate the generated operation log (i.e. the target operation log) in the log field of the communication data packet, and store the operation log identifier in the identifier field of the communication data packet, so as to indicate that the marked log field of the communication data packet contains the operation log generated by the MCU.
For example, the format of the communication data packet may be as shown in table 1:
byte bit | Byte0~Byte15 | Byte16~Byte31 | Byte32 | Byte33~ByteN |
Means of | Identification field | Label (R) | Output level | Log field |
TABLE 1
For example, the running LOG stored in the identification field is identified as "MCU _ LOG" and is used to indicate that the LOG field of the communication data packet contains the running LOG generated by the MCU; the label is "TAG _ TEST"; the output level (print level) is "7"; the content of the running log stored in the log field is "HelloWorld! N.
And step 504, the MCU sends the packaged communication data packet to the intelligent chip.
In this embodiment, the electronic device is configured with a preset link, and the preset link is used for transmitting data between the MCU and the smart chip. Specifically, links such as a USB (Universal Serial Bus), an SPI (Serial Peripheral Interface), an IIC (Inter-Integrated Circuit Bus), and the like may be used to transmit the communication data packet; of course, other types of links may be used, and the present invention is not limited to the type of the predetermined link. Based on the configuration of the preset link, the MCU can send a communication data packet to the intelligent chip through the preset link.
Step 506, the smart chip parses the received communication data packet.
And step 508, reading the target running log by the intelligent chip.
In this embodiment, the intelligent chip determines whether the identification field includes an operation log identifier, and when the identification field of the received communication data packet includes the operation log identifier, it may determine that the communication data packet is a log packet sent by the MCU (that is, the log field of the communication data packet includes a target operation log sent by the MCU), and reads a log included in the log field of the communication data packet.
For example, in the above example, the intelligent chip may compare the first 16 bytes of data of the communication data packet, and if the data is "MCU _ LOG", determine that the communication data packet is a LOG packet sent by the MCU, and then read other contents in the communication data packet. For example, the TAG is "TAG _ TEST", the output level is "7", and the contents of the target journal are "HelloWorld! N.
Step 510, the smart chip adds the target operation log to a system log of the operating system.
In this embodiment, based on the saving function of the system log of the operating system (the system log generated when the operating system is running is saved), by adding the running log of the MCU to the system log, the saving function may be "given" to the running log, that is, the running log is saved in the system log, so that a subsequent developer can conveniently view the running log (including the historical running log and the real-time running log) of the MCU.
Step 512, the smart chip detects a remote output instruction for the operation log.
And 514, outputting the system log by the intelligent chip in a remote debugging mode.
In this embodiment, the smart chip-based system log supports a remote debugging function, so that when a remote debugging relationship is established between the electronic device and the debugging tool, the debugging tool can send a remote output instruction to the electronic device, so that the smart chip in the electronic device returns a system log (that is, the system log is output to the debugging tool in a remote debugging mode, and the system log contains an MCU operation log), and thus, developers do not need to arrive at the site of the electronic device to call the operation log (refer to the output mode in the related art), thereby improving the output efficiency of the operation log and user experience.
For example, as shown in fig. 6, the electronic device is a mobile phone 10 with an Android system; the MCU100 in the mobile phone 10 sends the operation log to the smart chip 102 through the link 101, and the smart chip 102 adds the received operation log to the system log of the Android system. The debugging tool is a notebook computer 20, and the notebook computer 20 adopts an ADB (Android Debug Bridge) to establish a remote debugging relationship with the mobile phone 10.
Then, in one case, the developer may send a remote output instruction for the running log of the MCU100 to the smart chip 102 remotely through the notebook computer 20, and the smart chip 102 outputs the system log to the notebook computer 20 in a remote debugging mode after detecting the remote output instruction; at this time, the developer can obtain the operation log included in the system log through the notebook computer 20. In another case, when the mobile phone 10 is abnormally operated, a developer may remotely view a system log (including a real-time operation log and a historical operation log of the MCU 100) through the ADB, so as to locate whether a problem is found in the program run by the MCU or in the Android system according to the log, which is helpful for the developer to efficiently solve the problem of the electronic device.
It should be noted that the present invention also supports a mode in which the electronic device outputs a system log (including an MCU operation log) to the debugging tool through the serial port line. As shown in fig. 7, in the example shown in fig. 6, a developer may connect the android phone 10 with the notebook computer 20 through the serial line 30, and then the smart chip 102 outputs the system log to the notebook computer 20 through the serial line 30, so that the developer may obtain the running log of the MCU100 included in the system log output by the smart chip 102.
According to the technical scheme, the running log of the micro-control unit in the electronic equipment is added to the system log of the operating system of the electronic equipment, so that on one hand, the running log can be saved; on the other hand, the function of supporting remote debugging based on the system log can output the operation log to the outside in a remote way, and developers do not need to arrive at the site of the electronic equipment to call the operation log, so that the output efficiency of the operation log and the user experience are improved.
Fig. 8 shows a schematic structural diagram of an electronic device based on a smart chip side according to an exemplary embodiment of the present invention. Referring to fig. 8, at the hardware level, the electronic device includes a processor 802, an internal bus 804, a network interface 806, a memory 808, and a non-volatile memory 810, but may also include hardware required for other services. The processor 802 reads the corresponding computer program from the non-volatile memory 810 into the memory 808 and then runs the computer program, thereby forming an output device of the running log on a logical level. Of course, besides the software implementation, the present invention does not exclude other implementations, such as logic devices or combination of software and hardware, and the like, that is, the execution subject of the following processing flow is not limited to each logic unit, and may be hardware or logic devices.
Referring to fig. 9, in a software implementation, the output device of the operation log is applied to an intelligent chip of an electronic device, the electronic device is further configured with a micro control unit, the intelligent chip carries an operating system of the electronic device, and the micro control unit runs a preset program of the electronic device; the output means of the operation log may include a receiving unit 902 and an output unit 904. Wherein:
a receiving unit 902, configured to receive a target operation log sent by the micro control unit, and add the target operation log to a system log of an operating system, where the target operation log is an operation log generated when the micro control unit operates the preset program;
and an output unit 904, when detecting a remote output instruction for the operation log of the micro control unit, outputting the system log in a remote debugging mode.
Optionally, the target operation log is encapsulated in a log field of a communication data packet, where the communication data packet further includes an identification field, and the identification field is used to mark a type of the log in the log field; the receiving unit 902 is specifically configured to:
receiving a communication data packet sent by the micro control unit;
when the identification field of the received communication data packet contains an operation log identification, reading a log contained in the log field of the communication data packet, wherein the operation log identification is used for indicating that the log field of the marked communication data packet contains an operation log generated by a micro-control unit;
and adding the read log into a system log of the operating system.
Fig. 10 shows a schematic structural diagram of an electronic device based on a micro control unit side according to an exemplary embodiment of the present invention. Referring to fig. 10, at the hardware level, the electronic device includes a processor 1002, an internal bus 1004, a network interface 1006, a memory 1008, and a non-volatile memory 1010, but may also include hardware required for other services. The processor 1002 reads the corresponding computer program from the non-volatile memory 1010 into the memory 1008 and then runs the computer program, thereby forming an output device of the running log on a logic level. Of course, besides the software implementation, the present invention does not exclude other implementations, such as logic devices or combination of software and hardware, and the like, that is, the execution subject of the following processing flow is not limited to each logic unit, and may be hardware or logic devices.
Referring to fig. 11, in a software implementation, the output device of the operation log is applied to a micro control unit of an electronic device, the electronic device is further configured with an intelligent chip, the intelligent chip carries an operating system of the electronic device, and the micro control unit runs a preset program of the electronic device; the output means of the operation log may include a transmitting unit 1102. Wherein:
a sending unit 1102, configured to send a target operation log to the smart chip, so that the smart chip adds the target operation log to a system log of an operating system, and output the system log in a remote debugging mode when a remote output instruction for the operation log of the micro control unit is detected; the target operation log is an operation log generated by the micro control unit operating the preset program.
Optionally, the sending unit 1102 is specifically configured to:
the target operation log is packaged in a log field of a communication data packet, and an operation log identifier is stored in an identification field of the communication data packet, wherein the operation log identifier is used for indicating that the marked log field of the communication data packet contains the operation log generated by the micro control unit;
and sending the communication data packet to the intelligent chip.
Optionally, the sending unit 1102 is further configured to:
sending the communication data packet to the intelligent chip through a preset link, wherein the preset link is used for transmitting data between the micro control unit and the intelligent chip;
wherein the preset link comprises the following types: USB, SPI, IIC.
The implementation process of the functions and actions of each unit in the above device is specifically described in the implementation process of the corresponding step in the above method, and is not described herein again.
For the device embodiments, since they substantially correspond to the method embodiments, reference may be made to the partial description of the method embodiments for relevant points. The above-described embodiments of the apparatus are merely illustrative, and the units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the modules can be selected according to actual needs to achieve the purpose of the scheme of the invention. One of ordinary skill in the art can understand and implement it without inventive effort.
In an exemplary embodiment, the present invention also provides an electronic device, which may include: the system comprises a micro control unit and an intelligent chip, wherein the micro control unit runs a preset program of the electronic equipment, and the intelligent chip bears an operating system of the electronic equipment;
the micro control unit is used for sending a target operation log to the intelligent chip, wherein the target operation log is an operation log generated by the micro control unit operating the preset program;
the intelligent chip is used for receiving the target running log and adding the target running log into a system log of an operating system so as to output the system log in a remote debugging mode when a remote output instruction aiming at the running log of the micro-control unit is detected.
The above description is only for the purpose of illustrating the preferred embodiments of the present invention and is not to be construed as limiting the invention, and any modifications, equivalents, improvements and the like made within the spirit and principle of the present invention should be included in the scope of the present invention.
Claims (12)
1. An output system of a running log, comprising: the system comprises an intelligent chip and a micro control unit which are configured on the same electronic device, wherein the intelligent chip bears an operating system of the electronic device, and the micro control unit runs a preset program of the electronic device;
the micro control unit sends a target operation log to the intelligent chip, wherein the target operation log is an operation log generated by the micro control unit operating the preset program;
and the intelligent chip receives the target running log and adds the target running log into a system log of an operating system so as to output the system log in a remote debugging mode when a remote output instruction aiming at the running log of the micro-control unit is detected.
2. An output method of an operation log is applied to an intelligent chip of electronic equipment, a micro control unit is also configured in the electronic equipment, the intelligent chip bears an operating system of the electronic equipment, and the micro control unit runs a preset program of the electronic equipment; the method comprises the following steps:
receiving a target operation log sent by the micro control unit, and adding the target operation log into a system log of an operating system, wherein the target operation log is an operation log generated by the micro control unit operating the preset program;
and outputting the system log in a remote debugging mode when a remote output instruction aiming at the running log of the micro-control unit is detected.
3. The method of claim 2, wherein the target log is encapsulated in a log field of a communication data packet, and the communication data packet further comprises an identification field, and the identification field is used for marking the type of the log in the log field; the receiving the target operation log sent by the micro control unit and adding the target operation log to a system log of an operating system includes:
receiving a communication data packet sent by the micro control unit;
when the identification field of the received communication data packet contains an operation log identification, reading a log contained in the log field of the communication data packet, wherein the operation log identification is used for indicating that the log field of the marked communication data packet contains an operation log generated by a micro-control unit;
and adding the read log into a system log of the operating system.
4. An output method of an operation log is applied to a micro control unit of electronic equipment, an intelligent chip is also configured in the electronic equipment, the intelligent chip bears an operating system of the electronic equipment, and the micro control unit runs a preset program of the electronic equipment; the method comprises the following steps:
sending a target operation log to the intelligent chip, so that the intelligent chip adds the target operation log to a system log of an operating system, and outputting the system log in a remote debugging mode when a remote output instruction for the operation log of the micro-control unit is detected; the target operation log is an operation log generated by the micro control unit operating the preset program.
5. The method of claim 4, wherein sending the target execution log to the smart chip comprises:
the target operation log is packaged in a log field of a communication data packet, and an operation log identifier is stored in an identification field of the communication data packet, wherein the operation log identifier is used for indicating that the marked log field of the communication data packet contains the operation log generated by the micro control unit;
and sending the communication data packet to the intelligent chip.
6. The method of claim 5, wherein said sending the communication data packet to the smart chip comprises:
sending the communication data packet to the intelligent chip through a preset link, wherein the preset link is used for transmitting data between the micro control unit and the intelligent chip;
wherein the preset link comprises the following types: USB, SPI, IIC.
7. An output device of an operation log is applied to an intelligent chip of electronic equipment, a micro control unit is also configured in the electronic equipment, the intelligent chip bears an operating system of the electronic equipment, and the micro control unit runs a preset program of the electronic equipment; the device comprises:
the receiving unit is used for receiving the target running log sent by the micro control unit and adding the target running log into a system log of an operating system, wherein the target running log is a running log generated by the micro control unit running the preset program;
and the output unit is used for outputting the system log in a remote debugging mode when a remote output instruction aiming at the running log of the micro-control unit is detected.
8. The apparatus of claim 7, wherein the target log is encapsulated in a log field of a communication data packet, and the communication data packet further comprises an identification field, and the identification field is used for marking the type of the log in the log field; the receiving unit is specifically configured to:
receiving a communication data packet sent by the micro control unit;
when the identification field of the received communication data packet contains an operation log identification, reading a log contained in the log field of the communication data packet, wherein the operation log identification is used for indicating that the log field of the marked communication data packet contains an operation log generated by a micro-control unit;
and adding the read log into a system log of the operating system.
9. An output device of an operation log is applied to a micro control unit of electronic equipment, an intelligent chip is also configured in the electronic equipment, the intelligent chip bears an operating system of the electronic equipment, and the micro control unit runs a preset program of the electronic equipment; the device comprises:
the sending unit is used for sending a target running log to the intelligent chip so that the intelligent chip adds the target running log to a system log of an operating system, and outputting the system log in a remote debugging mode when a remote output instruction aiming at the running log of the micro-control unit is detected; the target operation log is an operation log generated by the micro control unit operating the preset program.
10. The apparatus according to claim 9, wherein the sending unit is specifically configured to:
the target operation log is packaged in a log field of a communication data packet, and an operation log identifier is stored in an identification field of the communication data packet, wherein the operation log identifier is used for indicating that the marked log field of the communication data packet contains the operation log generated by the micro control unit;
and sending the communication data packet to the intelligent chip.
11. The apparatus of claim 10, wherein the sending unit is further configured to:
sending the communication data packet to the intelligent chip through a preset link, wherein the preset link is used for transmitting data between the micro control unit and the intelligent chip;
wherein the preset link comprises the following types: USB, SPI, IIC.
12. An electronic device, comprising: the intelligent electronic device comprises a micro-control unit and an intelligent chip, wherein the micro-control unit runs a preset program of the electronic device, and the intelligent chip bears an operating system of the electronic device;
the micro control unit is used for sending a target operation log to the intelligent chip, wherein the target operation log is an operation log generated by the micro control unit operating the preset program;
the intelligent chip is used for receiving the target running log and adding the target running log into a system log of an operating system so as to output the system log in a remote debugging mode when a remote output instruction aiming at the running log of the micro-control unit is detected.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201810306274.1A CN108647131B (en) | 2018-04-08 | 2018-04-08 | Output system of running log |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201810306274.1A CN108647131B (en) | 2018-04-08 | 2018-04-08 | Output system of running log |
Publications (2)
Publication Number | Publication Date |
---|---|
CN108647131A CN108647131A (en) | 2018-10-12 |
CN108647131B true CN108647131B (en) | 2021-04-27 |
Family
ID=63745847
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201810306274.1A Active CN108647131B (en) | 2018-04-08 | 2018-04-08 | Output system of running log |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN108647131B (en) |
Families Citing this family (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN111464505B (en) * | 2020-03-11 | 2022-04-15 | 贺雪峰 | Message processing method, device, apparatus, storage medium and processor |
CN111651308B (en) * | 2020-04-24 | 2024-01-30 | 广州视源电子科技股份有限公司 | Method and device for acquiring debugging data of DP-HDMI chip and intelligent device |
CN111767261A (en) * | 2020-05-29 | 2020-10-13 | 广州视源电子科技股份有限公司 | Debugging log output method and device, storage medium and electronic equipment |
CN114827268B (en) * | 2022-05-12 | 2024-05-10 | 合肥宏晶半导体科技有限公司 | Remote debugging method and device |
Family Cites Families (8)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JPH09288632A (en) * | 1996-04-19 | 1997-11-04 | Matsushita Electric Ind Co Ltd | Communication processor |
CN1308834C (en) * | 2002-03-15 | 2007-04-04 | 联想(北京)有限公司 | Method for getting and outputting information monitored by server through multiple approaches |
JP5376509B2 (en) * | 2009-03-16 | 2013-12-25 | スパンション エルエルシー | Execution history trace method |
CN104244320B (en) * | 2014-09-01 | 2018-01-26 | 上海大唐移动通信设备有限公司 | Daily record method for uploading and device in a kind of automatic drive test system |
CN106301845A (en) * | 2015-05-30 | 2017-01-04 | 四川泰瑞创通讯技术股份有限公司 | Switch logger module |
CN105389235A (en) * | 2015-10-28 | 2016-03-09 | 致象尔微电子科技(上海)有限公司 | Heterogeneous multi-core debug system and method |
CN106815128A (en) * | 2016-12-11 | 2017-06-09 | 乐视控股(北京)有限公司 | Log-output method and device, electronic equipment |
CN107463459B (en) * | 2017-08-14 | 2021-02-26 | 海信视像科技股份有限公司 | Method, device and system for storing system abnormal memory data and terminal equipment |
-
2018
- 2018-04-08 CN CN201810306274.1A patent/CN108647131B/en active Active
Also Published As
Publication number | Publication date |
---|---|
CN108647131A (en) | 2018-10-12 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN108647131B (en) | Output system of running log | |
KR101771910B1 (en) | Apparatus, method and system to exchange error information in a unified protocol communication | |
CN104021060A (en) | BMC serial port debugging system and method | |
WO2017032112A1 (en) | Method for communicating with board having no central processing unit and communication device | |
CN106487847B (en) | Information processing method and transfer server | |
US20050038921A1 (en) | Protocol adapter for passing diagnostic messages between vehicle networks and a host computer | |
CN109669787B (en) | Data transmission method and device, storage medium and electronic equipment | |
CN112422485B (en) | Communication method and device of transmission control protocol | |
CN115629825A (en) | Server and asset information acquisition method, asset information providing method and asset information providing device | |
CN113535578B (en) | CTS test method, CTS test device and CTS test equipment | |
CN115599191B (en) | Power-on method and power-on device of intelligent network card | |
CN105512008A (en) | Method and device obtaining fault information | |
CN111371799B (en) | Method, device and equipment for controlling data receiving and transmitting of MCTP (Multi-channel media Port) controller | |
CN114328080A (en) | Firmware state detection method and device and electronic equipment | |
CN113535580A (en) | CTS (clear to send) testing method, device and testing equipment | |
CN111386518B (en) | Operating system repair via electronic devices | |
CN113515461B (en) | Communication test method and device, electronic equipment and storage medium | |
CN116860327A (en) | Sensor data acquisition method and device, storage medium and electronic device | |
CN112257381B (en) | AXI Crossbar design circuit verification method and system | |
CN113296998B (en) | Data communication abnormality recovery method and device, electronic equipment and storage medium | |
CN113672536B (en) | Data storage system, storage module and data storage method | |
CN108923955B (en) | Interface configuration method and service card | |
CN117130625A (en) | Chip upgrading method and device, storage medium and electronic device | |
CN109257251B (en) | Multi-board-card multi-module heartbeat detection method, device and system and computer storage medium | |
CN113364564A (en) | Data transmission method, microprocessor, data transmission device and storage medium |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |