Embedded software online upgrading method and related equipment
In the ARM+DSP heterogeneous multi-core SoC architecture, CPU0 is used to parse the upgrade command and determine the application type, and directly or forward the upgrade command, which solves the problem of online upgrade of embedded software under the heterogeneous multi-core architecture and achieves efficient and reliable upgrades. process.
Patent Information
- Application Number
- CN202410562055.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-05-08
- Publication Date
- 2024-09-03
AI Technical Summary
Existing online upgrade methods for embedded software mainly target DSP, ARM or homogeneous SoC architectures, and lack effective solutions for ARM+DSP heterogeneous multi-core SoC architectures, making online upgrades difficult and workload heavy.
Provide an online upgrade method for embedded software. It receives the upgrade command through the CPU0 of the ARM chip, parses the configuration information, determines whether the application to be upgraded is an ARM or DSP application, and performs the corresponding upgrade operation based on it. If it is an ARM application, Upgrade directly. If it is a DSP application, the command is forwarded to the DSP chip for upgrade. During the upgrade process, the backup partition and target partition are used for data migration to ensure reliability.
It realizes online upgrade of embedded software in heterogeneous multi-core processors including ARM chips and DSP chips, improves the reliability and efficiency of the upgrade, and solves the problem of online upgrade under heterogeneous multi-core architecture.
Smart Images

