CN112527342A - Method, device and equipment for upgrading application-programmable IAP (inter-Integrated Access Point) firmware - Google Patents

Method, device and equipment for upgrading application-programmable IAP (inter-Integrated Access Point) firmware Download PDF

Info

Publication number
CN112527342A
CN112527342A CN202011008031.3A CN202011008031A CN112527342A CN 112527342 A CN112527342 A CN 112527342A CN 202011008031 A CN202011008031 A CN 202011008031A CN 112527342 A CN112527342 A CN 112527342A
Authority
CN
China
Prior art keywords
data packet
packet file
iap
firmware
file
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.)
Pending
Application number
CN202011008031.3A
Other languages
Chinese (zh)
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.)
Shenzhen Silver Star Intelligent Technology Co Ltd
Original Assignee
Shenzhen Silver Star Intelligent Technology 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 Shenzhen Silver Star Intelligent Technology Co Ltd filed Critical Shenzhen Silver Star Intelligent Technology Co Ltd
Priority to CN202011008031.3A priority Critical patent/CN112527342A/en
Publication of CN112527342A publication Critical patent/CN112527342A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/60Software deployment
    • G06F8/65Updates
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/30Authentication, i.e. establishing the identity or authorisation of security principals
    • G06F21/31User authentication
    • G06F21/34User authentication involving the use of external additional devices, e.g. dongles or smart cards
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/60Software deployment
    • G06F8/61Installation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/70Software maintenance or management
    • G06F8/71Version control; Configuration management

Abstract

The embodiment of the invention relates to a method, a device and equipment for upgrading application-programmable IAP (Internet access protocol) firmware, wherein the method comprises the following steps: starting a watchdog program in the starting loading program, circularly executing a dog feeding operation, and receiving an IAP firmware upgraded data packet file; verifying the data packet file; when the data packet file passes the verification, setting a flag bit; running the data packet file; if the dog feeding operation is interrupted and the flag bit is not cleared in the running process of the data packet file, determining that the data packet file is abnormal, and restarting an upgrading program; and if the dog feeding operation is not interrupted in the running process of the data packet file, determining that the data packet file is normal, clearing the zone bit, and finishing the upgrading of the IAP firmware. The embodiment of the invention can be upgraded again even if the upper layer fails to send the files, so that the program can not be crashed, and the upgrading can be carried out again no matter whether the upgrading is successful or failed.

Description

