CN114035855B - Firmware debugging method, device, terminal and storage medium - Google Patents

Firmware debugging method, device, terminal and storage medium Download PDF

Info

Publication number
CN114035855B
CN114035855B CN202111155816.8A CN202111155816A CN114035855B CN 114035855 B CN114035855 B CN 114035855B CN 202111155816 A CN202111155816 A CN 202111155816A CN 114035855 B CN114035855 B CN 114035855B
Authority
CN
China
Prior art keywords
firmware
kernel layer
debugging
debugging information
layer
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
Application number
CN202111155816.8A
Other languages
Chinese (zh)
Other versions
CN114035855A (en
Inventor
刘明生
桑永峰
程国凡
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Mingxin Information Technology Shanghai Co ltd
Original Assignee
Mingxin Information Technology Shanghai Co ltd
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by Mingxin Information Technology Shanghai Co ltd filed Critical Mingxin Information Technology Shanghai Co ltd
Priority to CN202111155816.8A priority Critical patent/CN114035855B/en
Publication of CN114035855A publication Critical patent/CN114035855A/en
Application granted granted Critical
Publication of CN114035855B publication Critical patent/CN114035855B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/445Program loading or initiating
    • G06F9/44505Configuring for program initiating, e.g. using registry, configuration files
    • G06F9/4451User profiles; Roaming
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/362Software debugging
    • G06F11/3648Software debugging using additional hardware
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/54Interprogram communication
    • G06F9/545Interprogram communication where tasks reside in different layers, e.g. user- and kernel-space

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Software Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Computer Hardware Design (AREA)
  • Quality & Reliability (AREA)
  • Debugging And Monitoring (AREA)

Abstract

The embodiment of the application relates to the field of electronic equipment, and discloses a method and a device for debugging firmware, a terminal and a storage medium. The debugging method comprises the following steps: the firmware sends a first message for triggering the kernel layer to acquire debugging information in the firmware to the kernel layer, wherein the first message has the highest priority, and the firmware is positioned in the terminal; after the kernel layer acquires the debugging information, the kernel layer instructs the application layer to synchronously acquire the debugging information from the kernel layer; the application layer sends configuration parameters to the kernel layer, wherein the configuration parameters are used for modifying debugging information in the debugging firmware; the firmware acquires configuration parameters from the kernel layer, and modifies the debugging information according to the configuration parameters. According to the embodiment of the application, the frame loss condition in data acquisition can be reduced, the transmission delay is reduced, and the debugging efficiency of the firmware is improved.

Description

Firmware debugging method, device, terminal and storage medium
Technical Field
The embodiment of the application relates to the field of electronic equipment, in particular to a method and a device for debugging firmware, a terminal and a storage medium.
Background
The current touch technology can be used on intelligent terminals in various industries, and in various electronic products with touch, the equipped touch chip is susceptible to environmental factors due to the sensitive and sensitive characteristics of the touch chip, including: the touch control chip needs to be debugged once the touch control chip is affected by the environment or other factors to cause abnormal touch control functions, such as power supply interference, display interference, radio frequency interference, temperature and humidity change and the like, for example, the touch control chip is accessed through external professional equipment to perform state detection, data collection and debugging and the like.
Conventionally, for debugging of firmware (for example, a touch chip) in a terminal device, when obtaining debugging information of the firmware, a frame loss situation occurs, and a data transmission delay is obvious.
Disclosure of Invention
The embodiment of the application aims to provide a method, a device, a terminal and a storage medium for debugging firmware, which reduce the frame loss condition in data acquisition, reduce transmission delay and improve the debugging efficiency of the firmware.
In order to solve the above technical problems, an embodiment of the present application provides a method for debugging firmware, including the following steps:
the firmware sends a first message for triggering the kernel layer to acquire debugging information in the firmware to the kernel layer, wherein the first message has the highest priority, and the firmware is positioned in the terminal;
the kernel layer instructs an application layer to synchronously acquire the debugging information from the kernel layer after acquiring the debugging information;
the application layer sends configuration parameters to the kernel layer, wherein the configuration parameters are used for modifying debugging information in the firmware;
the firmware obtains the configuration parameters from the kernel layer, and modifies the debugging information according to the configuration parameters.
The embodiment of the application also provides a device for debugging the firmware, which comprises: the acquisition module is used for sending a first message for triggering the kernel layer to acquire debugging information in the firmware to the kernel layer, wherein the first message has the highest priority, and the firmware is positioned in the terminal;
the synchronous module is used for indicating an application layer to synchronously acquire the debugging information from the kernel layer after the kernel layer acquires the debugging information;
the sending module is used for sending configuration parameters to the kernel layer by the application layer, wherein the configuration parameters are used for modifying debugging information in the firmware;
and the modification module is used for acquiring the configuration parameters from the kernel layer by the firmware and modifying the debugging information according to the configuration parameters.
The embodiment of the application also provides a terminal, which comprises: at least one processor; and a memory communicatively coupled to the at least one processor; wherein the memory stores instructions executable by the at least one processor to enable the at least one processor to perform the method of debugging firmware described above.
The embodiment of the application also provides a computer readable and writable storage medium, which stores a computer program, and the computer program realizes the method for debugging the firmware when being executed by a processor.
In the embodiment of the application, after the kernel layer receives the first message indication of the highest priority, the kernel layer acquires the debugging information from the firmware, and the application layer acquires the debugging information from the kernel layer in a synchronous mode. The first message has the highest priority, so that the debugging information is timely obtained from the firmware by the kernel layer, the frame loss condition can be reduced, and the transmission delay is reduced; the application layer synchronously acquires the debugging information of the kernel layer, so that frame loss is avoided, and transmission delay is further reduced. After the application layer acquires the debugging information, the configuration parameters are issued to the firmware through the kernel layer, so that the debugging information in the firmware is adjusted, the debugging process is timely and efficient, and the use experience of a user is improved.
In addition, the firmware obtains the configuration parameters from the kernel layer, and after modifying the debug information according to the configuration parameters, the firmware further comprises: sending the first message to the kernel layer; the first message is used for triggering the kernel layer to acquire the modified debugging information from the firmware; after the kernel layer acquires the modified debugging information, the kernel layer instructs an application layer to synchronously acquire the modified debugging information from the kernel layer; the application layer detects whether the modified debugging information accords with a preset threshold value, and if so, the application layer finishes the debugging. That is, closed loop feedback is performed after one-time debugging, so that the correctness of the debugging result of the firmware is ensured.
In addition, the kernel layer obtains the debugging information in the firmware, including that the kernel layer obtains the debugging information in the firmware to a first storage space of the kernel layer; the kernel layer is further provided with a second storage space, and the second storage space is used for storing copied debugging information in the first storage space and is used for the application layer to acquire the debugging information. That is, the two storage spaces in the kernel layer are respectively in butt joint with the application layer and the firmware, when the first storage space receives the debugging information of the firmware, the second storage space can supply the application layer to obtain the debugging information copied from the first storage space, namely, the kernel layer can receive and send data with both the application layer and the firmware at the same time, and the time delay in the data transmission process is reduced.
Drawings
One or more embodiments are illustrated by way of example and not limitation in the figures of the accompanying drawings, in which like references indicate similar elements, and in which the figures of the drawings are not to be taken in a limiting sense, unless otherwise indicated.
FIG. 1 is a flow chart of a method of debugging firmware provided in accordance with one embodiment of the present application;
FIG. 2 is a schematic diagram of a debugging device for firmware provided in accordance with one embodiment of the present application;
fig. 3 is a schematic diagram of a terminal provided according to an embodiment of the present application.
Detailed Description
For the purpose of making the objects, technical solutions and advantages of the embodiments of the present application more apparent, the following detailed description of the embodiments of the present application will be given with reference to the accompanying drawings. However, those of ordinary skill in the art will understand that in various embodiments of the present application, numerous technical details have been set forth in order to provide a better understanding of the present application. However, the claimed application may be practiced without these specific details and with various changes and modifications based on the following embodiments. The following embodiments are divided for convenience of description, and should not be construed as limiting the specific implementation of the present application, and the embodiments can be mutually combined and referred to without contradiction.
The terms "first", "second" in embodiments of the application are used for descriptive purposes only and are not to be construed as indicating or implying relative importance or implicitly indicating the number of technical features indicated. Thus, a feature defining "a first" or "a second" may explicitly or implicitly include at least one such feature. In the description of the application, the terms "comprising" and "having," and any variations thereof, are intended to cover a non-exclusive inclusion. For example, a system, article, or apparatus that comprises a list of elements is not limited to only those elements or units listed but may alternatively include other elements not listed or inherent to such article, or apparatus. In the description of the present application, the meaning of "plurality" means at least two, for example, two, three, etc., unless specifically defined otherwise.
One embodiment of the application relates to a method for debugging firmware. The specific flow is shown in figure 1.
Step 101, firmware sends a first message for triggering the kernel layer to acquire debugging information in the firmware to the kernel layer, wherein the first message has the highest priority, and the firmware is positioned in a terminal;
step 102, after obtaining the debugging information, the kernel layer instructs the application layer to synchronously obtain the debugging information from the kernel layer;
step 103, the application layer sends configuration parameters to the kernel layer, wherein the configuration parameters are used for modifying debugging information in the firmware;
step 104, the firmware obtains the configuration parameters from the kernel layer, and modifies the debugging information according to the configuration parameters.
In this embodiment, after receiving the first message indication with the highest priority, the kernel layer obtains the debug information from the firmware, and the application layer obtains the debug information from the kernel layer in a synchronous manner. The first message has the highest priority, so that the debugging information is timely obtained from the firmware by the kernel layer, the frame loss condition can be reduced, and the transmission delay is reduced; the application layer synchronously acquires the debugging information of the kernel layer, so that frame loss is avoided, and transmission delay is further reduced. After the application layer acquires the debugging information, the configuration parameters are issued to the firmware through the kernel layer, so that the debugging information in the firmware is adjusted, the debugging process is timely and efficient, and the use experience of a user is improved.
In the conventional implementation manner, when the application layer receives the debugging information of the firmware through the kernel layer, a round robin mode may be adopted, and each frame of data of the firmware cannot be completely obtained in real time, so that the real-time debugging function of the application layer on the firmware is not supported. But the implementation mode of the application can solve the problems, achieves timely and efficient data transmission, and supports the application layer to debug the firmware in real time.
Implementation details of the firmware debugging method of the present embodiment are specifically described below, and the following is merely provided for convenience of understanding, and is not necessary to implement the present embodiment.
In step 101, the firmware sends a first message to the kernel layer for triggering the kernel layer to obtain debug information in the firmware, where the first message has the highest priority, and the firmware is located in the terminal. Specifically, the kernel layer may include a driver, where after the driver receives the first message with the highest priority, the driver obtains debug information from the firmware in time, so as to reduce transmission delay and avoid frame dropping.
In one example, the first message is, for example, an interrupt request. I.e. the kernel layer immediately acquires debugging information from the firmware after receiving an interrupt request sent by the firmware.
In one example, the firmware may be self-inductance capacitance firmware, such as a touch chip.
The debugging information can directly influence the touch effect of the firmware.
In one example, the firmware sends a first message to the kernel layer, for example: the firmware sends a first message to the kernel layer according to a preset time period, namely the kernel layer can periodically acquire the debugging information of the firmware, and data receiving and forwarding resources are reasonably distributed. For example, the time period is set to be 10ms, so that the kernel layer can timely and quickly acquire the debugging information of the firmware, and the time delay in data transmission is reduced.
In one example, the kernel layer obtains debug information in firmware, such as: the method comprises the steps that a kernel layer obtains debugging information in firmware to a first storage space of the kernel layer; the kernel layer also has a second storage space for storing debug information in the copied first storage space, and the provisioning layer obtains the debug information. The first storage space is used for the kernel layer to store the debugging information acquired from the firmware, and the second storage space is used for copying the debugging information in the first storage space, interfacing with the application layer and acquiring the debugging information by the application layer. The first storage space and the second storage space can be called ping-pong storage, and the first storage space and the second storage space are not affected when the kernel layer inputs writing (obtains debugging information from firmware) and outputs reading (is in butt joint with the application layer and is obtained by the application layer), and the reading operation and the writing operation of the storage space can be parallel for the kernel layer, so that the processing time of the kernel layer for the debugging information is reduced. The application layer comprises APK (Android application package ).
In some embodiments, the application layer issues an instruction of data grabbing (obtaining debug information from firmware) first, and the kernel layer receives the instruction and transmits the instruction to the firmware, so that processes of feeding back the debug information step by step from the firmware in this step are started. In addition, the firmware can be provided with a fixed time period or a fixed period for feeding back debugging information for detection or debugging of an application layer.
In one example, when an application layer is required to issue a command for data capture, for example, an APK in the application layer provides a selection interface for data capture, debug information that the APK can capture includes three FW (firmware) data, namely Rawdata (raw data), diff (signal variation), prox (proximity sensing), on the data capture interface of the APK, three buttons are corresponding to the three FW data, and the Diff data is captured by default, and the Diff button is displayed in red to indicate that the Diff data is captured when being selected, so that the user command can be received for parameter selection. For example, a button selected by a user according to an actual demand instruction is received, if the user instructs to click the corresponding button, the corresponding selected button is displayed in red, if the corresponding button is not selected, the corresponding button is displayed in black, two buttons of Start and Stop are further arranged on the data capture interface, if the user instructs to select the Start button, the button is displayed in red, the data capture function is started, and if the user instructs to select the Stop button, the button is displayed in red, and the data capture function is ended.
In one example, assuming that the command to capture Diff data of FW is selected now, after the Start button is enabled by the user command is acquired, the APK of the application layer issues a command to enter the FW into the kernel layer to capture Diff data, and then the command is issued to FW through the driver, the FW starts the capture Diff data mode after receiving the capture command, and drives to capture debug information once every ten milliseconds with an interrupt request, and drives to read data including the debug information in FW through an I2C (Inter-Integrated Circuit) bus interface after receiving the interrupt request. If FW is in the point reporting mode, switching to the data grabbing mode after receiving the interrupt request.
In step 102, after obtaining the debug information, the kernel layer instructs the application layer to obtain the debug information synchronously from the kernel layer. That is, the kernel layer is used for the application layer to acquire the debugging information of the firmware, so after the debugging information of the firmware is acquired, the application layer is instructed to synchronously acquire the debugging information. Compared with a round robin mechanism, the method and the device can further reduce data transmission delay and quicken transmission efficiency, enable an application layer to debug configuration parameters in firmware in real time, and improve user experience.
In one example, after obtaining the debug information, the kernel layer instructs the application layer to obtain the debug information synchronously from the kernel layer, and further includes: detecting that the first storage space is saturated in storage, and copying debugging information in the first storage space to the second storage space; and the first storage space is emptied and used for acquiring the rest debugging information in the firmware. Under the condition that a first storage space and a second storage space exist in the kernel layer, the first storage space is used for being in butt joint with firmware to acquire debugging information in the firmware, after the first storage space is in storage saturation, existing data are copied to the second storage space, the second storage space is used for an application layer to synchronously acquire the debugging information, that is, the kernel layer acquires the debugging information from the firmware and acquires the debugging information from the application layer, the two steps are executed by two storage devices, and therefore the processes of reading and writing for the storage space are prevented from interfering with each other. And the first storage space is saturated as a copying condition, so that the process of data transmission is not interrupted suddenly, the transmission integrity of debugging information is ensured, and the error probability in the data transmission process is reduced.
In one example, instructing the application layer to synchronously obtain debug information from the kernel layer includes: the kernel layer changes the identification, instruct the application layer to obtain the debug information synchronously from kernel layer; after the kernel layer changes the identification, the method further comprises: and if the debugging information in the second storage space is acquired by the application layer, restoring the identification. That is, the kernel layer instructs the application layer to obtain the debug information through the change identifier, for example, the application layer immediately requests the debug information from the kernel layer after detecting the change of the kernel layer identifier; and after the debugging information in the second storage space is transmitted to the application layer, the kernel layer restores the identification, namely, the application layer is instructed to stop acquiring the debugging information from the kernel layer. In some implementations, the identifier may be a synchronization identifier, when the second storage space copies the debug information in the first storage space, the synchronization identifier is set, and when the debug information in the second storage space is acquired by the application layer, the synchronization identifier is released, the "release" action is an operation opposite to the "set-up" action, the execution result of the "set-up" action is that the synchronization identifier exists, and the execution result of the "release" action is that the synchronization identifier does not exist. The method has the advantages that the steps are simple when the kernel layer indicates the application layer to acquire the debugging information, and redundant data transmission processes between the application layer and the kernel layer are avoided, so that the processes of later maintenance and detection are reduced.
In one example, two 1024 byte ping-pong caches are opened in the kernel layer driver, a first storage space and a second storage space are provided, the first storage space is used for storing data acquired from firmware, the second storage space is used for acquiring the data of the firmware through the kernel layer (for example, driver), when the first storage space is full of space for receiving debugging information of the firmware, the data such as the debugging information is copied to the second storage space, a synchronous mark is placed in parallel, the first storage space is emptied and then the debugging information acquired from the firmware is stored, the APK firstly judges whether the driving synchronous mark is placed or not when the APK acquires the debugging information through the driver each time, if the synchronous mark is placed, the APK acquires the debugging information, and the kernel layer releases the synchronous mark after the APK acquires the debugging information. In some actual execution processes, the APK can obtain the debugging information of the firmware in the above manner so as to hardly lose frames, so that various problems encountered in the debugging process can be analyzed by taking complete debugging information as a basis for a user, and the encountered problems can be rapidly positioned and solved.
In step 103 to step 104, the application layer sends configuration parameters to the kernel layer, the configuration parameters are used for modifying debugging information in the firmware; the firmware acquires configuration parameters from the kernel layer, and modifies the debugging information according to the configuration parameters. That is, after the application layer receives the real-time debugging information of the firmware, the real-time debugging information is modified by issuing configuration parameters through the kernel layer, so that the effect of modifying the real-time debugging information in the firmware can be achieved.
In one example, the firmware obtains configuration parameters from the kernel layer, and after the configuration parameters are modified, the firmware further includes: sending a first message to a kernel layer; the first message is used for triggering the kernel layer to acquire modified debugging information from the firmware; after the kernel layer acquires the modified debugging information, the kernel layer instructs the application layer to synchronously acquire the modified debugging information from the kernel layer; the application layer detects whether the modified debugging information accords with a preset threshold value, and if so, the application layer finishes the debugging. Namely, after acquiring real-time debugging information and carrying out one-time debugging, acquiring the debugged debugging information, judging whether the debugged debugging information accords with a preset threshold value, if so, proving that the first debugging is successful, and thoroughly ending the debugging flow; if not, the first debugging is proved to fail, and the application layer immediately issues configuration parameters again according to the current modified debugging information until the modified configuration parameters accord with a preset threshold value.
It can be appreciated that a threshold range of target debug information for firmware can be set in APK of the application layer, according to which the application layer debugs the firmware; the application layer can also receive the user instruction to send configuration parameters after obtaining the debugging information of the kernel layer, namely, a plurality of modes exist, so that the user can conveniently select according to actual requirements.
In one example, the APK debugs the firmware in real time, receives a user command to enable a read button APK on an APK parameter interface, reads and displays all parameters for debugging the firmware effect in the current firmware, and modifies debug information corresponding to the parameters in real time to achieve the purpose of real-time debugging FW.
In this embodiment, after receiving the first message indication with the highest priority, the kernel layer obtains the debug information from the firmware, and the application layer obtains the debug information from the kernel layer in a synchronous manner. The first message has the highest priority, so that the debugging information is timely obtained from the firmware by the kernel layer, the frame loss condition can be reduced, and the transmission delay is reduced; the application layer synchronously acquires the debugging information of the kernel layer, so that frame loss is avoided, and transmission delay is further reduced. After the application layer acquires the debugging information, the configuration parameters are issued to the firmware through the kernel layer, so that the debugging information in the firmware is adjusted, the debugging process is timely and efficient, and the use experience of a user is improved.
In this embodiment, the APK issues the command to the driver and forwards the command to the firmware through the driver, the debug information of the firmware is obtained through the driver and then transferred to the APK, the debug information of the firmware is obtained through the driver by the driver, the APK obtains the debug information through the driver and is realized through the synchronization mechanism, and it is ensured that no frame loss occurs when the APK obtains the debug information of the firmware, thereby supporting the function of APK debugging the firmware in real time.
The above steps of the methods are divided, for clarity of description, and may be combined into one step or split into multiple steps when implemented, so long as they include the same logic relationship, and they are all within the protection scope of this patent; it is within the scope of this patent to add insignificant modifications to the algorithm or flow or introduce insignificant designs, but not to alter the core design of its algorithm and flow.
One embodiment of the present application relates to a firmware debugging device, as shown in fig. 2, comprising:
an obtaining module 201, configured to send, to a kernel layer, a first message for triggering the kernel layer to obtain debug information in the firmware, where the first message has a highest priority, and the firmware is located in the terminal;
the synchronization module 202 is configured to instruct, after the kernel layer acquires the debug information, an application layer to acquire the debug information from the kernel layer synchronously;
a sending module 203, configured to send, by the application layer, configuration parameters to the kernel layer, where the configuration parameters are used to modify debug information in the firmware;
and a modifying module 204, configured to obtain the configuration parameters from the kernel layer by using the firmware, and modify the debug information according to the configuration parameters.
For the acquisition module 201, in one example, the firmware sends a first message to the kernel layer, including: and the firmware sends a first message to the kernel layer according to a preset time period.
In one example, the first message is an interrupt request.
For the synchronization module 202, in one example, the kernel layer obtains debug information in the firmware, including, the kernel layer obtaining debug information in the firmware to a first storage space of the kernel layer; the kernel layer is further provided with a second storage space, and the second storage space is used for storing copied debugging information in the first storage space and is used for the application layer to acquire the debugging information.
In one example, after the kernel layer acquires the debug information, before instructing an application layer to synchronously acquire the debug information from the kernel layer, the method further includes: detecting that the first storage space is saturated in storage, and copying debugging information in the first storage space to the second storage space; and emptying the first storage space to obtain the rest debugging information in the firmware.
In one example, the instructing the application layer to synchronously obtain the debug information from the kernel layer includes: the kernel layer change identifier indicates an application layer to synchronously acquire the debugging information from the kernel layer; after the kernel layer changes the identifier, the method further comprises: and if the debugging information in the second storage space is acquired by the application layer, restoring the identification.
After modifying module 204, a feedback adjustment module (not shown) is further included for sending the first message to the kernel layer; the first message is used for triggering the kernel layer to acquire the modified debugging information from the firmware; after the kernel layer acquires the modified debugging information, the kernel layer instructs an application layer to synchronously acquire the modified debugging information from the kernel layer; the application layer detects whether the modified debugging information accords with a preset threshold value, and if so, the application layer finishes the debugging.
In this embodiment, after receiving the first message indication with the highest priority, the kernel layer obtains the debug information from the firmware, and the application layer obtains the debug information from the kernel layer in a synchronous manner. The first message has the highest priority, so that the debugging information is timely obtained from the firmware by the kernel layer, the frame loss condition can be reduced, and the transmission delay is reduced; the application layer synchronously acquires the debugging information of the kernel layer, so that frame loss is avoided, and transmission delay is further reduced. After the application layer acquires the debugging information, the configuration parameters are issued to the firmware through the kernel layer, so that the debugging information of the firmware is adjusted, the touch effect controlled by the debugging information is improved, the debugging process is timely and efficient, and the use experience of a user is improved.
It is to be noted that this embodiment is a system example corresponding to the above embodiment, and can be implemented in cooperation with the above embodiment. The related technical details mentioned in the above embodiments are still valid in this embodiment, and in order to reduce repetition, they are not repeated here. Accordingly, the related technical details mentioned in the present embodiment can also be applied to the above-described embodiments.
It should be noted that each module in this embodiment is a logic module, and in practical application, one logic unit may be one physical unit, or may be a part of one physical unit, or may be implemented by a combination of multiple physical units. In addition, in order to highlight the innovative part of the present application, units that are not so close to solving the technical problem presented by the present application are not introduced in the present embodiment, but this does not indicate that other units are not present in the present embodiment.
One embodiment of the application relates to a terminal, as shown in fig. 3, comprising at least one processor 301; the method comprises the steps of,
a memory 302 communicatively coupled to the at least one processor 301; wherein,,
the memory 302 stores instructions executable by the at least one processor 301, the instructions being executable by the at least one processor 301 to enable the at least one processor 301 to perform the method of debugging firmware described above.
Where the memory and the processor are connected by a bus, the bus may comprise any number of interconnected buses and bridges, the buses connecting the various circuits of the one or more processors and the memory together. The bus may also connect various other circuits such as peripherals, voltage regulators, and power management circuits, which are well known in the art, and therefore, will not be described any further herein. The bus interface provides an interface between the bus and the transceiver. The transceiver may be one element or may be a plurality of elements, such as a plurality of receivers and transmitters, providing a means for communicating with various other apparatus over a transmission medium. The data processed by the processor is transmitted over the wireless medium via the antenna, which further receives the data and transmits the data to the processor.
The processor is responsible for managing the bus and general processing and may also provide various functions including timing, peripheral interfaces, voltage regulation, power management, and other control functions. And memory may be used to store data used by the processor in performing operations.
One embodiment of the present application relates to a computer-readable storage medium storing a computer program. The computer program implements the above-described method embodiments when executed by a processor.
That is, it will be understood by those skilled in the art that all or part of the steps in implementing the methods of the embodiments described above may be implemented by a program stored in a storage medium, where the program includes several instructions for causing a device (which may be a single-chip microcomputer, a chip or the like) or a processor (processor) to perform all or part of the steps in the methods of the embodiments of the application. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a Read-Only Memory (ROM), a random access Memory (RAM, random Access Memory), a magnetic disk, or an optical disk, or other various media capable of storing program codes.
It will be understood by those of ordinary skill in the art that the foregoing embodiments are specific examples of carrying out the application and that various changes in form and details may be made therein without departing from the spirit and scope of the application.

Claims (8)

1. The method for debugging the firmware is characterized by being applied to a terminal and comprising the following steps of:
the firmware sends a first message for triggering the kernel layer to acquire debugging information in the firmware to the kernel layer, wherein the first message has the highest priority, and the firmware is positioned in the terminal;
the kernel layer instructs an application layer to synchronously acquire the debugging information from the kernel layer after acquiring the debugging information;
the application layer sends configuration parameters to the kernel layer, wherein the configuration parameters are used for modifying debugging information in the firmware;
the firmware acquires the configuration parameters from the kernel layer, and modifies the debugging information according to the configuration parameters;
the kernel layer acquires debugging information in the firmware, wherein the kernel layer acquires the debugging information in the firmware to a first storage space of the kernel layer; the kernel layer is also provided with a second storage space, and the second storage space is used for storing the copied debugging information in the first storage space and is used for the application layer to acquire the debugging information;
the indicating the application layer to synchronously acquire the debug information from the kernel layer includes: the kernel layer change identifier indicates an application layer to synchronously acquire the debugging information from the kernel layer;
after the kernel layer changes the identifier, the method further comprises: and if the debugging information in the second storage space is acquired by the application layer, restoring the identification.
2. The method for debugging firmware according to claim 1, wherein the firmware obtains the configuration parameters from the kernel layer, and after modifying the debugging information according to the configuration parameters, further comprises:
sending the first message to the kernel layer; the first message is used for triggering the kernel layer to acquire modified debugging information from the firmware;
after the kernel layer acquires the modified debugging information, the kernel layer instructs an application layer to synchronously acquire the modified debugging information from the kernel layer;
the application layer detects whether the modified debugging information accords with a preset threshold value, and if so, the application layer finishes the debugging.
3. The method for debugging firmware according to claim 1, wherein after the kernel layer acquires the debugging information, the method further comprises, before instructing an application layer to synchronously acquire the debugging information from the kernel layer:
detecting that the first storage space is saturated in storage, and copying debugging information in the first storage space to the second storage space;
and emptying the first storage space to obtain the rest debugging information in the firmware.
4. The method for debugging firmware of claim 1, wherein the firmware sends the first message to the kernel layer, comprising:
and the firmware sends a first message to the kernel layer according to a preset time period.
5. A method for debugging firmware as defined in any one of claims 1 to 4,
the first message is an interrupt request.
6. A firmware debugging device, comprising:
the system comprises an acquisition module, a processing module and a processing module, wherein the acquisition module is used for transmitting a first message for triggering the kernel layer to acquire debugging information in the firmware to the kernel layer, the first message has the highest priority, and the firmware is positioned in a terminal;
the synchronous module is used for indicating an application layer to synchronously acquire the debugging information from the kernel layer after the kernel layer acquires the debugging information;
the sending module is used for sending configuration parameters to the kernel layer by the application layer, wherein the configuration parameters are used for modifying debugging information in the firmware;
the modification module is used for acquiring the configuration parameters from the kernel layer by the firmware and modifying the debugging information according to the configuration parameters;
the obtaining module is further configured to obtain debug information in the firmware to a first storage space of the kernel layer; the kernel layer is also provided with a second storage space, and the second storage space is used for storing the copied debugging information in the first storage space and is used for the application layer to acquire the debugging information;
the synchronization module is also used for the kernel layer change identification to instruct an application layer to synchronously acquire the debugging information from the kernel layer; and restoring the identification under the condition that the debugging information in the second storage space is acquired by the application layer.
7. A terminal, comprising:
at least one processor; the method comprises the steps of,
a memory communicatively coupled to the at least one processor; wherein,,
the memory stores instructions executable by the at least one processor to enable the at least one processor to perform the method of debugging firmware as claimed in any one of claims 1 to 5.
8. A computer readable and writable storage medium storing a computer program, characterized in that the computer program, when executed by a processor, implements the method for debugging firmware according to any one of claims 1 to 5.
CN202111155816.8A 2021-09-30 2021-09-30 Firmware debugging method, device, terminal and storage medium Active CN114035855B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111155816.8A CN114035855B (en) 2021-09-30 2021-09-30 Firmware debugging method, device, terminal and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111155816.8A CN114035855B (en) 2021-09-30 2021-09-30 Firmware debugging method, device, terminal and storage medium

Publications (2)

Publication Number Publication Date
CN114035855A CN114035855A (en) 2022-02-11
CN114035855B true CN114035855B (en) 2023-10-27

Family

ID=80134541

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111155816.8A Active CN114035855B (en) 2021-09-30 2021-09-30 Firmware debugging method, device, terminal and storage medium

Country Status (1)

Country Link
CN (1) CN114035855B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117597668A (en) * 2022-06-16 2024-02-23 北京小米移动软件有限公司 Firmware debugging method and device
CN116847019B (en) * 2023-07-12 2024-06-25 荣耀终端有限公司 Communication abnormality processing method, electronic device, and computer-readable storage medium

Citations (14)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1779652A (en) * 2004-11-24 2006-05-31 中兴通讯股份有限公司 Method and apparatus for debugging internal core state programm of operation system
CN102279789A (en) * 2010-06-13 2011-12-14 三星电子(中国)研发中心 Debugging system and debugging method for embedded system of production phase
CN102346708A (en) * 2010-08-03 2012-02-08 中兴通讯股份有限公司 Debugger and debugging method thereof
CN105183641A (en) * 2015-08-13 2015-12-23 浪潮(北京)电子信息产业有限公司 Data consistency check method and system for kernel module
CN105224454A (en) * 2015-09-25 2016-01-06 华为技术有限公司 A kind of adjustment method, polycaryon processor and commissioning device
CN106569942A (en) * 2015-10-08 2017-04-19 阿里巴巴集团控股有限公司 Test method and apparatus
CN108519947A (en) * 2018-04-02 2018-09-11 郑州云海信息技术有限公司 The method and tool of read-write register under a kind of Linux
CN110389275A (en) * 2019-07-19 2019-10-29 淮阴工学院 Smart grid link ground fault wave recording device and method
CN110764962A (en) * 2018-07-26 2020-02-07 武汉海康存储技术有限公司 Log processing method and device
CN110781080A (en) * 2019-10-11 2020-02-11 北京小米移动软件有限公司 Program debugging method and device and storage medium
WO2020145973A1 (en) * 2019-01-10 2020-07-16 Hewlett-Packard Development Company, L.P. Event logs with firmware debug information
CN112231198A (en) * 2019-07-15 2021-01-15 腾讯科技(深圳)有限公司 Malicious process debugging method and device, electronic equipment and medium
CN112230844A (en) * 2019-07-15 2021-01-15 美光科技公司 Media management recorder for memory subsystem
CN112541166A (en) * 2019-09-20 2021-03-23 杭州中天微系统有限公司 Method, system and computer readable storage medium

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20050183066A1 (en) * 2004-02-17 2005-08-18 Jabori Monji G. Correlating debugger

Patent Citations (14)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1779652A (en) * 2004-11-24 2006-05-31 中兴通讯股份有限公司 Method and apparatus for debugging internal core state programm of operation system
CN102279789A (en) * 2010-06-13 2011-12-14 三星电子(中国)研发中心 Debugging system and debugging method for embedded system of production phase
CN102346708A (en) * 2010-08-03 2012-02-08 中兴通讯股份有限公司 Debugger and debugging method thereof
CN105183641A (en) * 2015-08-13 2015-12-23 浪潮(北京)电子信息产业有限公司 Data consistency check method and system for kernel module
CN105224454A (en) * 2015-09-25 2016-01-06 华为技术有限公司 A kind of adjustment method, polycaryon processor and commissioning device
CN106569942A (en) * 2015-10-08 2017-04-19 阿里巴巴集团控股有限公司 Test method and apparatus
CN108519947A (en) * 2018-04-02 2018-09-11 郑州云海信息技术有限公司 The method and tool of read-write register under a kind of Linux
CN110764962A (en) * 2018-07-26 2020-02-07 武汉海康存储技术有限公司 Log processing method and device
WO2020145973A1 (en) * 2019-01-10 2020-07-16 Hewlett-Packard Development Company, L.P. Event logs with firmware debug information
CN112231198A (en) * 2019-07-15 2021-01-15 腾讯科技(深圳)有限公司 Malicious process debugging method and device, electronic equipment and medium
CN112230844A (en) * 2019-07-15 2021-01-15 美光科技公司 Media management recorder for memory subsystem
CN110389275A (en) * 2019-07-19 2019-10-29 淮阴工学院 Smart grid link ground fault wave recording device and method
CN112541166A (en) * 2019-09-20 2021-03-23 杭州中天微系统有限公司 Method, system and computer readable storage medium
CN110781080A (en) * 2019-10-11 2020-02-11 北京小米移动软件有限公司 Program debugging method and device and storage medium

Also Published As

Publication number Publication date
CN114035855A (en) 2022-02-11

Similar Documents

Publication Publication Date Title
CN114035855B (en) Firmware debugging method, device, terminal and storage medium
US8874959B2 (en) Information processing apparatus, image forming apparatus, and information processing program
CN100365994C (en) Method and system for regulating ethernet
US9036055B2 (en) Data processing apparatus and method of controlling same
WO1985003151A1 (en) Method of and apparatus for diagnosing channel control unit
CN112559267B (en) Inter-integrated circuit bus I2C slave and I2C controller test method
US20080222335A1 (en) Mode setting method and system including pci bus in hot plug of pci device
US11431782B2 (en) Method, apparatus, and device for transmitting file based on BMC, and medium
US11314670B2 (en) Method, apparatus, and device for transmitting file based on BMC, and medium
CN114761935A (en) Controller
WO2024082563A1 (en) Radio frequency front-end control method, apparatus, device, and computer readable storage medium
CN114003420B (en) CPLD diagnosis method, system, equipment and computer storage medium
CN116204336B (en) User state core state synchronization method and system based on registry callback mechanism
JPH0588933A (en) Parallel processing system with debugging function
JP2006504205A (en) Temporal correlation of messages transmitted by microprocessor monitor circuits.
CN116094956A (en) Intelligent network card testing method and device and computer equipment
CN114153708A (en) Method for recording BMC reset, CPLD and server
CN118394702A (en) Industrial acquisition card triggering method, system, acquisition card, upper computer and medium
CN118413856A (en) Communication processing method, device, module and system based on multi-module system
JP2024074460A (en) Semiconductor chip, debug system, and synchronization method
JP2833782B2 (en) Communication control device
JPH1023048A (en) Communication control method
CN118343149A (en) Domain controller, vehicle control method and vehicle
CN115442560A (en) Method, client, server, device and medium for acquiring multi-path data streams
JPH04229352A (en) Channel device

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