CN-121541912-B - Independent online upgrading method for multitasking integrated equipment software
Abstract
The application discloses an independent online upgrading method for multitasking integrated equipment software, and relates to the field of computer systems. The method comprises the steps of sending a program instruction frame to a secondary moving program by upper computer software, analyzing the type of the program to be updated by the secondary moving program according to an instruction word in the program instruction frame, wherein the instruction word is used for designating synthesized software or any independent software or a plurality of independent software as the type of the program to be updated, when the program instruction frame is a program uploading instruction frame, programming program data in the program uploading instruction frame into a FLASH storage space corresponding to the type of the program to be updated, and when the program instruction frame is a program downloading instruction frame, reading the program data in the FLASH storage space corresponding to the type of the program to be updated, and sending the program data to the upper computer software through a program downloading response frame. The method solves the problems that when the RS422 serial port is used for upgrading software, programs among cores are mutually influenced, programming reliability is low, and uploading cannot be repeated if abnormality occurs in programming.
Inventors
- JIA LIN
- LIU YUZHONG
- CHEN CHENG
- ZHANG WEIXING
- LI ZIYANG
- XU YANGZHI
- XU LU
- FU JIAJIA
- WANG XIAOXU
- You mao
- LIU YUMENG
- WANG YONGKAI
- LIU SHENGPAN
- LI HUIXIAO
- WANG JIANHUI
Assignees
- 贵州航天控制技术有限公司
- 西北工业大学
Dates
- Publication Date
- 20260508
- Application Date
- 20260115
Claims (8)
- 1. The independent online upgrading method for the multitasking integrated equipment software is characterized by comprising the following steps of: S1, an upper computer software sends a program instruction frame to a secondary moving program, wherein the program instruction frame comprises a program uploading instruction frame and a program downloading instruction frame; S2, analyzing the type of the program to be upgraded by the secondary moving program according to an instruction word in the program instruction frame, wherein the instruction word is used for designating synthetic software or any independent software or a plurality of independent software as the type of the program to be upgraded, and the independent software comprises core 0 software, core 1 software, core 2 software and core 3 software; s3, when the program instruction frame is a program uploading instruction frame, programming program data in the program uploading instruction frame into a FLASH storage space corresponding to the type of the program to be upgraded; s4, when the program instruction frame is a program downloading instruction frame, reading program data in a FLASH storage space corresponding to the type of the program to be upgraded, and sending the program data to the upper computer software through a program downloading response frame; The program instruction frame further includes a status word, where the status word is used to define whether each of multiple independent software is upgraded, including an upgrade status and a non-upgrade status, and the S2 includes: receiving the program instruction frame by a secondary moving program, and analyzing instruction words in the program instruction frame; When the instruction word is a synthetic software or an instruction word corresponding to any independent software, the synthetic software or the independent software corresponding to the instruction word is used as a program type to be upgraded; When the instruction word is the instruction word corresponding to a plurality of independent software, analyzing a status word in a program instruction frame when the frame count is 1, and taking the independent software corresponding to the status word as the type of the program to be upgraded; the program download instruction frame includes a download frame count, the program download response frame includes program data, the program data includes a total program file frame number and a total checksum software binary file, and the S4 includes: s41, receiving and analyzing the download frame count of the program download instruction frame by a secondary moving program; s42, if the value of the download frame count is 1, reading the total frame number of the program files and the total check sum software binary file in the FLASH storage space corresponding to the type of the program to be upgraded and storing the binary file in the temporary space, and transmitting the total frame number and the total check sum of the program files in the temporary space to the upper computer software through a program download response frame; And S43, if the value of the download frame count is greater than 1, transmitting the software binary file corresponding to the download frame count value in the temporary space to the upper computer software through a program download response frame.
- 2. The method of claim 1, further comprising, prior to S1: S01, enabling a secondary moving program to run on a processor core, and sending a handshake instruction frame to upper computer software; s02, after the upper computer software receives the handshake instruction frame, the upper computer software sends a handshake response frame to the secondary moving program; s03, after the secondary moving program receives the handshake response frame, sending the handshake acknowledgement frame to the upper computer software; S04, when the upper computer software receives the handshake confirmation frame, the upper computer software and the secondary moving program handshake successfully.
- 3. The method of claim 1, wherein the program upload instruction frame includes an upload frame count and program data, and wherein S3 comprises: S31, receiving and analyzing the uploading frame count of the program uploading instruction frame by a secondary moving program; s32, storing program data corresponding to the uploading frame count in a temporary space, wherein when the value of the uploading frame count is 1, the content of the program data comprises the total frame number and the total check of the program file corresponding to the type of the program to be upgraded, and when the value of the uploading frame count is greater than 1, the content of the program data comprises the software binary file corresponding to the type of the program to be upgraded; And S33, judging that after receiving all program uploading instruction frames according to the total frame number of the program files, programming the program data in the temporary space into a FLASH storage space corresponding to the type of the program to be upgraded.
- 4. A method according to claim 3, further comprising, prior to said storing the program data corresponding to the uploaded frame count in temporary space: S321, judging whether receiving conditions are met at the same time when the value of the uploaded frame count is larger than 1, wherein the receiving conditions comprise that the value of the uploaded frame count is not repeated and continuous, and judging that the total size of program data does not exceed a FLASH storage space according to the value of the frame count; and S322, if the data is not satisfied, setting the status word of the program uploading response frame as a fault, and sending the fault to the upper computer software, and not storing the software binary file corresponding to the uploading frame count in a temporary space.
- 5. The method of claim 4, further comprising, before said programming the program data in the temporary space into the FLASH memory space corresponding to the type of program to be upgraded: s331, performing validity check on the program data in the temporary space according to the total check; And S332, if the verification is wrong, setting the status word in the program uploading response frame as a fault and sending the fault to the upper computer software, and not burning the program data in the temporary space into the FLASH storage space corresponding to the type of the program to be upgraded.
- 6. The method of claim 5, further comprising, after S33: Reading program data in a FLASH storage space corresponding to the type of the program to be upgraded, and comparing the program data with the program data to be written; if the comparison is correct, the response uploading is successful; if the comparison is wrong, the status word in the program uploading response frame is set as a fault and is sent to the upper computer software.
- 7. The method according to any one of claims 4-6, further comprising, after said sending the status word in the program upload response frame as failed to the upper computer software: after the upper computer software receives the program uploading response frame with the status word set as the fault, the fault times of the program uploading response frame are accumulated; If the accumulated times do not exceed the preset threshold, sending repeated program uploading instruction frames to the secondary moving program; if the accumulated times exceeds the preset threshold, stopping sending the program uploading instruction frame.
- 8. The method as recited in claim 1, further comprising: if the synthetic software cannot be operated due to the abnormal uploading caused by sudden power failure in the process of uploading the synthetic software, automatically starting a mirror program; the upper computer software sends a synthetic software uploading/downloading instruction frame to the mirror program; When the mirror program receives the synthetic software uploading instruction frame, programming the program data in the synthetic software uploading instruction frame into a FLASH storage space corresponding to the synthetic software, wherein the program data is not changed after being programmed into the FLASH storage space corresponding to the synthetic software; When the mirror program receives the synthetic software downloading instruction frame, the program data in the FLASH storage space corresponding to the synthetic software is read, and the program data is sent to the upper computer software through the synthetic software downloading response frame.
Description
Independent online upgrading method for multitasking integrated equipment software Technical Field The application relates to the field of computer systems, in particular to an independent online upgrading method for multitasking integrated equipment software. Background The domestic multi-core ZYNQ is suitable for various scenes with high performance, flexibility and low power consumption due to the unique integrated design of the processor and the FPGA, such as the fields of embedded systems, industrial automation control, aerospace, medical electronics and the like. Each core of the processor can be matched with each other to realize high-real-time and high-integration functions and realize high-integration integrated tasks. The four-core ZYNQ processor software comprises PL software and PS software, wherein the PS software comprises core 0 software, core 1 software, core 2 software and core 3 software, the PL program and the PS program are synthesized with FSBL software provided by a processor system into a bin file through a special compiler when the software is upgraded, and then a computer circuit based on ZYNQ is connected with an industrial personal computer through a simulator, and the software is programmed into FLASH corresponding to the ZYNQ by using a special compiling environment. This method requires the disassembly of the integrated device in order to connect the emulator. At present, the synthesized processor software bin file can be uploaded to FLASH by using the RS422 serial port under the condition of not disassembling the integrated equipment, so that online software upgrading is realized. However, the method cannot independently upload the program of each core, once the program of one core is changed, PL software, FSBL software and PS core software are required to be recombined into a bin file for uploading, the mutual influence of the programs among the cores is increased, the programming reliability is reduced, and meanwhile, if the programming is abnormal, the programming program of the integrated equipment connection simulator needs to be disassembled. Disclosure of Invention The application aims to provide an independent online upgrading method for multitasking integrated equipment software, which is used for solving the problems that when the RS422 serial port is utilized to upgrade the software, programs among cores are mutually influenced, the programming reliability is low, and the repeated uploading cannot be realized if abnormality occurs in the programming process. In order to achieve the above purpose, the application adopts the following technical scheme: the application provides an independent online upgrading method for multitasking integrated equipment software, which comprises the following steps: S1, an upper computer software sends a program instruction frame to a secondary moving program, wherein the program instruction frame comprises a program uploading instruction frame and a program downloading instruction frame; S2, analyzing the type of the program to be upgraded by the secondary moving program according to an instruction word in the program instruction frame, wherein the instruction word is used for designating synthetic software or any independent software or a plurality of independent software as the type of the program to be upgraded, and the independent software comprises core 0 software, core 1 software, core 2 software and core 3 software; s3, when the program instruction frame is a program uploading instruction frame, programming program data in the program uploading instruction frame into a FLASH storage space corresponding to the type of the program to be upgraded; and S4, when the program instruction frame is a program downloading instruction frame, reading the program data in the FLASH storage space corresponding to the type of the program to be upgraded, and sending the program data to the upper computer software through a program downloading response frame. Based on the technical scheme, the application can obtain the following technical effects: the realization is simple. The method comprises the steps of sending a program instruction frame to a secondary moving program by upper computer software, wherein the program instruction frame comprises a program uploading instruction frame and a program downloading instruction frame, analyzing the type of a program to be upgraded by the secondary moving program according to an instruction word in the program instruction frame, wherein the instruction word is used for designating synthetic software or any independent software or a plurality of independent software as the type of the program to be upgraded, the independent software comprises core 0 software, core 1 software, core 2 software and core 3 software, when the program instruction frame is the program uploading instruction frame, programming program data in the program uploading instruction frame into a FLASH storage space corresponding to the