Method, device and equipment for upgrading application-programmable IAP (inter-Integrated Access Point) firmware
Technical Field
The embodiment of the invention relates to the technical field of artificial intelligence, in particular to a method, a device and equipment for upgrading application-programmable IAP (embedded application program interface) firmware.
Background
IAP (In Application Programming), which is a program of a User to program a partial area of a User Flash during operation, aims to update and upgrade a firmware program In a product conveniently through a reserved communication port after the product is released.
In the IAP Firmware, the Firmware is Firmware, IAP is applied to programming, and at the moment, the Flash space can be divided into three types, namely BootLoader, IAP and Firmware. The IAP is used to communicate with the outside world, and the new Firmware is overlaid on the old Firmware, and the part of the application code needs to be completed by itself. Therefore, the IAP firmware is used for optimizing and upgrading the firmware of the later-stage product.
The current IAP firmware upgrade is to send a data packet to a main control chip of the upgrade device through an upper layer, but after the upgrade is completed, it is impossible to distinguish whether the upgraded file is a file that really needs to be upgraded. Therefore, upgrading fails, the master control chip of the upgrading device is halted, and the upgrading cannot be carried out again at this time.
Disclosure of Invention
The embodiment of the invention aims to provide a method, a device and equipment for upgrading application-programmable IAP (embedded application program interface) firmware, which can be upgraded again no matter whether the upgrade is successful or failed.
In a first aspect, an embodiment of the present invention provides an application-programmable IAP firmware upgrade method, which is applied to an application-programmable IAP firmware upgrade device, where an IAP firmware is loaded with a boot loader; the method comprises the following steps:
starting a watchdog program in the starting loading program, circularly executing a dog feeding operation, and receiving an IAP firmware upgraded data packet file;
verifying the data packet file;
when the data packet file passes the verification, setting a flag bit;
running the data packet file;
if the dog feeding operation is interrupted and the flag bit is not cleared in the running process of the data packet file, determining that the data packet file is abnormal, and restarting an upgrading program;
and if the dog feeding operation is not interrupted in the running process of the data packet file, determining that the data packet file is normal, clearing the zone bit, and finishing the upgrading of the IAP firmware.
In some embodiments, before verifying the data package file, the method further comprises:
receiving a first verification result from an upper layer, wherein the first verification result is obtained by the upper layer through verification of the data packet file;
the verifying the data packet file includes:
writing the data packet file into a first storage area, and verifying the data packet file in the first storage area to obtain a second verification result;
comparing the first check result with the second check result;
when the first check result is the same as the second check result, determining that the data packet file passes the check;
and when the first check result is different from the second check result, determining that the data packet file check fails.
In some embodiments, after determining that the verification of the data packet file fails when the first verification result is determined to be different from the second verification result, the method further comprises:
returning the upgrade program to the version before the IAP firmware upgrade
In some embodiments, verifying the data package file in the first storage area to obtain a second verification result includes:
determining whether the data packet file is completely written in the first storage area;
and if the data packet file is completely written in the first storage area, verifying the data packet file in the first storage area and obtaining a second verification result.
In some embodiments, said executing said data package file comprises:
and copying the data packet file from the first storage area to a second storage area, and operating the data packet file in the second storage area.
In some embodiments, the determining that the data packet file is abnormal if the dog feeding operation is interrupted and it is determined that the flag bit is not cleared during the running of the data packet file includes:
when the data packet file runs and the dog feeding operation cannot be executed, resetting the watchdog program, and jumping the program to a starting loading program;
and when the starting loader determines that the flag bit is not cleared, determining that the data packet file is abnormal.
In some embodiments, the restarting the upgrade procedure includes:
receiving the data packet file to be upgraded from the upper layer again, and executing the step of verifying the data packet file to be upgraded until the IAP firmware is upgraded;
and the data packet file to be upgraded is inconsistent with the abnormal data packet file.
In a second aspect, an embodiment of the present invention provides an application-programmable IAP firmware upgrade apparatus, which is applied to an application-programmable IAP firmware upgrade device, where the IAP firmware is loaded with a boot loader; the device comprises:
the starting watchdog module is used for starting a watchdog program in the starting loading program, circularly executing a watchdog feeding operation and receiving an IAP firmware upgraded data packet file;
the verification module is used for verifying the data packet file;
the setting module is used for setting a flag bit when the data packet file passes the verification;
the operation module is used for operating the data packet file;
the first determining module is used for determining that the data packet file is abnormal and restarting an upgrading program if the dog feeding operation is interrupted and the flag bit is not cleared in the running process of the data packet file;
and the second determining module is used for determining that the data packet file is normal, clearing the flag bit and finishing the updating of the IAP firmware if the dog feeding operation is not interrupted in the running process of the data packet file.
In some embodiments, the IAP firmware upgrade apparatus further comprises:
and the upper layer checking module is used for receiving a first checking result from an upper layer, wherein the first checking result is obtained by checking the data packet file by the upper layer.
The verification module further comprises:
the writing verification unit is used for writing the data packet file into a first storage area and verifying the data packet file in the first storage area to obtain a second verification result;
a comparison unit for comparing the first check result and the second check result;
the first determining unit is used for determining that the data packet file passes verification when the first verification result is the same as the second verification result;
and the second determining unit is used for determining that the verification of the data packet file fails when the first verification result is different from the second verification result.
In some embodiments, the IAP firmware upgrade apparatus further comprises:
and the rollback module is used for rolling back the upgrading program to the version before the IAP firmware is upgraded.
In other embodiments, the write verify unit is specifically configured to:
determining whether the data packet file is completely written in the first storage area;
and if the data packet file is completely written in the first storage area, verifying the data packet file in the first storage area and obtaining a second verification result.
In some embodiments, the execution module is specifically configured to:
and copying the data packet file from the first storage area to a second storage area, and operating the data packet file in the second storage area.
In some embodiments, the first determining module is specifically configured to:
when the data packet file runs and the dog feeding operation cannot be executed, resetting the watchdog program, and jumping the program to a starting loading program;
and when the starting loader determines that the flag bit is not cleared, determining that the data packet file is abnormal.
In some embodiments, the IAP firmware upgrade apparatus further comprises:
the upgrade module is used for receiving the data packet file to be upgraded from the upper layer again and executing the step of verifying the data packet file to be upgraded until the upgrade of the IAP firmware is completed;
and the data packet file to be upgraded is inconsistent with the abnormal data packet file.
In a third aspect, an embodiment of the present invention provides an upgrade apparatus, where the apparatus includes:
at least one processor, and
a memory communicatively coupled to the at least one processor, the memory storing instructions executable by the at least one processor to enable the at least one processor to perform the method described above.
In a fourth aspect, embodiments of the present invention provide a non-transitory computer-readable storage medium storing computer-executable instructions that, when executed by an upgrade apparatus, cause the upgrade apparatus to perform the method as described above.
According to the method, the device and the equipment for upgrading the application-programmable IAP firmware, disclosed by the embodiment of the invention, the watchdog program is started in the starting loading program, the dog feeding operation is circularly executed, when the data packet file upgraded by the IAP firmware is received, the data packet file is verified so as to ensure the accuracy of the data packet file in the transmission process, and when the data packet file passes the verification, the flag bit is set, the data packet file is operated, and the upgrading operation is started; if the dog feeding operation is interrupted and the flag bit is not cleared in the running process of the data packet file, determining that the data packet file sent by the upper layer is abnormal, directly restarting an upgrading program, not causing the upgrading program to crash, and realizing the upgrading again after the upgrading fails; and if the dog feeding operation is not interrupted in the running process of the data packet file, determining that the data packet file sent by the upper layer is normal, clearing the zone bit, and completing the updating of the IAP firmware.
Drawings
One or more embodiments are illustrated by way of example in the accompanying drawings, which correspond to the figures in which like reference numerals refer to similar elements and which are not to scale unless otherwise specified.
FIG. 1 is a schematic diagram of an application scenario of a method and apparatus for upgrading application-programmable IAP firmware according to an embodiment of the present invention;
FIG. 2 is a schematic flow chart diagram illustrating one embodiment of a method for upgrading application programmable IAP firmware in accordance with the present invention;
FIG. 3 is a schematic flow chart diagram illustrating one embodiment of a method for upgrading application programmable IAP firmware in accordance with the present invention;
FIG. 4 is a schematic diagram of an embodiment of an IAP firmware upgrade apparatus of the present invention;
FIG. 5 is a schematic diagram of an embodiment of an IAP firmware upgrade apparatus of the present invention;
fig. 6 is a diagram of the hardware architecture of a controller in one embodiment of the IAP firmware of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are some, but not all, embodiments of the present invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
The method and the device for upgrading application-programmable IAP firmware provided by the embodiment of the invention can be applied to the application scene illustrated in FIG. 1. The application scenario includes an upgrade device 10 loaded with application programmable IAP firmware. The upgrading device 10 may be various movable devices in artificial intelligence, such as a sweeping robot, an inspection robot, an unmanned sampling robot, an unmanned forklift, and the like, or may be other intelligent household appliances, such as an intelligent refrigerator, an intelligent washing machine, an intelligent television, and the like.
It is understood that each upgrade device 10 is provided with a controller as a main control center, and when the upgrade device 10 is upgraded by applying programmable IAP firmware, the upgrade device can be upgraded again regardless of success or failure of the upgrade.
Referring to fig. 2, fig. 2 is a flowchart illustrating a method for upgrading an application-programmable IAP firmware according to an embodiment of the present invention, where the method may be executed by the controller 13 in the upgrade apparatus 10, as shown in fig. 2, the method is applied to an application-programmable IAP firmware upgrade apparatus, the IAP firmware is loaded with a boot loader, and the method includes:
101: and starting a watchdog program in the starting and loading program, circularly executing a watchdog feeding operation, and receiving an IAP firmware upgraded data packet file.
When the device needs IAP firmware upgrade, a watchdog program is started in the boot loader (BootLoader), the watchdog program is circularly executed to perform watchdog feeding operation, and a data packet file for IAP firmware upgrade is received.
In the embedded operating system, the BootLoader is run before the operating system kernel runs, and can initialize hardware equipment and establish a memory space mapping diagram, so that the software and hardware environment of the system is brought to a proper state, and a correct environment is prepared for finally calling the operating system kernel. In an embedded system, since there is usually no firmware program like BIOS, the load and boot task of the whole system is completely completed by BootLoader.
Watchdog Timer (WDT) circuits typically have an input, referred to as the "dog feed". Specifically, when the controller 13 in the mobile upgrade apparatus 10 is operating normally, a signal is output to the dog feeder at intervals to zero the WDT. If the prescribed time is exceeded without feeding the dog (typically during program run-off), the WDT timing is exceeded, which gives a reset signal to the controller 13 to reset the controller 13 to prevent the controller 13 from crashing.
In some embodiments, the IAP application is one in which the user program is located in a different memory area than the IAP driver. In the application process, the user firmware is loaded to a fixed position by using an IAP driver program to complete the upgrading. Specifically, when the device needs an IAP firmware upgrade, a watchdog program is started in the boot loader (BootLoader), a watchdog operation is cyclically executed, a watchdog is timed, and a data packet file of the IAP firmware upgrade is received, the data packet file of the IAP firmware upgrade may be from an upper layer, such as an upper computer, another server, or another chip MCU, and the upper layer may transmit the data packet file of the IAP firmware upgrade to the boot loader through a network or another method.
The data packet file is a binary file.
In some embodiments, when receiving a packet file for updating an IAP firmware from an upper layer, the upper layer checks the packet file for updating the IAP firmware to obtain a first check result, where the first check result may include a check code, and sends the first check result and a frame of the packet file to the BootLoader loader.
102: and checking the data packet file.
In some embodiments, when the BootLoader receives a package file of an IAP firmware upgrade, verifying the package file may include:
21. and writing the data packet file into a first storage area (BANK2), and checking the data packet file in the first storage area (BANK2) to obtain a second checking result, wherein the second checking result can also be a checking code.
22. And comparing the first check result with the second check result, and determining that the data packet file passes the check when the first check result is the same as the second check result. The method can ensure that the data packet file transmitted by the upper layer has no packet loss phenomenon in the transmission process, and the transmission process is guaranteed.
23. And when the first check result is different from the second check result, determining that the data packet file check fails. If the data packet file transmitted by the upper layer is not matched with the data packet file of the upper layer, the upgrade program can be backed to the version before the IAP firmware upgrade, so that the program is prevented from continuously executing the upgrade operation.
In some embodiments, the checking of the packet file is exemplified by a cyclic redundancy check, CRC, which is a computational method for checking the accuracy of digital transmissions over a communication link. Specifically, the upper layer calculates a value of information contained in the data package file as a check code (a first check result) by using a certain formula, attaches the value to the data package file, and performs the same calculation on the same data (the data package file) by using the programmable IAP firmware upgrade device to obtain a second check result. When the transmission is correct, the first and second check results should be identical. If the two check results are not consistent, indicating an error in the transmission process, the application programmable IAP firmware upgrade device may require the upper layer to resend the data.
In some embodiments, verifying the data package file in the first storage area to obtain a second verification result includes:
determining whether the data packet file is completely written in the first storage area;
and if the data packet file is completely written in the first storage area, verifying the data packet file in the first storage area and obtaining a second verification result.
Specifically, when all the data packet files are written into the first storage area, the data packet files in the first storage area are verified, so that the accuracy of the verification result is ensured.
103: and when the data packet file passes the verification, setting a flag bit.
The flag bit is used for marking that the current data packet file has no phenomena of packet loss and the like in the transmission process and is used for marking the file state in the subsequent upgrading process.
And 104, operating the data packet file.
In some embodiments, running the package file may be copying the package file from the first storage area to a second storage area, and running the package file in the second storage area.
Specifically, the first storage area is used for temporarily storing the data package file, the second storage area is an area where the data package file is really run, and the data package file which is correctly transmitted is copied to the second storage area to run under the condition that the first check result is the same as the second check result, so that the data package file is prevented from being directly written into the second storage area, and the crash caused by the failure of upgrading is avoided.
And 105, if the dog feeding operation is interrupted and the flag bit is not cleared in the running process of the data packet file, determining that the data packet file is abnormal, and restarting an upgrading program.
The method comprises the steps of setting a flag bit when the data packet file is operated, then operating the data packet file, determining that the data packet file is abnormal when the dog feeding operation is interrupted and the flag bit is not cleared in the operation process of the data packet file, and directly restarting an upgrading program.
Specifically, when the data packet file runs and the dog feeding operation cannot be executed, the watchdog program is reset, and the program jumps to the starting loading program; and when the starting loader determines that the flag bit is not cleared, determining that the data packet file is abnormal.
Through the watchdog program, when the data packet file is abnormal, the dog feeding operation is interrupted, so that resetting is realized, the upgrading program directly jumps to the starting loading program, the crash situation cannot occur, the upgrading program can enter the upgrading program again, the data verification of an upper layer cannot be excessively relied on, the upgrading can be completely and independently completed by a chip needing upgrading, and the modular design is met.
In some embodiments, the restarting the upgrade procedure includes:
receiving the data packet file to be upgraded from the upper layer again, and executing the step of verifying the data packet file to be upgraded until the IAP firmware is upgraded;
and the data packet file to be upgraded is inconsistent with the abnormal data packet file.
When the current data packet file is determined to be abnormal, the data packet file needs to be upgraded again, specifically, the data packet file to be upgraded, which is inconsistent with the abnormal data packet file, is received from the upper layer again, and the step 101 and the step 106 are repeated, when the data packet file is normal, the upgrade is successful, so that the upgrade operation after the upgrade failure is realized.
106: and if the dog feeding operation is not interrupted in the running process of the data packet file, determining that the data packet file is normal, clearing the zone bit, and finishing the upgrading of the IAP firmware.
Specifically, if the dog feeding operation is not interrupted during the operation of the data packet file, it is determined that the data packet file is a normal file, and at this time, the flag bit is cleared, which indicates that the data packet file can enable the IAP firmware to be successfully updated.
Referring to fig. 3, a flowchart of an embodiment of an application programmable IAP firmware upgrade method according to the present invention is shown, in which the method includes:
a: and starting a watchdog program in the starting and loading program, circularly executing a watchdog feeding operation, and receiving an IAP firmware upgraded data packet file.
b: and receiving a first verification result from an upper layer, wherein the first verification result is obtained by the upper layer through verification of the data packet file.
c: and writing the data packet file into a first storage area, and verifying the data packet file in the first storage area to obtain a second verification result.
d: and comparing the first check result with the second check result.
e: and when the first check result is the same as the second check result, determining that the data packet file passes the check.
f: and when the first check result is different from the second check result, determining that the data packet file check fails.
g: and returning the upgrading program to the version before the IAP firmware is upgraded.
h: and when the data packet file passes the verification, setting a flag bit.
i: and copying the data packet file from the first storage area to a second storage area, and operating the data packet file in the second storage area.
j: and if the dog feeding operation is interrupted and the flag bit is not cleared in the running process of the data packet file, determining that the data packet file is abnormal.
k: and receiving the data packet file to be upgraded from the upper layer again, and executing the steps a-d.
l: and if the dog feeding operation is not interrupted in the running process of the data packet file, determining that the data packet file is normal, clearing the zone bit, and finishing the upgrading of the IAP firmware.
According to the embodiment of the invention, a watchdog program is started in a starting loading program, a dog feeding operation is executed in a circulating manner, when a data packet file upgraded by an IAP (Internet access protocol) firmware is received, the data packet file is verified to ensure the accuracy of the data packet file in the transmission process, when the data packet file passes verification, a flag bit is set, the data packet file is operated, and the upgrading operation is started; if the dog feeding operation is interrupted and the flag bit is not cleared in the running process of the data packet file, determining that the data packet file is abnormal, restarting an upgrading program, avoiding the crash of the upgrading program, and realizing the upgrading again after the upgrading fails; and if the dog feeding operation is not interrupted in the running process of the data packet file, determining that the data packet file is normal, clearing the zone bit, and completing the updating of the IAP firmware.
Correspondingly, as shown in fig. 4, an embodiment of the present invention further provides an IAP firmware upgrading apparatus, which may be used in the upgrading device 10 shown in fig. 1, where the IAP firmware upgrading apparatus 700 includes:
a watchdog starting module 701, configured to start a watchdog program in the start loading program, perform a watchdog feeding operation in a circulating manner, and receive a data packet file for updating an IAP firmware;
a checking module 702, configured to check the data packet file;
a setting module 703, configured to set a flag bit when the data packet file passes verification;
an operation module 704, configured to operate the data package file;
a first determining module 705, configured to determine that the data packet file is abnormal and restart an upgrading program if the dog feeding operation is interrupted and it is determined that the flag bit is not cleared in the running process of the data packet file;
a second determining module 706, configured to determine that the data packet file is normal, clear the flag bit, and complete updating the IAP firmware if the dog feeding operation is not interrupted during the operation of the data packet file.
According to the embodiment of the invention, a watchdog program is started in a starting loading program, a dog feeding operation is executed in a circulating manner, when a data packet file upgraded by an IAP (Internet access protocol) firmware is received, the data packet file is verified to ensure the accuracy of the data packet file in the transmission process, when the data packet file passes verification, a flag bit is set, the data packet file is operated, and the upgrading operation is started; if the dog feeding operation is interrupted and the flag bit is not cleared in the running process of the data packet file, determining that the data packet file is abnormal, restarting an upgrading program, avoiding the crash of the upgrading program, and realizing the upgrading again after the upgrading fails; and if the dog feeding operation is not interrupted in the running process of the data packet file, determining that the data packet file is normal, clearing the zone bit, and completing the updating of the IAP firmware.
In another embodiment, referring to fig. 5, the IAP firmware upgrade apparatus 700 further includes:
an upper layer checking module 707, configured to receive a first checking result from an upper layer, where the first checking result is obtained by checking, by the upper layer, the data packet file.
In other embodiments, referring to fig. 5, the checking module 702 further includes:
a write verification unit 721, configured to write the data packet file into a first storage area, and verify the data packet file in the first storage area to obtain a second verification result;
a comparing unit 722, configured to compare the first check result and the second check result;
a first determining unit 723, configured to determine that the data packet file passes verification when the first verification result is the same as the second verification result;
a second determining unit 724, configured to determine that the verification of the data packet file fails when the first verification result is different from the second verification result.
In some of these embodiments, IAP firmware upgrade apparatus 700 further includes:
a rollback module 708 configured to rollback the upgrade program to the pre-IAP firmware upgrade version.
In other embodiments, the write verification unit 721 is specifically configured to:
determining whether the data packet file is completely written in the first storage area;
and if the data packet file is completely written in the first storage area, verifying the data packet file in the first storage area and obtaining a second verification result.
In some embodiments, the running module 704 is specifically configured to:
and copying the data packet file from the first storage area to a second storage area, and operating the data packet file in the second storage area.
In some embodiments, the first determining module 705 is specifically configured to:
when the data packet file runs and the dog feeding operation cannot be executed, resetting the watchdog program, and jumping the program to a starting loading program;
and when the starting loader determines that the flag bit is not cleared, determining that the data packet file is abnormal.
In some of these embodiments, IAP firmware upgrade apparatus 700 further includes:
a re-upgrade module 709, configured to re-receive the data package file to be upgraded from the upper layer, and perform a step of verifying the data package file to be upgraded until the upgrade of the IAP firmware is completed;
and the data packet file to be upgraded is inconsistent with the abnormal data packet file.
It should be noted that the above-mentioned apparatus can execute the method provided by the embodiments of the present application, and has corresponding functional modules and beneficial effects for executing the method. For technical details which are not described in detail in the device embodiments, reference is made to the methods provided in the embodiments of the present application.
Fig. 6 is a schematic diagram of a hardware structure of a controller in an embodiment of the upgrading apparatus 10, and as shown in fig. 6, the controller 13 includes:
one or more processors 131, a memory 132, and a transceiver 133, where the transceiver 133 is configured to receive the data packet file and the first verification result sent by the upper layer. In fig. 6, a processor 131, a memory 132, and a transceiver 133 are taken as an example.
The processor 131, the memory 132, and the transceiver 133 may be connected by a bus or other means, as exemplified by the bus connection in fig. 6.
The memory 132 serves as a non-volatile computer readable storage medium, and can be used for storing non-volatile software programs, non-volatile computer executable programs, and modules, such as program instructions/modules corresponding to the application programmable IAP firmware upgrade method in the embodiments of the present application (for example, the watchdog opening module 701, the checking module 702, the setting module 703, the running module 704, the first determining module 705, the second determining module 706, the upper layer checking module 707, the rollback module 708, and the re-upgrade module 709 shown in fig. 4-5). The processor 131 executes various functional applications and data processing of the controller by running the non-volatile software programs, instructions and modules stored in the memory 132, i.e., implementing the application programmable IAP firmware upgrade method of the above-described method embodiments.
The memory 132 may include a storage program area and a storage data area, wherein the storage program area may store an operating system, an application program required for at least one function; the storage data area may store data created according to use of the IAP firmware upgrade apparatus, and the like. Further, the memory 132 may include high speed random access memory, and may also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other non-volatile solid state storage device. In some embodiments, memory 132 may optionally include memory located remotely from processor 131, which may be connected to the upgrade device via a network. Examples of such networks include, but are not limited to, the internet, intranets, local area networks, mobile communication networks, and combinations thereof.
The one or more modules are stored in the memory 132 and when executed by the one or more processors 131 perform the method for application programmable IAP firmware upgrade in any of the above-described method embodiments, e.g., performing the method steps 101-106 of fig. 2, the method steps of fig. 3 described above; the functions of the modules 701 and 706 and 701 and 709 in fig. 4 and 5 are realized.
The product can execute the method provided by the embodiment of the application, and has the corresponding functional modules and beneficial effects of the execution method. For technical details that are not described in detail in this embodiment, reference may be made to the methods provided in the embodiments of the present application.
Embodiments of the present application provide a non-transitory computer-readable storage medium storing computer-executable instructions, which are executed by one or more processors, such as the one processor 131 in fig. 6, to enable the one or more processors to perform the method for updating IAP firmware in any of the above method embodiments, such as the method steps 101 to 106 in fig. 2 and the method steps in fig. 3 described above; the functions of the modules 701 and 706 and 701 and 709 in fig. 4 and 5 are realized.
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 may be selected according to actual needs to achieve the purpose of the solution of the present embodiment.
Through the above description of the embodiments, those skilled in the art will clearly understand that the embodiments may be implemented by software plus a general hardware platform, and may also be implemented by hardware. It will be understood by those skilled in the art that all or part of the processes of the methods of the embodiments described above can be implemented by hardware related to instructions of a computer program, which can be stored in a computer readable storage medium, and when executed, can include the processes of the embodiments of the methods described above. The storage medium may be a magnetic disk, an optical disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), or the like.
Finally, it should be noted that: the above examples are only intended to illustrate the technical solution of the present invention, but not to limit it; within the idea of the invention, also technical features in the above embodiments or in different embodiments may be combined, steps may be implemented in any order, and there are many other variations of the different aspects of the invention as described above, which are not provided in detail for the sake of brevity; although the present invention has been described in detail with reference to the foregoing embodiments, it will be understood by those of ordinary skill in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some technical features may be equivalently replaced; and the modifications or the substitutions do not make the essence of the corresponding technical solutions depart from the scope of the technical solutions of the embodiments of the present invention.

