CN112882731A - Embedded software upgrading method and device - Google Patents

Embedded software upgrading method and device Download PDF

Info

Publication number
CN112882731A
CN112882731A CN202110022955.7A CN202110022955A CN112882731A CN 112882731 A CN112882731 A CN 112882731A CN 202110022955 A CN202110022955 A CN 202110022955A CN 112882731 A CN112882731 A CN 112882731A
Authority
CN
China
Prior art keywords
application software
installation package
controlling
upgrade
boot loader
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
CN202110022955.7A
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.)
Beijing Jinhong Xi Dian Information Technology Co ltd
Original Assignee
Beijing Jinhong Xi Dian Information 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 Beijing Jinhong Xi Dian Information Technology Co ltd filed Critical Beijing Jinhong Xi Dian Information Technology Co ltd
Priority to CN202110022955.7A priority Critical patent/CN112882731A/en
Publication of CN112882731A publication Critical patent/CN112882731A/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

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Security & Cryptography (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Stored Programmes (AREA)

Abstract

The application provides an embedded software upgrading method and device, and the method comprises the following steps: after the application software in the embedded software is started, the application software is controlled to receive an upgrade installation package of the application software through a corresponding communication interface, the application software is controlled to store the upgrade installation package into a preset storage device of the electronic equipment, after a boot loader of the electronic equipment is controlled to be started, the boot loader is controlled to obtain the upgrade installation package of the application software from the preset storage device, and the boot loader is controlled to upgrade the application software according to the upgrade installation package of the application software. Therefore, the bootstrap loader of the application has stronger universality and robustness when the embedded software is upgraded.

Description

Embedded software upgrading method and device
Technical Field
The present application relates to the field of embedded software technologies, and in particular, to a method and an apparatus for upgrading embedded software.
Background
In recent years, embedded software has been developed rapidly and is widely used in various products, such as vehicles, ships, airplanes, or trains, where a large amount of embedded software is installed. Embedded software has become a key and driving technology for digital modification and intelligent value-added of products.
Currently, the main mode of embedded software upgrade is an application-level programming (IAP) mode, that is: and configuring a communication interface, and guiding a loading program to receive the upgrade installation package of the application software through the communication interface and finish the upgrade of the application software. For different application software, the bootloader may need to receive corresponding data through different communication interfaces, and therefore, the bootloader needs to receive corresponding data according to different communication interfaces, such as: a Controller Area Network (CAN) interface, a serial interface, a Network interface, etc. to develop different boot loaders. The method has the problem of low universality of upgrading the embedded software by the boot loader.
Disclosure of Invention
The application provides an embedded software upgrading method and device, and aims to solve the problem that the universality of the embedded software upgraded by a boot loader is low.
In a first aspect, the present application provides an embedded software upgrading method, applied to an electronic device, the method including:
after the application software in the embedded software is started, the application software is controlled to receive the upgrade installation package of the application software through the corresponding communication interface, and the application software is controlled to store the upgrade installation package into a preset storage device of the electronic equipment.
After a boot loader of the electronic equipment is controlled to be started, the boot loader is controlled to obtain an upgrade installation package of the application software from a preset storage device.
And controlling the boot loader to upgrade the application software according to the upgrade installation package of the application software.
Optionally, after the controlling the application software stores the upgrade installation package in the preset storage device of the electronic device, the method further includes:
and controlling the application software to store configuration information in a preset storage device, wherein the configuration information is used for indicating that the application software needs to be upgraded.
The method for controlling the boot loader to acquire the upgrade installation package of the application software from the preset storage device comprises the following steps:
controlling a boot loader to acquire configuration information from a preset storage device; and if the configuration information is acquired, controlling the boot loader to acquire the upgrade installation package of the application software from the preset storage device.
Optionally, after controlling the bootloader to upgrade the application software according to the upgrade installation package of the application software, the method further includes:
and controlling the boot loader to delete the configuration information from the preset storage device.
Optionally, the method further comprises:
and if the configuration information is not acquired, controlling the boot loader to start the application software.
Optionally, before the controlling the application software receives the upgrade installation package of the application software through the corresponding communication interface, the method further includes:
the control application software initializes the drivers of the corresponding communication interfaces.
Optionally, the corresponding communication interface is a CAN interface, a serial interface, or a network interface.
In a second aspect, the present application provides an embedded software upgrading apparatus, applied to an electronic device, the apparatus including:
and the receiving module is used for controlling the application software to receive the upgrade installation package of the application software through the corresponding communication interface after the application software in the embedded software is started.
And the storage module is used for controlling the application software to store the upgrade installation package into a preset storage device of the electronic equipment.
And the acquisition module is used for controlling the boot loader to acquire the upgrade installation package of the application software from the preset storage device after the boot loader of the electronic equipment is controlled to be started.
And the processing module is used for controlling the boot loader to upgrade the application software according to the upgrade installation package of the application software.
Optionally, the storage module is further configured to:
and controlling the application software to store configuration information in a preset storage device, wherein the configuration information is used for indicating that the application software needs to be upgraded.
An acquisition module specifically configured to:
controlling a boot loader to acquire configuration information from a preset storage device; and if the configuration information is acquired, controlling the boot loader to acquire the upgrade installation package of the application software from the preset storage device.
Optionally, the processing module is further configured to:
and controlling the boot loader to delete the configuration information from the preset storage device.
Optionally, the obtaining module is further configured to:
and if the configuration information is not acquired, controlling the boot loader to start the application software.
Optionally, the receiving module is further configured to:
the control application software initializes the drivers of the corresponding communication interfaces.
Optionally, the corresponding communication interface is a CAN interface, a serial interface, or a network interface.
In a third aspect, the present application provides an embedded software upgrading apparatus, including: a memory and a processor;
the memory is for storing program instructions.
The processor is configured to invoke program instructions in the memory to perform the embedded software upgrade method as described in the first aspect of the present application.
In a fourth aspect, the present application provides a computer-readable storage medium, in which computer program instructions are stored, and when the computer program instructions are executed, the embedded software upgrading method according to the first aspect of the present application is implemented.
In a fifth aspect, the present application provides a computer program product comprising a computer program which, when executed by a processor, implements the embedded software upgrade method as described in the first aspect of the present application.
According to the method and the device for upgrading the embedded software, after the application software in the embedded software is started, the application software is controlled to receive the upgrading installation package of the application software through the corresponding communication interface, the application software is controlled to store the upgrading installation package into the preset storage device of the electronic equipment, after the boot loader of the electronic equipment is controlled to be started, the boot loader is controlled to obtain the upgrading installation package of the application software from the preset storage device, and the boot loader is controlled to upgrade the application software according to the upgrading installation package of the application software. According to the method and the device, the application software is controlled to receive the upgrade installation package of the application software through the corresponding communication interface, the boot loader finishes the upgrade of the application software according to the upgrade installation package, and the boot loader does not need to receive data through a communication interface (such as a CAN interface, a serial interface or a network interface), so that the boot loader has stronger universality and robustness when the embedded software is upgraded, the complexity of the boot loader is reduced, and the reliability of the boot loader is improved.
Drawings
In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings needed to be used in the description of the embodiments or the prior art will be briefly introduced below, and it is obvious that the drawings in the following description are some embodiments of the present application, and for those skilled in the art, other drawings can be obtained according to these drawings without inventive exercise.
Fig. 1 is a schematic view of an application scenario provided in an embodiment of the present application;
fig. 2 is a flowchart of an embedded software upgrading method according to an embodiment of the present application;
FIG. 3 is an architecture diagram of an embedded software upgrade provided by an embodiment of the present application;
FIG. 4 is a flowchart of an embedded software upgrade method according to another embodiment of the present application;
fig. 5 is a flowchart illustrating a process of sending an upgrade installation package to application software by an upper computer according to an embodiment of the present application;
fig. 6 is a flowchart illustrating a process of receiving, by application software, an upgrade installation package sent by an upper computer according to an embodiment of the present application;
fig. 7 is a schematic structural diagram of an embedded software upgrading apparatus according to an embodiment of the present application;
fig. 8 is a schematic structural diagram of an embedded software upgrading apparatus according to another embodiment of the present application.
Detailed Description
In order to make the objects, technical solutions and advantages of the embodiments of the present application clearer, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are some embodiments of the present application, but not all embodiments. 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 application.
The embedded software is developed rapidly and widely applied to various products. Currently, the main mode of embedded software upgrade is the IAP mode, that is: and configuring a communication interface, and guiding a loading program to receive the upgrade installation package of the application software through the communication interface and finish the upgrade of the application software. For different application software, the bootloader may need to receive corresponding data through different communication interfaces, and therefore, the bootloader needs to receive corresponding data according to different communication interfaces, such as: CAN interface, serial interface, network interface, etc. to develop different boot loaders. The method has the problem of low universality of upgrading the embedded software by the boot loader.
Therefore, the present application provides an embedded software upgrading method and apparatus, which controls application software in embedded software to pass through corresponding communication interfaces, such as: the CAN interface, the serial interface, the network interface and the like receive the upgrade installation package of the application software and guide the loading program to finish the upgrade of the application software according to the upgrade installation package. Because the bootstrap loader does not need to receive data through a communication interface (such as a CAN interface, a serial interface, a network interface and the like), the bootstrap loader has stronger universality and robustness when the embedded software is upgraded, and the complexity of the bootstrap loader is reduced, thereby improving the reliability of the bootstrap loader.
Fig. 1 is a schematic view of an application scenario provided in an embodiment of the present application, and as shown in fig. 1, a train dispatching device 120 is arranged on a train 110, and a single chip microcomputer 130 in the train dispatching device 120 is provided with a boot loader and application software in embedded software. The single chip microcomputer 130 controls the application software to receive the upgrade installation package of the application software sent by the notebook computer 140 through the corresponding communication interface, and the single chip microcomputer 130 controls the boot loader to upgrade the application software according to the upgrade installation package. The specific implementation process of upgrading application software by a boot loader can be seen in the scheme of the following embodiments. It should be noted that the application scenarios of the aspects of the present application are not limited to those shown in fig. 1.
Fig. 2 is a flowchart of an embedded software upgrading method according to an embodiment of the present application, where the method according to this embodiment may be applied to an electronic device, for example, a device equipped with a single chip microcomputer. As shown in fig. 2, the method of this embodiment may include:
s201, after application software in the embedded software is started, controlling the application software to receive an upgrade installation package of the application software through a corresponding communication interface, and controlling the application software to store the upgrade installation package into a preset storage device of the electronic equipment.
FIG. 3 is an architecture diagram of an embedded software upgrade provided by an embodiment of the present application. As shown in fig. 3, the scheme of the present embodiment is described based on fig. 3.
In this embodiment, the application software is one of embedded software, and the preset storage device may be a non-volatile memory, such as a Flash memory (Flash). After the application software is started, the electronic equipment controls the application software to receive the upgrade installation package of the application software through the corresponding communication interface. The upgrade installation package of the application software may be sent by an upper computer, such as a computer, to the electronic device executing the embodiment of the method. After the application software receives the upgrade installation package of the application software, the upgrade installation package is stored in Flash of the electronic device, and the storage mode is, for example: and replacing the original installation package of the application software in an overlaying mode by the upgrade installation package of the application software.
Optionally, the corresponding communication interface is a CAN interface, a serial interface, or a network interface.
In this embodiment, the application software may receive the upgrade installation package of the application software through a CAN interface, a serial interface, or a network interface.
S202, after the boot loader of the electronic equipment is controlled to be started, the boot loader is controlled to obtain the upgrade installation package of the application software from the preset storage device.
In this embodiment, after the boot loader of the electronic device is started, the boot loader automatically obtains the upgrade installation package of the application software from Flash. The upgrading installation package of the application software in the Flash is stored in the Flash of the electronic equipment by the application software.
And S203, controlling the boot loader to upgrade the application software according to the upgrade installation package of the application software.
In this embodiment, after the boot loader acquires the upgrade installation package of the application software, the application software is upgraded according to the upgrade installation package of the application software. For example: the original installation package of the currently installed application software is stored in a Read-Only Memory (ROM) of the electronic device, and the boot loader replaces the original installation package of the application software in the ROM with the upgraded installation package of the application software, where the specific replacement method is, for example: and the boot loader replaces the original installation package of the application software in the ROM in a covering mode by the upgrade installation package of the application software, or deletes the original installation package of the application software in the ROM first and then stores the upgrade installation package of the application software in the ROM. And then guiding the loading program to run an upgrade installation package of the application software, and completing automatic upgrade and starting of the application software.
In the method for upgrading embedded software provided by this embodiment, after application software in the embedded software is started, the application software is controlled to receive an upgrade installation package of the application software through a corresponding communication interface, and the application software is controlled to store the upgrade installation package into a preset storage device of an electronic device, after a boot loader of the electronic device is controlled to be started, the boot loader is controlled to obtain the upgrade installation package of the application software from the preset storage device, and the boot loader is controlled to upgrade the application software according to the upgrade installation package of the application software. In this embodiment, the control application software receives the upgrade installation package of the application software through the corresponding communication interface, the boot loader completes the upgrade of the application software according to the upgrade installation package, and the boot loader does not need to receive data through a communication interface (such as a CAN interface, a serial interface, or a network interface), so that the boot loader has stronger universality and robustness when upgrading the embedded software, the complexity of the boot loader is reduced, and the reliability of the boot loader is improved.
Based on the embodiment shown in fig. 2, in some embodiments, fig. 4 is a flowchart of an embedded software upgrading method provided in another embodiment of the present application, and as shown in fig. 4, the method of this embodiment may include:
s401, after the application software in the embedded software is started, controlling the application software to initialize the drive of the corresponding communication interface.
In this embodiment, the communication interface is, for example, a CAN interface, a serial interface, or a network interface. Taking the CAN interface as an example, after the application software in the embedded software is started, the application software is the current application software, and controls the current application software to initialize the communication driver of the CAN interface.
S402, the application software is controlled to receive the upgrade installation package of the application software through the corresponding communication interface, and the application software is controlled to store the upgrade installation package into a preset storage device of the electronic equipment.
In this embodiment, the specific implementation process of S402 may refer to the description related to the embodiment shown in fig. 2, and is not described herein again.
And S403, controlling the application software to store configuration information in a preset storage device, wherein the configuration information is used for indicating that the application software needs to be upgraded.
In this embodiment, the preset storage device is, for example, Flash. After the application software stores the upgrade installation package in Flash, configuration information for indicating that the application software needs to be upgraded is also stored in Flash.
And S404, after the boot loader of the electronic equipment is controlled to be started, controlling the boot loader to acquire the configuration information from the preset storage device.
In this embodiment, after the application software stores the upgrade installation package and the configuration information for indicating that the application software needs to be upgraded in Flash, the boot loader is automatically started by skipping. After a boot loader of the electronic equipment is controlled to be started, the boot loader acquires configuration information from Flash. The configuration information is the configuration information stored in the Flash by the application software, and the configuration information indicates that the application software needs to be upgraded.
Optionally, after the electronic device is powered on, the boot loader is automatically started, and after the boot loader is started, the boot loader acquires the configuration information from the preset storage device.
And S405, if the configuration information is acquired, controlling the boot loader to acquire the upgrade installation package of the application software from the preset storage device.
In this embodiment, after the boot loader acquires the configuration information from the Flash, the configuration information is analyzed, and it is determined that the application software needs to be upgraded. Therefore, the boot loader acquires the upgrade installation package of the application software from the Flash, wherein the upgrade installation package of the application software is the upgrade installation package of the application software stored in the Flash by the current application software.
And S406, controlling the boot loader to upgrade the application software according to the upgrade installation package of the application software.
In this embodiment, the specific implementation process of S406 may refer to the description related to the embodiment shown in fig. 2, and is not described herein again.
And S407, controlling the boot loader to delete the configuration information from the preset storage device.
In this embodiment, the boot loader deletes the configuration information from Flash after upgrading the application software.
And S408, controlling the boot loader to start the application software if the configuration information is not acquired.
In this embodiment, if the boot loader does not acquire the configuration information from the Flash, it is determined that the application software does not need to be upgraded, and therefore, the boot loader starts the application software.
In the method for upgrading embedded software provided by this embodiment, after application software in the embedded software is started, the application software is controlled to receive an upgrade installation package of the application software through a corresponding communication interface, store the upgrade installation package in a preset storage device of the electronic device, and store configuration information indicating that the application software needs to be upgraded in the preset storage device of the electronic device; after a boot loader of the electronic equipment is controlled to be started, the boot loader is controlled to acquire configuration information from a preset storage device, if the configuration information is acquired, the boot loader is controlled to acquire an upgrade installation package of the application software from the preset storage device, and the upgrade of the application software is completed according to the upgrade installation package. In the embodiment, the bootloader acquires the upgrade installation package of the application software by indicating the configuration information of the application software to be upgraded so as to complete the upgrade of the application software, and does not need to receive data through a communication interface (such as a CAN interface, a serial interface or a network interface), so that the bootloader has stronger universality and robustness when upgrading the embedded software, the complexity of the bootloader is reduced, and the reliability of the bootloader is improved.
Based on the embodiment shown in fig. 4, in some embodiments, fig. 5 is a flowchart illustrating a process of sending an upgrade installation package to application software by an upper computer according to an embodiment of the present application. As shown in fig. 5, the method of this embodiment may include:
s501, the upgrade installation package of the application software is split into N packages.
In this embodiment, if N is 10, for example, the upgrade installation package of the application software is split into 10 packages, and the number of each package is an integer from 1 to 10 in turn, for example, the number of the first package is 1, the number of the second package is 2, and so on, and the number of the last package is 10. The size of each packet is, for example, 1024 bytes.
S502, acquiring a Cyclic Redundancy Check (CRC) code of the ith packet.
In this embodiment, i is an integer greater than or equal to 1 and less than or equal to N, and is used to represent each package of N packages corresponding to the upgrade installation package of the application software. Obtaining the corresponding CRC code according to the content of the ith packet belongs to the prior art, and is not described herein again.
S503, forming a handshake frame according to the number i of the ith packet, the size of the ith packet and the CRC code of the ith packet, sending the handshake frame to the current application software, and waiting for an Acknowledgement (ACK) frame of the handshake frame by the current application software.
In this embodiment, the handshake frame is used to request the application software whether to start transmitting the packet, and inform the application software of information such as the number, length, CRC code, etc. of the packet. After the number i of the ith packet, the size of the ith packet, and the CRC code of the ith packet are obtained, a handshake frame is formed according to the number i of the ith packet, the size of the ith packet, and the CRC code of the ith packet. After composing the handshake frame, the handshake frame is sent to the current application software, for example: and the upper computer sends the handshake frame to the current application software through the CAN interface and then waits for the ACK frame of the handshake frame by the current application software. The ACK frame comprises an error code which indicates the state of the current application software, the upper computer can send an ith packet to the application software only when the error code is 0, and other values indicate errors which are caused by abnormal occurrence.
S504, whether the ACK frame of the handshake frame is overtime or wrong is judged.
In this embodiment, the timeout time is, for example, 3 seconds.
And S505, sending the ith packet to the current application software according to the byte stream sequence, and waiting for an ACK frame of the sent packet by the current application software after the sending is finished.
S506, judging whether the ACK frame of the sent packet is overtime or wrong.
In this embodiment, the timeout time is, for example, 3 seconds.
And S507, judging whether i is equal to N.
In this embodiment, if i is not equal to N, it indicates that all the N packets have not been sent, and at this time, it is necessary to continue sending the (i + 1) th packet to the current application software, and S502-S507 are repeatedly executed. If i is equal to N, it indicates that N packages have been completely sent, that is, the upgrade installation package of the application software is sent to the current application software, and S508 is executed.
And S508, finishing the whole sending process.
S509, judging whether the retransmission times of the ith packet is less than the preset times.
In this embodiment, the preset number of times is, for example, 3 times. If the ACK frame of the handshake frame is overtime or erroneous, or if the ACK frame of the transmitted packet is overtime or erroneous, it is necessary to determine whether the retransmission frequency of the ith packet is less than 3 times, and if so, S502-S507 are repeatedly executed; if not, go to S508.
In this embodiment, the upper computer sends the upgrade installation package to the application software in a sub-package manner, and when sending each package, through the ACK frame of the handshake frame and the ACK frame of the sent package, the correctness and the security of each sent package are guaranteed, and further the correctness and the security of the sent upgrade installation package are guaranteed.
Based on the embodiment shown in fig. 5, in some embodiments, fig. 6 is a flowchart illustrating a process of receiving, by application software, an upgrade installation package sent by an upper computer according to an embodiment of the present application. As shown in fig. 6, the method of this embodiment may include:
s601, receiving a handshake frame of the ith packet sent by the upper computer.
In this embodiment, the handshake frame is used for the upper computer to request the application software whether to start transmitting the packet, and simultaneously inform the application software of information such as the number, the length, the CRC code, and the like of the packet. After receiving a handshake frame of an ith packet sent by an upper computer, current application software stores information in the handshake frame, including information such as the number, length and CRC (cyclic redundancy check) code of the ith packet.
S602, judging whether the handshake frame is correct.
In this embodiment, for example: and judging whether the handshake frame is correct or not by judging whether the number of the ith packet in the handshake frame is legal or not.
S603, the handshake frame information is stored, an ACK frame of the handshake frame is sent to the upper computer, and an error code in the ACK frame is 0.
In this embodiment, the error code in the ACK frame is correct when it is 0, that is: the upper computer can request the application software to transmit the ith packet, and other values indicate errors and are caused by abnormal occurrence.
S604, receiving the byte stream corresponding to the ith packet.
In this embodiment, the upper computer sends the ith packet to the current application software according to the order of the byte stream, for example, the order of the byte stream is 8 bits sent at a time. So that the corresponding byte stream of the ith packet needs to be received.
S605, judging whether the ith packet is received or not.
In this embodiment, whether the ith packet has been received is determined according to the content length of the received ith packet and the length of the ith packet in the handshake frame, and if the content length of the received ith packet is smaller than the length of the ith packet in the handshake frame, S604-S605 are continuously executed until the ith packet is completely received.
S606, obtaining the CRC code of the ith packet.
In this embodiment, the CRC code of the ith packet is acquired in the same manner as in S502.
S607, whether the CRC code is correct is judged.
In this embodiment, if the CRC code obtained in S606 is the same as the CRC code of the ith packet in the handshake frame, the content of the ith packet is stored in Flash, and an ACK frame is sent to the upper computer, where an error code in the ACK frame is 0.
And S608, judging whether i is equal to N.
In this embodiment, if i is not equal to N, it indicates that all the N packets have not been received, at this time, the i +1 th packet needs to be continuously received, and S601-S607 are repeatedly executed. If i is equal to N, it indicates that N packages have been completely received, i.e., the upgrade installation package of the application software has been completely received, and the process continues to S609.
And S609, ending the whole receiving process.
S610, sending an ACK frame to the upper computer, wherein an error code in the ACK frame is 1.
In this embodiment, when the handshake frame or the CRC code is in error, an ACK frame is sent to the upper computer, and an error code in the ACK frame is 1. Execution continues with S601.
In this embodiment, the application software receives each package split from the upgrade installation package sent by the upper computer, and when receiving each package, checks the handshake frame and the CRC code of each package, so as to ensure the correctness and the security of each received package, and further ensure the correctness and the security of the received upgrade installation package.
Fig. 7 is a schematic structural diagram of an embedded software upgrading apparatus according to an embodiment of the present application, and as shown in fig. 7, an embedded software upgrading apparatus 700 according to the embodiment includes: the device comprises a receiving module 701, a storage module 702, an acquisition module 703 and a processing module 704.
The receiving module 701 is configured to control the application software to receive the upgrade installation package of the application software through the corresponding communication interface after the application software in the embedded software is started.
The storage module 702 is configured to control the application software to store the upgrade installation package in a preset storage device of the electronic device.
The obtaining module 703 is configured to control the bootloader to obtain the upgrade installation package of the application software from the preset storage device after the bootloader of the electronic device is started.
And the processing module 704 is configured to control the boot loader to upgrade the application software according to the upgrade installation package of the application software.
On the basis of any of the above illustrated embodiments, the storage module 702 is further configured to:
and controlling the application software to store configuration information in a preset storage device, wherein the configuration information is used for indicating that the application software needs to be upgraded.
The obtaining module 703 is specifically configured to:
controlling a boot loader to acquire configuration information from a preset storage device;
and if the configuration information is acquired, controlling the boot loader to acquire the upgrade installation package of the application software from the preset storage device.
On the basis of any of the above illustrated embodiments, the processing module 704 is further configured to:
and controlling the boot loader to delete the configuration information from the preset storage device.
On the basis of any of the above illustrated embodiments, the obtaining module 703 is further configured to:
and if the configuration information is not acquired, controlling the boot loader to start the application software.
On the basis of any of the illustrated embodiments, the receiving module 701 is further configured to:
the control application software initializes the drivers of the corresponding communication interfaces.
On the basis of any of the above-described illustrated embodiments, the corresponding communication interface is a CAN interface, or a serial interface, or a network interface.
The apparatus of this embodiment may be configured to implement the technical solution of any one of the above-mentioned method embodiments, and the implementation principle and the technical effect are similar, which are not described herein again.
Fig. 8 is a schematic structural diagram of an embedded software upgrading apparatus according to another embodiment of the present application, and as shown in fig. 8, an embedded software upgrading apparatus 800 according to this embodiment includes: a memory 801 and a processor 802. The memory 801 and the processor 802 are connected by a bus.
The memory 801 is used to store program instructions.
The processor 802 is configured to invoke the execution of program instructions in memory:
after application software in the embedded software is started, controlling the application software to receive an upgrade installation package of the application software through a corresponding communication interface; controlling the application software to store the upgrade installation package into a preset storage device of the electronic equipment; after a boot loader of the electronic equipment is controlled to be started, the boot loader is controlled to acquire an upgrade installation package of the application software from a preset storage device; and controlling the boot loader to upgrade the application software according to the upgrade installation package of the application software.
On the basis of any of the illustrated embodiments, the processor 802 is further configured to:
and controlling the application software to store configuration information in a preset storage device, wherein the configuration information is used for indicating that the application software needs to be upgraded.
The processor 802 is specifically configured to:
and controlling the boot loader to acquire the configuration information from the preset storage device.
And if the configuration information is acquired, controlling the boot loader to acquire the upgrade installation package of the application software from the preset storage device.
On the basis of any of the illustrated embodiments, the processor 802 is further configured to:
and controlling the boot loader to delete the configuration information from the preset storage device.
On the basis of any of the illustrated embodiments described above, the processor 802 is further configured to:
and if the configuration information is not acquired, controlling the boot loader to start the application software.
On the basis of any of the illustrated embodiments, the processor 802 is further configured to:
the control application software initializes the drivers of the corresponding communication interfaces.
On the basis of any of the above-described illustrated embodiments, the corresponding communication interface is a CAN interface, or a serial interface, or a network interface.
The apparatus of this embodiment may be configured to implement the technical solution of any one of the above-mentioned method embodiments, and the implementation principle and the technical effect are similar, which are not described herein again.
The present application also provides a computer program product comprising a computer program which, when executed by a processor, implements the solution of the embedded software upgrade method as above.
The application also provides a computer readable storage medium, in which computer execution instructions are stored, and when the processor executes the computer execution instructions, the scheme of the above embedded software upgrading method is implemented.
The computer-readable storage medium may be implemented by any type of volatile or non-volatile memory device or combination thereof, such as Static Random Access Memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic or optical disk. Readable storage media can be any available media that can be accessed by a general purpose or special purpose computer.
An exemplary readable storage medium is coupled to the processor such the processor can read information from, and write information to, the readable storage medium. Of course, the readable storage medium may also be an integral part of the processor. The processor and the readable storage medium may reside in an Application Specific Integrated Circuits (ASIC). Of course, the processor and the readable storage medium may also reside as discrete components in the embedded software upgrade apparatus.
Those of ordinary skill in the art will understand that: all or a portion of the steps of implementing the above-described method embodiments may be performed by hardware associated with program instructions. The program may be stored in a computer-readable storage medium. When executed, the program performs steps comprising the method embodiments described above; and the aforementioned storage medium includes: various media that can store program codes, such as ROM, RAM, magnetic or optical disks.
Finally, it should be noted that: the above embodiments are only used for illustrating the technical solutions of the present application, and not for limiting the same; although the present application has been described in detail with reference to the foregoing embodiments, it should 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 or all of the 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 application.

Claims (10)

1. An embedded software upgrading method is applied to electronic equipment, and the method comprises the following steps:
after application software in embedded software is started, controlling the application software to receive an upgrade installation package of the application software through a corresponding communication interface, and controlling the application software to store the upgrade installation package into a preset storage device of the electronic equipment;
after controlling a boot loader of the electronic equipment to be started, controlling the boot loader to acquire an upgrade installation package of the application software from the preset storage device;
and controlling the boot loader to upgrade the application software according to the upgrade installation package of the application software.
2. The method of claim 1, wherein after controlling the application software to store the upgrade installation package in a preset storage device of the electronic device, the method further comprises:
controlling the application software to store configuration information in the preset storage device, wherein the configuration information is used for indicating that the application software needs to be upgraded;
the controlling the boot loader to obtain the upgrade installation package of the application software from the preset storage device includes:
controlling the boot loader to acquire the configuration information from the preset storage device;
and if the configuration information is acquired, controlling the boot loader to acquire the upgrade installation package of the application software from the preset storage device.
3. The method according to claim 2, wherein after controlling the bootloader to upgrade the application software according to the upgrade installation package of the application software, the method further comprises:
and controlling the boot loader to delete the configuration information from the preset storage device.
4. The method of claim 2, further comprising:
and if the configuration information is not acquired, controlling the boot loader to start the application software.
5. The method of claim 1, wherein before the controlling the application software to receive the upgrade installation package of the application software through the corresponding communication interface, the method further comprises:
and controlling the application software to initialize the driver of the corresponding communication interface.
6. The method according to any of claims 1-5, wherein the respective communication interface is a controller area network, CAN, interface or a serial interface or a network interface.
7. An embedded software upgrading device, which is applied to electronic equipment, the device comprising:
the receiving module is used for controlling the application software to receive the upgrade installation package of the application software through a corresponding communication interface after the application software in the embedded software is started;
the storage module is used for controlling the application software to store the upgrade installation package into a preset storage device of the electronic equipment;
the acquisition module is used for controlling a boot loader of the electronic equipment to acquire an upgrade installation package of the application software from the preset storage device after the boot loader is controlled to be started;
and the processing module is used for controlling the boot loader to upgrade the application software according to the upgrade installation package of the application software.
8. An embedded software upgrade apparatus, comprising: a memory and a processor;
the memory is to store program instructions;
the processor is configured to invoke program instructions in the memory to perform the embedded software upgrade method according to any one of claims 1-6.
9. A computer-readable storage medium having computer program instructions stored therein which, when executed, implement the embedded software upgrade method of any one of claims 1 to 6.
10. A computer program product comprising a computer program, characterized in that the computer program, when executed by a processor, implements the embedded software upgrade method of any one of claims 1-6.
CN202110022955.7A 2021-01-08 2021-01-08 Embedded software upgrading method and device Pending CN112882731A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110022955.7A CN112882731A (en) 2021-01-08 2021-01-08 Embedded software upgrading method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110022955.7A CN112882731A (en) 2021-01-08 2021-01-08 Embedded software upgrading method and device

Publications (1)

Publication Number Publication Date
CN112882731A true CN112882731A (en) 2021-06-01

Family

ID=76047173

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110022955.7A Pending CN112882731A (en) 2021-01-08 2021-01-08 Embedded software upgrading method and device

Country Status (1)

Country Link
CN (1) CN112882731A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114125902A (en) * 2021-11-30 2022-03-01 上海移远通信技术股份有限公司 WWAN equipment and configuration method, device and storage medium thereof

Citations (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1928820A (en) * 2006-09-30 2007-03-14 四川长虹电器股份有限公司 Embedded system and its upgrading method
CN101807155A (en) * 2010-03-03 2010-08-18 京信通信系统(中国)有限公司 Embedded software on-line updating method
CN101826027A (en) * 2010-05-28 2010-09-08 深圳市融创天下科技发展有限公司 Embedded system and updating method thereof
CN102195817A (en) * 2011-05-25 2011-09-21 上海华为技术有限公司 Software upgrading method and device and software rollback method and device
CN103823700A (en) * 2014-02-28 2014-05-28 北京数码大方科技股份有限公司 Method and device for upgrading application software of client
CN106257417A (en) * 2015-06-17 2016-12-28 中兴通讯股份有限公司 Bootstrap upgrade method, embedded device, control equipment and embedded system
CN106502713A (en) * 2015-09-08 2017-03-15 中兴通讯股份有限公司 A kind of method for upgrading software and system
CN107179909A (en) * 2017-05-16 2017-09-19 广东美的暖通设备有限公司 Method for upgrading software, device and computer-readable recording medium
CN110134415A (en) * 2019-04-12 2019-08-16 深圳市致宸信息科技有限公司 A kind of controller and its method for upgrading software and device
CN110209419A (en) * 2019-05-17 2019-09-06 湖北三江航天万峰科技发展有限公司 A kind of CAN bus based DSP embedded device updating method and device
CN111095200A (en) * 2018-08-23 2020-05-01 深圳市汇顶科技股份有限公司 Method, device and equipment for safely upgrading embedded program and storage medium
CN111796848A (en) * 2020-07-08 2020-10-20 中国第一汽车股份有限公司 Bootloader software updating method and device, embedded controller and storage medium

Patent Citations (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1928820A (en) * 2006-09-30 2007-03-14 四川长虹电器股份有限公司 Embedded system and its upgrading method
CN101807155A (en) * 2010-03-03 2010-08-18 京信通信系统(中国)有限公司 Embedded software on-line updating method
CN101826027A (en) * 2010-05-28 2010-09-08 深圳市融创天下科技发展有限公司 Embedded system and updating method thereof
CN102195817A (en) * 2011-05-25 2011-09-21 上海华为技术有限公司 Software upgrading method and device and software rollback method and device
CN103823700A (en) * 2014-02-28 2014-05-28 北京数码大方科技股份有限公司 Method and device for upgrading application software of client
CN106257417A (en) * 2015-06-17 2016-12-28 中兴通讯股份有限公司 Bootstrap upgrade method, embedded device, control equipment and embedded system
CN106502713A (en) * 2015-09-08 2017-03-15 中兴通讯股份有限公司 A kind of method for upgrading software and system
CN107179909A (en) * 2017-05-16 2017-09-19 广东美的暖通设备有限公司 Method for upgrading software, device and computer-readable recording medium
CN111095200A (en) * 2018-08-23 2020-05-01 深圳市汇顶科技股份有限公司 Method, device and equipment for safely upgrading embedded program and storage medium
CN110134415A (en) * 2019-04-12 2019-08-16 深圳市致宸信息科技有限公司 A kind of controller and its method for upgrading software and device
CN110209419A (en) * 2019-05-17 2019-09-06 湖北三江航天万峰科技发展有限公司 A kind of CAN bus based DSP embedded device updating method and device
CN111796848A (en) * 2020-07-08 2020-10-20 中国第一汽车股份有限公司 Bootloader software updating method and device, embedded controller and storage medium

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114125902A (en) * 2021-11-30 2022-03-01 上海移远通信技术股份有限公司 WWAN equipment and configuration method, device and storage medium thereof
CN114125902B (en) * 2021-11-30 2024-09-20 上海移远通信技术股份有限公司 WWAN (wireless network access network) equipment, configuration method, device and storage medium thereof

Similar Documents

Publication Publication Date Title
CN107976986B (en) Method for programming an electronic control module of a vehicle
CN111897585B (en) Linux-based multi-hardware adaptation method
CN106843942B (en) Wearable device and firmware upgrading method thereof
US20220156057A1 (en) In-vehicle update device, update processing program, and program update method
JP2023090981A (en) Gateway device, on-vehicle network system and firmware update method
CN108170457A (en) Firmware upgrade method, device and VR head-mounted displays
CN111190629B (en) Embedded terminal upgrading software package and analysis method thereof
CN112882731A (en) Embedded software upgrading method and device
CN110597570A (en) Communication mode adaptation method and related device
US20060104371A1 (en) Method for transmitting data on a bus
CN106227571A (en) Method for upgrading system and mobile terminal thereof
CN105045671A (en) Method and device for upgrading systems of intelligent terminals
CN111541562B (en) Network driver layer-based airborne equipment firmware upgrading method and system
CN116466986B (en) Equipment software upgrading method and device of energy storage system, communication module and medium
CN114756270B (en) Automatic driving system firmware upgrading method and automatic driving system
CN105791514B (en) Application starting monitoring method and device
JP6935694B2 (en) Electronic control device
US20090210613A1 (en) Method for Programming a Controller in a Motor Vehicle
CN116069372A (en) Controller, software upgrading method and device thereof, readable storage medium and electric appliance
US11429375B2 (en) Method for exchanging a first executable program code and a second executable program code, and a control unit
CN109358981B (en) Memory read error correction method, system, computer device, and storage medium
EP4109238A1 (en) Information processing device, program update system, and program update method
CN110837390B (en) Zynq platform remote upgrading method
CN117076208A (en) Data processing method, device and equipment
CN113595771B (en) Method, device and storage medium for updating data based on MBIM interface

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