Monitoring method for embedded program execution order

A program execution and embedded technology, which is applied in the monitoring field of embedded program execution sequence, can solve problems such as multiple faults, inability to monitor command statements, residues, etc., and achieve the effect of improving coverage

CN105912447AActive Publication Date: 2016-08-31NANJING SCIYON AUTOMATION GRP
3 Cites 8 Cited by

Patent Information

Authority / Receiving Office
CN · China
Current Assignee / Owner
Publication Date
2016-08-31

Smart Images

  • Figure 1
    Figure 1
  • Figure 2
    Figure 2
  • Figure 3
    Figure 3
Patent Text Reader

Abstract

The invention discloses a monitoring method for an embedded program execution order. The monitoring method comprises the steps of setting a local order mark corresponding to a function of each level for an embedded program; regularly changing the value of the corresponding local order mark after the execution of each program statement of the function of each level is finished; and after the execution of the function of each level is finished, judging whether an exception that the statement is not executed exists or not according to the value of the corresponding local order mark. With the adoption of the monitoring method, the coverage degree of program monitoring can be effectively increased; and the method can be used for monitoring the program execution order of any calling depth.
Need to check novelty before this filing date? Find Prior Art

Description

technical field

[0001] The invention belongs to the technical field of program execution monitoring in embedded software, and in particular relates to a method for monitoring the execution sequence of embedded programs. Background technique

[0002] In embedded products, a program often has to run continuously for a long time. Once an error occurs, it will continue to accumulate until the next time the system is restarted. . Therefore, it is very important to monitor the program execution, find errors in time, and take effective solutions to protect the product itself, prolong its service life, and provide convenience for users.

[0003] There are many monitoring methods for program execution, some implement monitoring through hardware watchdog, some add some flag bit judgments in key positions of software code to detect the execution degree of the program, and some are to divide the code into blocks, only for the module The execution of codes is sequentially monitored. T...

Examples

Embodiment Construction

[0028] The present invention will be described in detail below in conjunction with the accompanying drawings.

[0029] Such as figure 1 As shown, the specific steps of the monitoring method of the embedded program execution order of the present invention are:

[0030] The judgment of the global sequence flag is performed at the entry of the function. If it is wrong (not the default value), exception handling will be performed. After passing it correctly, it will be judged whether this function is returned by the next-level function. If not, a new local sequence flag will be defined ( As the first definition, the corresponding function of this level is the top level function), and the initial value is assigned to the new local order mark, and then enters the next step, if it is returned by the next level function, directly enters the next step;

[0031] Next, execute the function at this level; if there is a nested call sub-level function in the function at this level, enter t...