Claims (10)

1. The method is characterized in that the method is applied to an application programming IAP firmware upgrading device, and the IAP firmware is loaded with a start loading program; the method comprises the following steps:
starting a watchdog program in the starting loading program, circularly executing a dog feeding operation, and receiving an IAP firmware upgraded data packet file;
verifying the data packet file;
when the data packet file passes the verification, setting a flag bit;
running the data packet file;
if the dog feeding operation is interrupted and the flag bit is not cleared in the running process of the data packet file, determining that the data packet file is abnormal, and restarting an upgrading program;
and if the dog feeding operation is not interrupted in the running process of the data packet file, determining that the data packet file is normal, clearing the zone bit, and finishing the upgrading of the IAP firmware.
2. The method of claim 1, wherein prior to said verifying said packet file, said method further comprises:
receiving a first verification result from an upper layer, wherein the first verification result is obtained by the upper layer through verification of the data packet file;
the verifying the data packet file includes:
writing the data packet file into a first storage area, and verifying the data packet file in the first storage area to obtain a second verification result;
comparing the first check result with the second check result;
when the first check result is the same as the second check result, determining that the data packet file passes the check;
and when the first check result is different from the second check result, determining that the data packet file check fails.
3. The method of claim 2, wherein after determining that the packet file check fails when the first check result is determined to be different from the second check result, the method further comprises:
and returning the upgrading program to the version before the IAP firmware is upgraded.
4. The method of claim 2, wherein verifying the data package file in the first storage area to obtain a second verification result comprises:
determining whether the data packet file is completely written in the first storage area;
and if the data packet file is completely written in the first storage area, verifying the data packet file in the first storage area and obtaining a second verification result.
5. The method of claim 2, wherein the running the package file comprises:
and copying the data packet file from the first storage area to a second storage area, and operating the data packet file in the second storage area.
6. The method of claim 1, wherein determining that the packet file is abnormal if the feeding dog operation is interrupted and it is determined that the flag bit is not cleared during the operation of the packet file comprises:
when the data packet file runs and the dog feeding operation cannot be executed, resetting the watchdog program, and jumping the program to a starting loading program;
and when the starting loader determines that the flag bit is not cleared, determining that the data packet file is abnormal.
7. The method of any of claims 1-6, wherein restarting the upgrade procedure comprises:
receiving the data packet file to be upgraded from the upper layer again, and executing the step of verifying the data packet file to be upgraded until the IAP firmware is upgraded;
and the data packet file to be upgraded is inconsistent with the abnormal data packet file.
8. An application-programmable IAP firmware upgrading device is characterized by being applied to an IAP firmware upgrading device, wherein the IAP firmware is loaded with a start loading program; the device comprises:
the starting watchdog module is used for starting a watchdog program in the starting loading program, circularly executing a watchdog feeding operation and receiving an IAP firmware upgraded data packet file;
the verification module is used for verifying the data packet file;
the setting module is used for setting a flag bit when the data packet file passes the verification;
the operation module is used for operating the data packet file;
the first determining module is used for determining that the data packet file is abnormal and restarting an upgrading program if the dog feeding operation is interrupted and the flag bit is not cleared in the running process of the data packet file;
and the second determining module is used for determining that the data packet file is normal, clearing the flag bit and finishing the updating of the IAP firmware if the dog feeding operation is not interrupted in the running process of the data packet file.
9. An upgrade apparatus, characterized in that the apparatus comprises:
at least one processor, and
a memory communicatively coupled to the at least one processor, the memory storing instructions executable by the at least one processor to enable the at least one processor to perform the method of any of claims 1-7.
10. A non-transitory computer-readable storage medium storing computer-executable instructions that, when executed by an upgrade device, cause the upgrade device to perform the method of any one of claims 1-7.
CN202011008031.3A 2020-09-23 2020-09-23 Method, device and equipment for upgrading application-programmable IAP (inter-Integrated Access Point) firmware Pending CN112527342A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011008031.3A CN112527342A (en) 2020-09-23 2020-09-23 Method, device and equipment for upgrading application-programmable IAP (inter-Integrated Access Point) firmware

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011008031.3A CN112527342A (en) 2020-09-23 2020-09-23 Method, device and equipment for upgrading application-programmable IAP (inter-Integrated Access Point) firmware

