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
Patent Information
- Authority / Receiving Office
- CN · China
- Current Assignee / Owner
- Publication Date
- 2016-08-31
Smart Images
Figure 1 Figure 2 Figure 3
Abstract
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...