Mutual updating method between boot program and main program
Receive update signals through the communication interface of the product, and the processor judges and executes mutual updates between the boot program and the main program, solving the problem of cumbersome update of the boot program in the prior art, and realizing function upgrades and program corrections without changing the hardware.
Patent Information
- Application Number
- CN202311282168.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-10-07
- Publication Date
- 2025-04-08
AI Technical Summary
In the prior art, the startup program usually does not change after completion of design. Updating the startup program requires removing the product shell and connecting the recorder. The process is cumbersome and inconvenient for function upgrades or corrections to program problems without changing the hardware.
The update signal is received through the existing communication interface of the product. The processor determines whether to update the startup program, the main program or both, and performs updates of the corresponding program based on the update signal to realize the mutual update between the startup program and the main program.
Without the need to use a burner, the boot program and the main program are updated, which simplifies the update process and improves the convenience of function upgrades and corrects program problems.
Smart Images

Figure CN119781787A_ABST
Abstract
Description
Technical Field
[0001] The invention relates to a program updating method, in particular to a mutual updating method of a startup program and a main program. Background Art
[0002] Many electronic products update their programs (firmware) through the existing external communication interface of the product without changing the hardware, in order to achieve the purpose of functional upgrade or correction of program problems. To achieve this goal, the product program needs to have two independently operable programs, the boot program and the main program. The boot program is responsible for receiving instructions and program codes through the existing external communication interface of the product to update the main program. The main program is responsible for completing the functions of the electronic product. Usually, the boot program is the first code executed by the embedded system after power-on. It determines whether to stay in the boot program and wait for instructions to update the main program, or jump to the address where the main program is located to start running. The boot program designed by the industry is usually designed to be unchanged once it is completed. In case it is necessary to update it, it is usually necessary to remove the product casing and connect the burner to achieve the purpose of updating the boot program. Summary of the invention
[0003] In view of the deficiencies in the prior art, the present invention provides a method for mutual updating of a boot program and a main program, comprising the following steps: receiving an update signal output by an external device from an external communication interface through a communication interface; a processor determining, based on the update signal, whether to update a boot program, a main program, or both; if not, continuing the original process and waiting to receive the next update signal from the external device through the communication interface; if so, executing the next step; and the processor executing either the boot program or the main program based on the update signal to update the other of the boot program and the main program.
[0004] As described above, the present invention provides a method for mutually updating a boot program and a main program. In the method for mutually updating a boot program and a main program of the present invention, an update instruction is received through an existing communication interface, and the boot program and the main program are mutually updated, or either of the boot program and the main program is updated according to the received update instruction without using a burner.
[0005] To further understand the features and technical contents of the present invention, please refer to the following detailed description and drawings of the present invention. However, the drawings provided are only for reference and description and are not intended to limit the present invention. BRIEF DESCRIPTION OF THE DRAWINGS
[0006] Figure 1 The present invention is a flowchart of the steps of updating the main program first and then updating the boot program included in the mutual updating method of the boot program and the main program according to the embodiment of the present invention.
[0007] Figure 2 The present invention is a flowchart of a method for mutually updating a boot program and a main program, including the steps of first updating the boot program and then updating the main program.
[0008] Figure 3 The flowchart is a step of updating only the main program included in the mutual updating method of the boot program and the main program according to an embodiment of the present invention.
[0009] Figure 4 The present invention is a flowchart of a method for mutually updating a boot program and a main program, including steps of updating only the boot program.
[0010] Figure 5 The block diagram of the boot program and the main program update system according to an embodiment of the present invention. DETAILED DESCRIPTION
[0011] The following is an explanation of the embodiments of the present invention through specific embodiments. Those skilled in the art can understand the advantages and effects of the present invention from the contents disclosed in this specification. The present invention can be implemented or applied through other different specific embodiments, and the details in this specification can also be modified and changed in various ways based on different viewpoints and applications without departing from the concept of the present invention. In addition, the drawings of the present invention are only simple schematic illustrations and are not depicted according to actual dimensions. It is stated in advance. The following embodiments will further explain the relevant technical contents of the present invention in detail, but the disclosed contents are not intended to limit the scope of protection of the present invention. In addition, the term "or" used herein may include any one or more combinations of the associated listed items depending on the actual situation.
[0012] See also Figures 1 to 5 ,in Figures 1 to 4 is a flowchart of the steps of the method for mutual updating of the boot program and the main program according to an embodiment of the present invention, Figure 5 The block diagram of the boot program and the main program update system according to an embodiment of the present invention.
[0013] The mutual updating method between the boot program and the main program of the present invention can be as follows: Figure 5 The boot program and main program mutual updating system 100 (including a processor 10 and a communication interface 20 connected to the processor 10) is executed.
[0014] The processor 10 receives an update signal output by an external device 92 from an external communication interface 91 through a communication interface 20, and determines whether to update the boot program, the main program, or both based on the received update signal, executes either the boot program or the main program, or updates the other of the boot program and the main program.
[0015] In detail, the mutual updating method of the boot program and the main program of the present invention may include the following steps: Figure 1 Steps S101 to S109 shown in FIG. Figure 2 S201 to S207 shown in FIG. Figure 3 S301 to S305 shown and / or Figure 4 S401 to S403 shown are described in detail as follows.
[0016] See also Figure 1 and Figure 5 ,in Figure 1 The present invention is a flowchart of a method for mutually updating a boot program and a main program, including the steps of first updating the main program and then updating the boot program.
[0017] If you want to update the main program first and then update the boot program, you can execute the following Figure 1 Steps S101 to S109 are shown.
[0018] First, the processor 10 jumps from the address where the main program is running to the address where the boot program is stored (in the example of FIG. 1 ) according to a main program update instruction output by the external device 92 received from the external communication interface 91 through the communication interface 20. Figure 1 Step S101 shown).
[0019] Next, the processor 10 executes the boot procedure according to a main program update instruction received from the external device 92, and uses a main program update data output by the external device 92 received from the external communication interface 91 through the communication interface 20 to update the main program (in the case of Figure 1 Step S103 shown).
[0020] Next, jump from the address where the boot program is running to the address where the main program is stored (in the example Figure 1 Step S105 shown).
[0021] Next, the main program is executed, and the processor 10 can update the boot program according to a boot program update instruction output by the external device 92 received from the external communication interface 91 through the communication interface 20, using a boot program update data output by the external device 92 received from the external communication interface 91 through the communication interface 20 to update the boot program (in the case of Figure 1 Step S107 shown).
[0022] Finally, the processor 10 executes the updated main program and the boot program (in the case of Figure 1 Step S109 shown).
[0023] See also Figure 2 and Figure 5 ,in Figure 2The present invention is a flowchart of a method for mutually updating a boot program and a main program, including the steps of first updating the boot program and then updating the main program.
[0024] If you want to update the boot mode first and then the main program, you can execute the following Figure 2 Steps S201 to S207 are shown.
[0025] The processor 10 executes the main program according to a boot program update instruction output by the external device 92 received from the external communication interface 91 through the communication interface 20, and uses a boot program update data output by the external device 92 received from the external communication interface 91 through the communication interface 20 to update the boot program (in the case of Figure 2 Step S201 shown).
[0026] Next, the processor 10 jumps back from the address stored in the main program to the address stored in the boot program (in the case of Figure 2 Step S203 shown).
[0027] Next, the booting procedure is executed to update the main program (in the case of Figure 2 Step S205 shown).
[0028] Then, the processor 10 executes the updated main program and the boot program (in the case of Figure 2 Step S207 shown).
[0029] See also Figure 3 and Figure 5 ,in Figure 3 The flowchart is a step of updating only the main program included in the mutual updating method of the boot program and the main program according to an embodiment of the present invention.
[0030] If you only want to update the main program, you can execute Figure 3 S301 to S305 shown.
[0031] The processor 10 jumps from the address where the main program is running to the address where the boot program is stored (in the example of FIG. 1 ) according to a main program update instruction output by the external device 92 received from the external communication interface 91 through the communication interface 20. Figure 3 Step S301 shown).
[0032] Next, the processor 10 executes the boot procedure according to the main program update instruction, and uses a main program update data output by the external device 92 received from the external communication interface 91 through the communication interface 20 to update the main program (in the case of Figure 3Step S303 shown).
[0033] Then, the processor 10 executes the updated main program (in the Figure 3 Step S305 shown).
[0034] See also Figure 4 and Figure 5 ,in Figure 4 The present invention is a flowchart of a method for mutually updating a boot program and a main program, including steps of updating only the boot program.
[0035] If you only want to update the boot program, you can execute the following Figure 4 S401 to S403 shown.
[0036] The processor 10 executes the main program, and updates the boot program (in the case of a boot program update command output by the external device 92 received from the external communication interface 91 through the communication interface 20) using a boot program update data output by the external device 92 received from the external communication interface 91 through the communication interface 20. Figure 4 Step S401 shown).
[0037] Next, the processor 10 executes the updated boot program (in the case of Figure 4 Step S403 shown).
[0038] In summary, the present invention provides a method for mutually updating a boot program and a main program. In the method for mutually updating a boot program and a main program of the present invention, an update instruction is received through an existing communication interface, and the boot program and the main program are mutually updated, or either of the boot program and the main program is updated according to the received update instruction without using a burner.
[0039] The contents disclosed above are only preferred feasible embodiments of the present invention, and are not intended to limit the claims of the present invention. Therefore, all equivalent technical changes made using the contents of the present invention description and drawings are included in the claims of the present invention.
Claims
1. A method for mutual updating of a boot program and a main program, characterized in that: The method for mutual updating of the boot program and the main program comprises the following steps: Receiving an update signal outputted by an external device from an external communication interface through the communication interface; The processor determines whether to update a boot program, a main program, or both according to the update signal. If not, the processor continues the original process and waits for receiving the next update signal from the external device through the communication interface. If yes, the processor executes the next step. as well as The processor executes any one of the booting program and the main program according to the update signal to update the other one of the booting program and the main program.
2. The method for updating the boot program and the main program mutually according to claim 1, characterized in that: The method for mutual updating of the boot program and the main program further comprises the following steps: The processor jumps from the address where the main program is executed to the address where the boot program is stored according to a main program update instruction output by the external device and received from the external communication interface through the communication interface; The processor executes the boot program according to the main program update instruction, and updates the main program using a main program update data output by the external device received from the external communication interface through the communication interface; Jump from the address where the boot program is running to the address where the main program is stored; The processor receives a boot program update instruction output by the external device from the external communication interface through the communication interface; The processor executes the main program according to the boot program update instruction, and updates the boot program using a boot program update data output by the external device received from the external communication interface through the communication interface; as well as The processor executes the updated main program and the boot program.
3. The method for updating the boot program and the main program mutually according to claim 1, characterized in that: The method for mutual updating of the boot program and the main program further comprises the following steps: The processor executes the main program to update the boot program according to a boot program update instruction output by the external device received from the external communication interface through the communication interface, using a boot program update data output by the external device received from the external communication interface through the communication interface; The processor jumps back from the address where the main program is stored to the address where the boot program is stored according to a main program update instruction output by the external device and received from the external communication interface through the communication interface; The processor executes the boot program according to the main program update instruction, and updates the main program using a main program update data output by the external device received from the external communication interface through the communication interface; as well as The processor executes the updated main program and the boot program.
4. The method for updating the boot program and the main program mutually according to claim 1, characterized in that: The method for mutual updating of the boot program and the main program further comprises the following steps: The processor jumps from the address where the main program is executed to the address where the boot program is stored according to a main program update instruction output by the external device and received from the external communication interface through the communication interface; Executing the boot program, the processor updates the main program according to the main program update instruction using a main program update data output by the external device and received from the external communication interface through the communication interface; as well as The processor executes the updated main program.
5. The method for updating the boot program and the main program mutually according to claim 1, characterized in that: The method for mutual updating of the boot program and the main program further comprises the following steps: The processor executes the main program to update the boot program according to a boot program update instruction output by the external device received from the external communication interface through the communication interface, using a boot program update data output by the external device received from the external communication interface through the communication interface; and The processor executes the updated boot program.