Publications (1)

Publication Number Publication Date
CN112527342A true CN112527342A (en) 2021-03-19

Family

ID=74980319

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011008031.3A Pending CN112527342A (en) 2020-09-23 2020-09-23 Method, device and equipment for upgrading application-programmable IAP (inter-Integrated Access Point) firmware

Country Status (1)

Country Link
CN (1) CN112527342A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113434185A (en) * 2021-06-29 2021-09-24 成都中微达信科技有限公司 Method and system for online upgrading processor application program

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20040176703A1 (en) * 2003-03-04 2004-09-09 Christensen Mark C. Apparatus for monitoring intra-abdominal pressure
CN103473088A (en) * 2013-08-30 2013-12-25 北京远特科技有限公司 Method and system for online upgrading of single chip microcomputer
CN103761122A (en) * 2013-12-31 2014-04-30 青岛歌尔声学科技有限公司 Chip firmware updating method and system
CN104281479A (en) * 2014-10-31 2015-01-14 深圳市大疆创新科技有限公司 Firmware upgrading method and device
CN106569847A (en) * 2016-10-14 2017-04-19 数源科技股份有限公司 Method for realizing IAP remote upgrade through vehicle-mounted system based on mobile network
CN109614130A (en) * 2018-12-12 2019-04-12 湖南康通电子股份有限公司 A kind of cloud broadcast upgrade method and system with trial operation, self-check

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20040176703A1 (en) * 2003-03-04 2004-09-09 Christensen Mark C. Apparatus for monitoring intra-abdominal pressure
CN103473088A (en) * 2013-08-30 2013-12-25 北京远特科技有限公司 Method and system for online upgrading of single chip microcomputer
CN103761122A (en) * 2013-12-31 2014-04-30 青岛歌尔声学科技有限公司 Chip firmware updating method and system
CN104281479A (en) * 2014-10-31 2015-01-14 深圳市大疆创新科技有限公司 Firmware upgrading method and device
CN106569847A (en) * 2016-10-14 2017-04-19 数源科技股份有限公司 Method for realizing IAP remote upgrade through vehicle-mounted system based on mobile network
CN109614130A (en) * 2018-12-12 2019-04-12 湖南康通电子股份有限公司 A kind of cloud broadcast upgrade method and system with trial operation, self-check

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
李飞创作工作室, 济南:山东电子音像出版社 *

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113434185A (en) * 2021-06-29 2021-09-24 成都中微达信科技有限公司 Method and system for online upgrading processor application program