Figure CN118585216A
Abstract
Description
Technical Field
[0001] The present application relates to the field of embedded technology, and in particular to an embedded software online upgrade method and related equipment. Background Art
[0002] A large number of embedded electronic products face the problem of difficult disassembly and heavy workload after delivery, so online upgrade function is indispensable. Most of the existing upgrades are for DSP, ARM or homogeneous SoC architecture, and rarely involve how to upgrade embedded software online for ARM+DSP heterogeneous multi-core SoC architecture. Summary of the invention
[0003] In order to solve the above technical problems, the present application provides an embedded software online upgrade method and related equipment.
[0004] In a first aspect, an embodiment of the present application provides an embedded software online upgrade method, wherein the embedded software online upgrade method is applied to a heterogeneous multi-core processor including an ARM chip and a DSP chip, wherein the ARM chip includes a CPU 0 ~CPU N , the embedded software online upgrade method comprises:
[0005] CPU 0 Receive and parse the upgrade command sent by the host computer to obtain the upgrade configuration information, which includes the name of the application to be upgraded and the upgrade data source address;
[0006] CPU 0 Determine whether the application to be upgraded is an ARM application or a DSP application according to the name of the application to be upgraded;
[0007] If the application to be upgraded is an ARM application, the CPU 0 Acquire upgrade data based on the upgrade data source address and upgrade the application to be upgraded;
[0008] If the application to be upgraded is a DSP application, the CPU 0 The upgrade command is forwarded to the DSP chip, so that the DSP chip upgrades the application to be upgraded based on the upgrade command.
[0009] In combination with the first aspect, in one implementation, if the application to be upgraded is an ARM application, the CPU 0 The steps of acquiring upgrade data based on the upgrade data source address and upgrading the application to be upgraded include:
[0010] If the application to be upgraded is an ARM application and not a CPU 0 application, the CPU 0The upgrade data is acquired based on the upgrade data source address and the application to be upgraded is upgraded.
[0011] In combination with the first aspect, in one implementation, if the application to be upgraded is an ARM application, the CPU 0 The step of acquiring upgrade data based on the upgrade data source address and upgrading the application to be upgraded also includes:
[0012] If the application to be upgraded is an ARM application and the CPU 0 application, the CPU 0 Reading a power-on startup position from a backup partition, and determining a target partition based on the power-on startup position, wherein the power-on startup position corresponds to another partition;
[0013] CPU 0 After erasing the data in the target partition, writing the upgrade data obtained based on the upgrade data source address into the target partition;
[0014] After the upgrade data is written to the target partition, the CPU 0 The power-on startup position recorded in the backup partition is modified to the position corresponding to the target partition, and after erasing the data in another partition, the upgrade data obtained based on the upgrade data source address is written into the other partition.
[0015] In combination with the first aspect, in one implementation, the embedded software online upgrade method further includes:
[0016] If writing the upgrade data to the target partition fails or if writing the upgrade data to the other partition fails, the CPU 0 The power-on startup position is read from the backup partition, and restart is performed based on the data in the partition corresponding to the power-on startup position.
[0017] In combination with the first aspect, in one implementation, in the CPU 0 After receiving and parsing the upgrade command sent by the host computer to obtain the upgrade configuration information, the following steps are also included:
[0018] CPU 0 Check whether the upgrade command is valid based on the name of the application to be upgraded;
[0019] If the upgrade command is valid, the CPU 0 Shield messages with a lower priority than online upgrade.
[0020] In the second aspect, the embodiment of the present application provides a heterogeneous multi-core processor, including an ARM chip and a DSP chip, the ARM chip includes a CPU 0 ~CPU N , CPU 0, used for:
[0021] Receive and parse the upgrade command sent by the host computer to obtain the upgrade configuration information, which includes the name of the application to be upgraded and the upgrade data source address;
[0022] Determine whether the application to be upgraded is an ARM application or a DSP application according to the name of the application to be upgraded;
[0023] If the application to be upgraded is an ARM application, acquiring upgrade data based on the upgrade data source address and upgrading the application to be upgraded;
[0024] If the application to be upgraded is a DSP application, the upgrade command is forwarded to the DSP chip, so that the DSP chip upgrades the application to be upgraded based on the upgrade command.
[0025] In conjunction with the second aspect, in one implementation, the CPU 0 , used for:
[0026] If the application to be upgraded is an ARM application and the CPU 0 an application, reads the power-on startup position from the backup partition, and determines the target partition based on the power-on startup position, wherein the power-on startup position corresponds to another partition;
[0027] After erasing the data in the target partition, writing the upgrade data obtained based on the upgrade data source address into the target partition;
[0028] After the upgrade data is written into the target partition, the power-on startup position recorded in the backup partition is modified to the position corresponding to the target partition, and after erasing the data in another partition, the upgrade data obtained based on the upgrade data source address is written into another partition.
[0029] In conjunction with the second aspect, in one implementation, the CPU 0 , also used for:
[0030] If writing the upgrade data to the target partition fails or if writing the upgrade data to the other partition fails, the power-on startup position is read from the backup partition, and restart is performed based on the data in the partition corresponding to the power-on startup position.
[0031] In a third aspect, an embodiment of the present application provides an embedded device, the embedded device comprising a heterogeneous multi-core processor, a memory, and an embedded software online upgrade program stored in the memory and executable by the heterogeneous multi-core processor, wherein the heterogeneous multi-core processor comprises an ARM chip and a DSP chip, the ARM chip comprises a CPU 0 ~CPU NWhen the embedded software online upgrade program is executed by the heterogeneous multi-core processor, the steps of the embedded software online upgrade method as described in the first aspect are implemented.
[0032] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium, on which an embedded software online upgrade program is stored. When the embedded software online upgrade program is executed by a heterogeneous multi-core processor, the steps of the embedded software online upgrade method described in the first aspect are implemented.
[0033] The beneficial effects brought by the technical solution provided in the embodiments of the present application include:
[0034] In the embodiment of the present application, CPU 0 Receive the upgrade command sent by the host computer and parse it to obtain the upgrade configuration information, which includes the name of the application to be upgraded and the address of the upgrade data source; CPU 0 Determine whether the application to be upgraded is an ARM application or a DSP application according to the name of the application to be upgraded; if the application to be upgraded is an ARM application, the CPU 0 Based on the upgrade data source address, the upgrade data is acquired and the application to be upgraded is upgraded; if the application to be upgraded is a DSP application, the CPU 0 The upgrade command is forwarded to the DSP chip, so that the DSP chip upgrades the application to be upgraded based on the upgrade command. Through the embodiment of the present application, online upgrade of embedded software in a heterogeneous multi-core processor including an ARM chip and a DSP chip is achieved. BRIEF DESCRIPTION OF THE DRAWINGS
[0035] Figure 1 This is a flow chart of an embodiment of an online upgrade method for embedded software of the present application;
[0036] Figure 2 This is a functional module diagram of an embodiment of a heterogeneous multi-core processor of the present application;
[0037] Figure 3 This is a schematic diagram of the hardware structure of the embedded device involved in the embodiment of the present application. DETAILED DESCRIPTION
[0038] In order to enable those skilled in the art to better understand the solution of the present application, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.
[0039] In order to make the objectives, technical solutions and advantages of the present application clearer, the implementation methods of the present application will be further described in detail below with reference to the accompanying drawings.
[0040] In a first aspect, an embodiment of the present application provides an embedded software online upgrade method. The embedded software online upgrade method is applied to a heterogeneous multi-core processor including an ARM chip and a DSP chip, wherein the ARM chip includes a CPU 0 ~CPU N .
[0041] In one embodiment, referring to Figure 1 , Figure 1 This is a flow chart of an embodiment of the embedded software online upgrade method of the present application. Figure 1 As shown, the embedded software online upgrade method includes:
[0042] Step S10, CPU 0 Receive and parse the upgrade command sent by the host computer to obtain the upgrade configuration information, which includes the name of the application to be upgraded and the upgrade data source address;
[0043] In this embodiment, the entire upgrade process only requires the CPU of the ARM chip 0 Interact with the host computer, CPU 0 After receiving the upgrade command sent by the host computer, it is parsed to obtain the upgrade configuration information including the name of the application to be upgraded and the upgrade data source address. It should be noted that the upgrade configuration information may also include other contents, which are not listed here.
[0044] Step S20, CPU 0 Determine whether the application to be upgraded is an ARM application or a DSP application according to the name of the application to be upgraded;
[0045] In this embodiment, the ARM chip includes a CPU 0 ~CPU N , DSP chip includes cpu 0 ~cpu M , CPU 0 ~CPU N The dedicated application is Application A 0 ~Application A N ;cpu 0 ~cpu M The dedicated application is Application D 0 ~Application D M Among them, application A 0 ~Application A N ARM Applications; Application D 0~Application D M Belongs to DSP applications. Different application names can be set for each application in advance, and the CPU 0 The application to be upgraded can be determined according to the name of the application to be upgraded obtained through the analysis, thereby further determining whether the application to be upgraded is an ARM application or a DSP application.
[0046] Furthermore, in one embodiment, after step S10, the method further includes:
[0047] CPU 0 Check whether the upgrade command is valid based on the name of the application to be upgraded;
[0048] If the upgrade command is valid, the CPU 0 Shield messages with a lower priority than online upgrade.
[0049] In this embodiment, a whitelist of application names is preset, and the CPU 0 Check whether the name of the application to be upgraded is in the application name whitelist. If so, determine that the upgrade command is valid, and shield messages with a lower priority than the online upgrade to avoid interruption of the online upgrade process. On this basis, execute step S20. The application names included in the application name whitelist are set according to actual needs.
[0050] Step S30: If the application to be upgraded is an ARM application, the CPU 0 Acquire upgrade data based on the upgrade data source address and upgrade the application to be upgraded;
[0051] In this embodiment, when the application to be upgraded is an ARM application, it is processed according to two situations:
[0052] Case 1: If the application to be upgraded is an ARM application and not a CPU 0 application.
[0053] Case 2: If the application to be upgraded is an ARM application and the CPU 0 application.
[0054] For both cases, the CPU 0 According to the corresponding strategy and based on the upgrade data source address, the upgrade data is obtained and the application to be upgraded is upgraded.
[0055] Furthermore, in one embodiment, step S30 includes:
[0056] If the application to be upgraded is an ARM application and not a CPU 0 application, the CPU 0Acquire upgrade data based on the upgrade data source address and upgrade the application to be upgraded
[0057] In this embodiment, if the application to be upgraded is application A 1 ~Application A N If one or more of the following are true, the CPU 0 The upgrade data is directly obtained according to the upgrade data source address and the application to be upgraded is upgraded.
[0058] Furthermore, in one embodiment, step S30 further includes:
[0059] If the application to be upgraded is an ARM application and the CPU 0 application, the CPU 0 Reading a power-on startup position from a backup partition, and determining a target partition based on the power-on startup position, wherein the power-on startup position corresponds to another partition;
[0060] CPU 0 After erasing the data in the target partition, writing the upgrade data obtained based on the upgrade data source address into the target partition;
[0061] After the upgrade data is written to the target partition, the CPU 0 The power-on startup position recorded in the backup partition is modified to the position corresponding to the target partition, and after erasing the data in another partition, the upgrade data obtained based on the upgrade data source address is written into the other partition.
[0062] In this embodiment, for application A 0 , upgrade the A partition and B partition separately. 0 The power-on startup position is read from the backup partition, and the power-on startup position corresponds to the A partition, so the target partition is determined to be the B partition, so that the data in the B partition is erased and the upgrade data obtained based on the upgrade data source address is written to the B partition; after the upgrade data is successfully written to the B partition, the CPU 0 The power-on startup position recorded in the backup partition is modified to the position corresponding to the B partition, and after the data in the A partition is erased, the upgrade data obtained based on the upgrade data source address is written into the A partition.
[0063] Furthermore, in one embodiment, the embedded software online upgrade method further includes:
[0064] If writing the upgrade data to the target partition fails or if writing the upgrade data to the other partition fails, the CPU 0 The power-on startup position is read from the backup partition, and restart is performed based on the data in the partition corresponding to the power-on startup position.
[0065] In this embodiment, if the CPU0 The power-on startup position is read from the backup partition, and the power-on startup position corresponds to the A partition. When the upgrade data fails to be written to the B partition, it can be restarted based on the data in the A partition. After the upgrade data is successfully written to the B partition, if the upgrade data fails to be written to the A partition, the CPU 0 Modify the power-on startup position recorded in the backup partition to the position corresponding to the B partition, and then restart based on the data in the B partition.
[0066] For application A 0 , upgrade the A partition and B partition separately. If one partition upgrade fails, you can restart from another partition, which enhances the reliability of online upgrade.
[0067] It should be noted that for application A 1 ~Application A N If any of the upgrades fail, you can 0 Perform the upgrade again.
[0068] Step S40: If the application to be upgraded is a DSP application, the CPU 0 The upgrade command is forwarded to the DSP chip, so that the DSP chip upgrades the application to be upgraded based on the upgrade command.
[0069] In this embodiment, if the application to be upgraded is a DSP application, first the CPU 0 Send an online upgrade flag to the DSP chip, the DSP chip writes the flag into FLASH, and then the ARM chip controls the DSP chip to power on again. After the DSP chip is powered on again and initialized, the CPU 0 Forward the upgrade command to the DSP chip.
[0070] After each restart, the DSP chip first enters the application program D 0 , after entering the application D 0 After that, the upgrade flag in FALSH will be read. If the upgrade flag is set, it will stay in the application D 0 , upgrade the application to be upgraded according to the upgrade command. At this time, the application to be upgraded is application D 0 ~Application D M If the upgrade flag is not set, it will enter the application D after staying for a specified time. 1 The information exchange during the DSP application upgrade process is all done through the CPU 0 Forward to the host computer.
[0071] In the embodiment of the present application, CPU 0Receive the upgrade command sent by the host computer and parse it to obtain the upgrade configuration information, which includes the name of the application to be upgraded and the address of the upgrade data source; CPU 0 Determine whether the application to be upgraded is an ARM application or a DSP application according to the name of the application to be upgraded; if the application to be upgraded is an ARM application, the CPU 0 Based on the upgrade data source address, the upgrade data is acquired and the application to be upgraded is upgraded; if the application to be upgraded is a DSP application, the CPU 0 The upgrade command is forwarded to the DSP chip, so that the DSP chip upgrades the application to be upgraded based on the upgrade command. Through the embodiment of the present application, online upgrade of embedded software in a heterogeneous multi-core processor including an ARM chip and a DSP chip is achieved.
[0072] In a second aspect, an embodiment of the present application also provides a heterogeneous multi-core processor.
[0073] In one embodiment, referring to Figure 2 , Figure 2 This is a functional module diagram of an embodiment of a heterogeneous multi-core processor of the present application. Figure 2 As shown, the heterogeneous multi-core processor includes ARM chips and DSP chips. The ARM chip includes CPU 0 ~CPU N , CPU 0 , used for:
[0074] Receive and parse the upgrade command sent by the host computer to obtain the upgrade configuration information, which includes the name of the application to be upgraded and the upgrade data source address;
[0075] Determine whether the application to be upgraded is an ARM application or a DSP application according to the name of the application to be upgraded;
[0076] If the application to be upgraded is an ARM application, acquiring upgrade data based on the upgrade data source address and upgrading the application to be upgraded;
[0077] If the application to be upgraded is a DSP application, the upgrade command is forwarded to the DSP chip, so that the DSP chip upgrades the application to be upgraded based on the upgrade command.
[0078] Furthermore, in one embodiment, the CPU 0 , used for:
[0079] If the application to be upgraded is an ARM application and the CPU 0 an application, reads the power-on startup position from the backup partition, and determines the target partition based on the power-on startup position, wherein the power-on startup position corresponds to another partition;
[0080] After erasing the data in the target partition, writing the upgrade data obtained based on the upgrade data source address into the target partition;
[0081] After the upgrade data is written into the target partition, the power-on startup position recorded in the backup partition is modified to the position corresponding to the target partition, and after erasing the data in another partition, the upgrade data obtained based on the upgrade data source address is written into another partition.
[0082] Furthermore, in one embodiment, the CPU 0 , also used for:
[0083] If writing the upgrade data to the target partition fails or if writing the upgrade data to the other partition fails, the power-on startup position is read from the backup partition, and restart is performed based on the data in the partition corresponding to the power-on startup position.
[0084] Furthermore, in one embodiment, the CPU 0 , used for:
[0085] If the application to be upgraded is an ARM application and not a CPU 0 For an application to be upgraded, the upgrade data is obtained based on the upgrade data source address and the application to be upgraded is upgraded.
[0086] Furthermore, in one embodiment, the CPU 0 , used for:
[0087] Check whether the upgrade command is valid based on the name of the application to be upgraded;
[0088] If the upgrade command is valid, messages with a lower priority than online upgrade are blocked.
[0089] Among them, the functional implementation of each module in the above-mentioned heterogeneous multi-core processor corresponds to the steps in the above-mentioned embedded software online upgrade method embodiment, and its functions and implementation processes are no longer repeated here.
[0090] In a third aspect, an embodiment of the present application provides an embedded device.
[0091] Reference Figure 3 , Figure 3 Schematic diagram of the hardware structure of the embedded device involved in the embodiment of the present application. In the embodiment of the present application, the embedded device may include a heterogeneous multi-core processor, a memory, a communication interface and a communication bus.
[0092] The communication bus may be of any type and is used to interconnect the processor, the memory, and the communication interface.
[0093] The communication interface includes input / output (I / O) interface, physical interface and logical interface, etc., which are used to realize the interconnection of devices inside the AAAA device, and the interface used to realize the interconnection between the AAAA device and other devices (such as other computing devices or user devices). The physical interface can be an Ethernet interface, a fiber optic interface, an ATM interface, etc.; the user device can be a display (Display), a keyboard (Keyboard), etc.
[0094] The memory can be various types of storage media, such as random access memory (RAM), read-only memory (ROM), non-volatile RAM (NVRAM), flash memory, optical storage, hard disk, programmable ROM (PROM), erasable PROM (EPROM), electrically erasable PROM (EEPROM), etc.
[0095] The heterogeneous multi-core processor can call the embedded software online upgrade program stored in the memory and execute the embedded software online upgrade method provided by the embodiment of the present application. The method executed when the embedded software online upgrade program is called can refer to the various embodiments of the embedded software online upgrade method of the present application, which will not be repeated here.
[0096] Those skilled in the art will understand that Figure 3 The hardware structure shown in the figure does not constitute a limitation on the present application, and may include more or less components than shown in the figure, or combine certain components, or arrange the components differently.
[0097] In a fourth aspect, an embodiment of the present application also provides a computer-readable storage medium.
[0098] The computer-readable storage medium of the present application stores an embedded software online upgrade program, wherein when the embedded software online upgrade program is executed by a heterogeneous multi-core processor, the steps of the embedded software online upgrade method as described above are implemented.
[0099] Among them, the method implemented when the embedded software online upgrade program is executed can refer to the various embodiments of the embedded software online upgrade method of the present application, and will not be repeated here.
[0100] It should be noted that the serial numbers of the above-mentioned embodiments of the present application are only for description and do not represent the advantages or disadvantages of the embodiments.
[0101] The terms "including" and "having" and any variations thereof in the specification and claims of this application and the above-mentioned drawings are intended to cover non-exclusive inclusions. For example, a process, method, system, product or device that includes a series of steps or units is not limited to the listed steps or units, but optionally includes steps or units that are not listed, or optionally includes other steps or units inherent to these processes, methods, products or devices. The terms "first", "second" and "third" are used to distinguish different objects, etc., and do not represent a sequence, nor do they limit "first", "second" and "third" to different types.
[0102] In the description of the embodiments of the present application, "exemplary", "for example" or "for example" are used to indicate examples, illustrations or descriptions. Any embodiment or design described as "exemplary", "for example" or "for example" in the embodiments of the present application should not be interpreted as being more preferred or more advantageous than other embodiments or designs. Specifically, the use of words such as "exemplary", "for example" or "for example" is intended to present related concepts in a specific way.
[0103] In the description of the embodiments of the present application, unless otherwise specified, “ / ” means or, for example, A / B can mean A or B; the “and / or” in the text is merely a description of the association relationship of associated objects, indicating that three relationships may exist, for example, A and / or B can mean: A exists alone, A and B exist at the same time, and B exists alone. In addition, in the description of the embodiments of the present application, “multiple” refers to two or more than two.
[0104] In some processes described in the embodiments of the present application, multiple operations or steps that appear in a specific order are included, but it should be understood that these operations or steps may not be executed in the order in which they appear in the embodiments of the present application or in parallel, and the sequence number of the operation is only used to distinguish the different operations, and the sequence number itself does not represent any execution order. In addition, these processes may include more or fewer operations, and these operations or steps may be executed in sequence or in parallel, and these operations or steps may be combined.
[0105] Through the description of the above implementation methods, those skilled in the art can clearly understand that the above-mentioned embodiment methods can be implemented by means of software plus a necessary general hardware platform, and of course by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present application is essentially or the part that contributes to the prior art can be embodied in the form of a software product, which is stored in a storage medium (such as ROM / RAM, disk, CD) as described above, and includes a number of instructions for a terminal device to execute the methods described in each embodiment of the present application.
[0106] The above are only preferred embodiments of the present application, and are not intended to limit the patent scope of the present application. Any equivalent structure or equivalent process transformation made using the contents of the present application specification and drawings, or directly or indirectly applied in other related technical fields, are also included in the patent protection scope of the present application.
Claims
1. A method for online upgrading of embedded software, characterized in that: The embedded software online upgrade method is applied to a heterogeneous multi-core processor including an ARM chip and a DSP chip, wherein the ARM chip includes CPU0 to CPU N , the embedded software online upgrade method comprises: CPU0 receives and parses the upgrade command sent by the host computer to obtain the upgrade configuration information, which includes the name of the application to be upgraded and the upgrade data source address; CPU0 determines whether the application to be upgraded is an ARM application or a DSP application according to the name of the application to be upgraded; If the application to be upgraded is an ARM application, CPU0 obtains upgrade data based on the upgrade data source address and upgrades the application to be upgraded; If the application to be upgraded is a DSP application, CPU0 forwards the upgrade command to the DSP chip, so that the DSP chip upgrades the application to be upgraded based on the upgrade command.
2. The embedded software online upgrade method according to claim 1, characterized in that: If the application to be upgraded is an ARM application, the steps of CPU0 acquiring upgrade data based on the upgrade data source address and upgrading the application to be upgraded include: If the application to be upgraded is an ARM application and is not an application of CPU0, CPU0 obtains upgrade data based on the upgrade data source address and upgrades the application to be upgraded.
3. The embedded software online upgrade method according to claim 1, characterized in that: If the application to be upgraded is an ARM application, the step of CPU0 acquiring upgrade data based on the upgrade data source address and upgrading the application to be upgraded also includes: If the application to be upgraded is an ARM application and is an application of CPU0, CPU0 reads the power-on startup position from the backup partition and determines the target partition based on the power-on startup position, wherein the power-on startup position corresponds to another partition; After erasing the data in the target partition, CPU0 writes the upgrade data obtained based on the upgrade data source address into the target partition; After the upgrade data is written into the target partition, CPU0 modifies the power-on startup position recorded in the backup partition to the position corresponding to the target partition, erases the data in another partition, and writes the upgrade data obtained based on the upgrade data source address into another partition.
4. The embedded software online upgrade method according to claim 3, characterized in that: The embedded software online upgrade method also includes: If writing the upgrade data to the target partition fails or if writing the upgrade data to the other partition fails, CPU0 reads the power-on startup position from the backup partition and restarts based on the data in the partition corresponding to the power-on startup position.
5. The embedded software online upgrade method according to claim 1, characterized in that: After the CPU0 receives and parses the upgrade command sent by the host computer to obtain the upgrade configuration information, the process further includes: CPU0 detects whether the upgrade command is valid based on the name of the application to be upgraded; If the upgrade command is valid, CPU0 blocks messages with a lower priority than the online upgrade.
6. A heterogeneous multi-core processor, including an ARM chip and a DSP chip, wherein the ARM chip includes CPU0 to CPU N , characterized in that, CPU0, used for: Receive and parse the upgrade command sent by the host computer to obtain the upgrade configuration information, which includes the name of the application to be upgraded and the upgrade data source address; Determine whether the application to be upgraded is an ARM application or a DSP application according to the name of the application to be upgraded; If the application to be upgraded is an ARM application, acquiring upgrade data based on the upgrade data source address and upgrading the application to be upgraded; If the application to be upgraded is a DSP application, the upgrade command is forwarded to the DSP chip, so that the DSP chip upgrades the application to be upgraded based on the upgrade command.
7. The heterogeneous multi-core processor according to claim 6, characterized in that: CPU0, used for: If the application to be upgraded is an ARM application and is an application of CPU0, the power-on startup position is read from the backup partition, and the target partition is determined based on the power-on startup position, wherein the power-on startup position corresponds to another partition; After erasing the data in the target partition, writing the upgrade data obtained based on the upgrade data source address into the target partition; After the upgrade data is written into the target partition, the power-on startup position recorded in the backup partition is modified to the position corresponding to the target partition, and after erasing the data in another partition, the upgrade data obtained based on the upgrade data source address is written into another partition.
8. The heterogeneous multi-core processor according to claim 7, characterized in that: CPU0 is also used for: If writing the upgrade data to the target partition fails or if writing the upgrade data to the other partition fails, the power-on startup position is read from the backup partition, and restart is performed based on the data in the partition corresponding to the power-on startup position.
9. An embedded device, characterized in that: The embedded device includes a heterogeneous multi-core processor, a memory, and an embedded software online upgrade program stored in the memory and executable by the heterogeneous multi-core processor, wherein the heterogeneous multi-core processor includes an ARM chip and a DSP chip, and the ARM chip includes CPU0~CPU N When the embedded software online upgrade program is executed by the heterogeneous multi-core processor, the steps of the embedded software online upgrade method as described in any one of claims 1 to 5 are implemented.
10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores an embedded software online upgrade program, wherein when the embedded software online upgrade program is executed by a heterogeneous multi-core processor, the steps of the embedded software online upgrade method according to any one of claims 1 to 5 are implemented.
Citation Information
Cited By
Multi-software dynamic loading and upgrading method and device, equipment and storage medium
CN121523758A
Independent online upgrading method for software of multi-task integrated equipment
CN121541912A
