A method for online upgrading of application software of hierarchical processor
By adopting technologies such as address allocation, mode definition and identification, hierarchical loading and relay forwarding in the aircraft power distribution system, the problem of difficulty in upgrading multi-level processors in the existing technology is solved, and hierarchical multi-processor software is realized Online upgrade improves maintenance convenience and reliability.
Patent Information
- Application Number
- CN202111336626.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-11-12
- Publication Date
- 2024-09-13
- Estimated Expiration
- 2041-11-12
AI Technical Summary
Existing technology is difficult to implement online software upgrades for product architectures with multiple buses and hierarchical processors, and cannot meet the system maintenance needs of complex application scenarios.
Using technologies such as address allocation, pattern definition and identification, hierarchical loading, data isolation, and relay forwarding, the hierarchical multi-processor software can be upgraded online through the product's external and internal communication buses, including processor classification and unique address ID allocation. , customize universal communication protocols, upgrade pattern recognition and relay forwarding.
It improves the convenience and reliability of software upgrade, reduces product maintenance costs, and realizes online upgrade of multiple processors of the entire machine.
Smart Images

Figure CN114077443B
Abstract
Description
Technical Field
[0001] The invention discloses an online upgrading method for application software of a hierarchical processor, belonging to the field of aviation electrical technology. Background Art
[0002] With the increasing functional requirements of aviation power distribution products, the number of internal processors of aviation power distribution products is also increasing, and the complexity of the distributed structure is increasing. DSP+MCU has gradually become a mainstream architecture. With the increasing demand for aircraft system maintainability, the demand for online upgrade of embedded controller software has gradually increased. That is, during the normal operation of the product after power-on, the complete execution code of the product or module to be upgraded is transmitted through the external system bus (or maintenance bus) to complete the upgrade of all internal processor software. The online upgrade of multiple processors of the whole machine has gradually become a basic function that must be required of the product.
[0003] The existing upgrade methods in the prior art are mostly aimed at upgrading the software of a single processor, or completing the upgrade of multiple processors on a single bus, which can only cover some application scenarios and cannot upgrade the product architecture with multiple buses and hierarchical processors. Therefore, a technology that can realize online upgrade of multi-level processor application software is needed to meet the increasingly complex application scenarios and improve the convenience of system maintenance. Summary of the invention
[0004] The purpose of the present invention is to provide a hierarchical multi-level processor software online upgrade method suitable for aircraft power distribution system products in response to the above-mentioned technical problems. Compared with other methods, the design of the present invention only relies on the product's external communication bus and internal communication bus, and adopts address allocation, mode definition and identification, hierarchical loading, data isolation, and relay forwarding upgrade technology to realize the product's whole machine hierarchical multi-processor software online upgrade, improve the convenience and reliability of software upgrades, and greatly reduce product maintenance costs.
[0005] Technical solution of the present invention:
[0006] A method for online upgrading of hierarchical processor application software, the method comprising:
[0007] 1) Classify each processor inside the product and assign a unique address ID to each level of processor
[0008] The processors inside the product are graded. The first-level processor exchanges data with the product's external communication interface. The intermediate processors exchange data with the upper and lower-level processors through the internal communication interface. The lowest-level processor exchanges data with the upper-level processor through the internal communication interface.
[0009] Before the software is upgraded online, a unique address ID is assigned to each processor level in the product to distinguish each upgrade object;
[0010] 2) The host computer reads and parses the application software image file according to the processor address ID
[0011] When the software online upgrade starts, by selecting the processor address ID, the host computer parses the application software target code according to the selected processor address ID, generates the application software image file, and calculates the image check code;
[0012] 3) Customized universal online upgrade communication protocol
[0013] In order to quickly complete the data conversion between different buses, a universal online upgrade communication protocol is customized according to the serial bus and CAN bus data formats to meet the data transmission requirements of the external communication interface between the host computer and the aircraft power distribution system product, and the communication interface between the internal layers of the product;
[0014] 4) Fix the upgraded software into each processor through the burner;
[0015] 5) Upgrade the software to control the processor to enter a specific working mode
[0016] The upgrade flag and the address ID of the processor to be upgraded are written into the processor's internal upgrade flag storage area through the host computer. The upgrade software identifies the working mode according to the content of the processor's internal upgrade flag storage area, and identifies and enters the normal mode, upgrade mode or relay mode:
[0017] If the upgrade flag does not exist in the processor's internal upgrade flag storage area, the processor enters normal mode. In normal mode, the upgrade software directly jumps to the application software;
[0018] If the upgrade flag exists in the processor's internal upgrade flag storage area and the address ID of the processor to be upgraded is the processor to be upgraded itself, the processor enters the upgrade mode. In the upgrade mode, the upgrade software exchanges data with the host computer through the external communication interface, loads the processor application software image file, and completes the update and solidification of the processor application software;
[0019] If the upgrade flag exists in the processor's internal upgrade flag storage area and the address ID of the processor to be upgraded is the next-level processor, the processor enters the relay mode. In the relay mode, the upgrade software exchanges data with the previous-level processor through the internal communication interface, extracts the processor application software image file, exchanges data with the next-level processor through the internal bus, and forwards the processor application software image file to the next-level processor, thereby realizing the relay processing and forwarding functions;
[0020] 6) After the upgrade is completed, exit the upgrade command through the host computer
[0021] After the upgrade mode or relay mode is completed, the host computer sends an exit upgrade instruction to the processor, which is forwarded through the relay of the upper processor, completes the reception, erases the content in the processor's internal upgrade flag storage area, and exits the upgrade instruction;
[0022] Furthermore, the method also includes that each processor inside the product has a unique address ID, and each upgrade can only upgrade a single-level processor, which can effectively avoid interference in the upgrade process.
[0023] Furthermore, the method also includes that in the step 2), the target code of the application software includes bin and Hex file formats, the host computer implements parsing, reading and loading of the two formats of target code to form a directly writable image file, and calculates the checksum of the image file for judging the validity of the upgrade result.
[0024] Furthermore, the method also includes partitioning the processor, including an upgrade software storage area, an application software storage area, an upgrade flag, and a processor ID storage area to be upgraded, to avoid accidental erasure and miswriting of data during the loading process.
[0025] Furthermore, the method also includes, in the upgrade mode, receiving the application software image file and writing it into the application software storage area, and determining whether the writing is successful; if it is determined to be unsuccessful, re-upgrading.
[0026] Furthermore, the external communication interface between the host computer and the aircraft power distribution system product includes RS232, RS485, RS422 and CAN.
[0027] Furthermore, the internal inter-level communication interfaces of the product include RS485 and CAN.
[0028] Beneficial effects of the invention:
[0029] The present invention is applicable to an online software upgrade method for hierarchical processors of aircraft power distribution products. No additional hardware design is required. Based on the original external and internal communication interfaces of the product, multi-processor address allocation, mode definition and identification, hierarchical loading, data isolation, and relay forwarding upgrade technologies are adopted. Specifically, the online software upgrade of the entire product can be completed through the steps of upgrade mark writing, working mode identification, hierarchical upgrading, relay processing, and mode exit, thereby improving the convenience and reliability of product maintenance. BRIEF DESCRIPTION OF THE DRAWINGS
[0030] Figure 1 This is a typical product processor distribution structure diagram
[0031] Figure 2 This is a diagram of the program loading steps DETAILED DESCRIPTION
[0032] The connection structure of the present invention is described in detail below with reference to the accompanying drawings and embodiments.
[0033] like Figure 1 The figure shows a typical internal processor distribution structure diagram of a power distribution system product. The first level includes a primary processor, the second level includes a secondary processor, and the third level includes several tertiary processors. The external bus is RS422, and the internal bus includes CAN bus and RS485 bus. Taking the structure shown in this figure as an example, the specific implementation method of the layered multi-processor software online upgrade method is described by upgrading the secondary processor software.
[0034] like Figure 2 As shown, a specific embodiment of grading each processor inside the product is to set the primary processor ID to 0x01, the secondary processor ID to 0x11, and the tertiary processor ID to 0x41-0xFF;
[0035] The host computer selects the secondary processor ID and the secondary processor application software Hex image file, and the host computer completes the image file parsing;
[0036] Customize the R422 bus to CAN bus communication protocol;
[0037] Burn upgrade programs for primary, secondary and tertiary processors through the burner;
[0038] The upgrade flag and the secondary processor address ID are written into the upgrade flag storage area inside the primary processor and the secondary processor through the external RS422 bus by the host computer;
[0039] All processors are powered on again, and the primary processor enters the relay mode. It receives the secondary processor application software image data sent by the host computer through RS422, converts it to the CAN bus through the communication protocol and sends it to the secondary processor. At the same time, the secondary processor upgrade information is reported to the host computer.
[0040] The secondary processor enters the upgrade mode, receives the upgrade image data through the CAN bus, loads the secondary processor application software image file, and completes the update and solidification of the application software;
[0041] The third-level processor enters normal mode and does not participate in the upgrade process;
[0042] After the secondary processor upgrade is completed, the host computer sends the primary processor and the secondary processor exit upgrade instructions. The primary processor erases the contents of the internal upgrade flag storage area and exits the relay mode. The secondary processor erases the contents of the internal upgrade flag storage area and exits the upgrade mode. This method can complete the online upgrade of all processor software inside the product.
[0043] Compared with the traditional method, the present invention adopts hierarchical address allocation, universal online upgrade communication protocol, working mode division, relay processing, and data transmission isolation technology to realize the online upgrade of multiple processors of the whole machine, thereby improving the convenience and reliability of product maintenance.
Claims
1. A method for online upgrading of hierarchical processor application software, the method comprising: 1) Classify each processor inside the product and assign a unique address ID to each level of processor: The first-level processor exchanges data with the product's external communication interface, the intermediate processors exchange data with the upper and lower-level processors through the internal communication interface, and the lowest-level processor exchanges data with the upper-level processor through the internal communication interface; Before the software is upgraded online, a unique address ID is assigned to each processor level in the product to distinguish each upgrade object; 2) The host computer reads and parses the application software image file according to the processor address ID: When the software online upgrade starts, by selecting the processor address ID, the host computer parses the application software target code according to the selected processor address ID, generates the application software image file, and calculates the image check code; 3) Customized universal online upgrade communication protocol: In order to quickly complete the data conversion between different buses, a universal online upgrade communication protocol is customized according to the serial bus and CAN bus data formats to meet the data transmission requirements of the external communication interface between the host computer and the aircraft power distribution system product, and the communication interface between the internal layers of the product; 4) Fix the upgraded software into each processor through the burner; 5) Upgrade the software to control the processor to enter a specific working mode: The upgrade flag and the address ID of the processor to be upgraded are written into the processor's internal upgrade flag storage area through the host computer. The upgrade software identifies the working mode according to the content of the processor's internal upgrade flag storage area, and identifies and enters the normal mode, upgrade mode or relay mode: If the upgrade flag does not exist in the processor's internal upgrade flag storage area, the processor enters normal mode. In normal mode, the upgrade software directly jumps to the application software; If the upgrade flag exists in the processor's internal upgrade flag storage area and the address ID of the processor to be upgraded is the processor to be upgraded itself, the processor enters the upgrade mode. In the upgrade mode, the upgrade software exchanges data with the host computer through the external communication interface, loads the processor application software image file, and completes the update and solidification of the processor application software; If the upgrade flag exists in the processor's internal upgrade flag storage area and the address ID of the processor to be upgraded is the next-level processor, the processor enters the relay mode. In the relay mode, the upgrade software exchanges data with the previous-level processor through the internal communication interface, extracts the processor application software image file, exchanges data with the next-level processor through the internal bus, and forwards the processor application software image file to the next-level processor, thereby realizing the relay processing and forwarding functions; 6) After the upgrade is completed, exit the upgrade command through the host computer: After the upgrade mode or relay mode is completed, the host computer sends an exit upgrade instruction to the processor, which is forwarded through the relay of the upper processor to complete the reception, erase the content in the processor's internal upgrade flag storage area, and exit the upgrade instruction.
2. The method according to claim 1, characterized in that Each processor inside the product has a unique address ID, and each upgrade can only upgrade a single-level processor, effectively avoiding interference with the upgrade process.
3. The method according to claim 2, characterized in that In the step 2), the target code of the application software includes bin and Hex file formats. The host computer parses, reads and loads the target codes in the two formats to form a directly written image file, and calculates the checksum of the image file for judging the validity of the upgrade result.
4. The method according to claim 3, characterized in that Partition processing is performed inside the processor, including the upgrade software storage area, application software storage area, upgrade flag and processor ID storage area to be upgraded, to avoid accidental erasure and miswriting of data during the loading process.
5. The method according to claim 4, characterized in that In the upgrade mode, the application software image file is received and written into the application software storage area, and at the same time, it is determined whether the writing is successful; if it is determined to be unsuccessful, the upgrade is performed again.
6. The method according to claim 5, characterized in that The external communication interfaces between the host computer and the aircraft power distribution system products include RS232, RS485, RS422 and CAN.
7. The method according to claim 6, characterized in that The internal inter-level communication interfaces of the product include RS485 and CAN.