Similar Documents

Publication Publication Date Title
CN106569847B (en) Method for vehicle-mounted system to realize IAP remote upgrade based on mobile network
CN109189445B (en) Method for upgrading program of equipment of Internet of things
KR101515198B1 (en) Apparatus and method for firmware upgrade in mobile device
CN109358887B (en) On-line upgrading method, device and system for single chip microcomputer program
US20090094450A1 (en) Firmware image update and management
CN110083374B (en) Upgrade rollback method, system and terminal equipment
CN110209405B (en) Automatic upgrading method and device for distributed system
CN106775610B (en) Electronic equipment starting method and electronic equipment
RU2602378C1 (en) Rack with plurality of rack control modules and method of updating firmware used for rack
CN105117261A (en) Enhanced upgrade path
CN111930406B (en) Vehicle-mounted terminal micro control unit software upgrading method, electronic equipment and storage medium
CN104915226A (en) Network device software starting method, device and network device
CN105468390B (en) BOOT online upgrading device and method
CN112527342A (en) Method, device and equipment for upgrading application-programmable IAP (inter-Integrated Access Point) firmware
CN114153484A (en) Operation method and device for updating program, electronic device and storage medium
CN111273928B (en) Bootloader design method for self-upgrading
CN111090443A (en) Method, equipment and storage medium for guaranteeing safe upgrade of linux system
CN115827046A (en) Method and device for realizing OTA (over the air) upgrade of SPL (shortest Path first) partition, terminal equipment and chip
EP2733612B1 (en) Information processing device, method, and program
CN106951276B (en) Multi-controller software upgrading and address conflict detection method and device
CN114546455A (en) MCU software upgrading method and device for double partitions
CN112925546B (en) Multistage verification method and system for preventing vehicle-mounted ECU from refreshing errors
CN112559349B (en) Program running method and running device
CN113377425A (en) BMC firmware generation method and device, BMC starting method and device and storage medium
CN114064086B (en) Multi-stage processor system and upgrading method thereof

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
CB02 Change of applicant information
CB02 Change of applicant information

Address after: 518000 1701, building 2, Yinxing Zhijie, No. 1301-72, sightseeing Road, Xinlan community, Guanlan street, Longhua District, Shenzhen, Guangdong Province

Applicant after: Shenzhen Yinxing Intelligent Group Co.,Ltd.

Address before: 518000 building A1, Yinxing hi tech Industrial Park, Guanlan street, Longhua District, Shenzhen City, Guangdong Province

Applicant before: Shenzhen Silver Star Intelligent Technology Co.,Ltd.

RJ01 Rejection of invention patent application after publication
RJ01 Rejection of invention patent application after publication

Application publication date: 20210319