Method for judging reliability of carrier flight software based on real-time operating system

By adding logos to the link script file and comparing with ELF format files, the problem of reliability judgment of the carrying flight software is solved, and the status check and data isolation of the flight software is realized without changing the operating system. It is suitable for all software developed by embedded real-time operating systems.

CN120508490APending Publication Date: 2025-08-19SHANGHAI AEROSPACE CONTROL TECH INST
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510548173.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-04-28
Publication Date
2025-08-19

AI Technical Summary

Technical Problem

The prior art is difficult to effectively judge the reliability of carrying flight software without changing the embedded real-time operating system, especially to conduct status checks and data isolation of the code and data domains during the operation of the flight software.

Method used

By adding symbols to the link script file, obtaining memory layout information, and passing relevant addresses and checksums between the flight software and the ground software, using ELF format files for comparison, we can judge whether the loading and memory allocation of the flight software are correct.

Benefits of technology

It realizes a comprehensive status check of flight software without changing the embedded real-time operating system, ensuring the accuracy of data isolation and memory layout, reducing costs and suitable for all embedded real-time operating systems development.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120508490A_ABST
    Figure CN120508490A_ABST
Patent Text Reader

Abstract

The invention relates to a carrier flight software reliability judgment method based on a real-time operating system, and belongs to the technical field of system design. An identifier is edited in the link script file, and the flight software obtains memory arrangement related information through the identifier; the flight software checks and summarizes the start address, the end address and the code segment into a flight file; the ground software judges whether the flight software is wrong; the flight software summarizes the initial address of the user data segment, the end address of the user data segment, the global variable address and the space size into a parameter file; the ground software judges whether the flight software is wrong; the flight software downloads a stack space initial address, a stack space size and an initial address and a size of a user task stack; the ground software judges whether the task stack is normally allocated or not; according to the method, on the premise that an embedded real-time operating system is not changed at all, state checking is carried out on a code domain and a data domain in the flight software running process, and the data isolation effect is achieved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention belongs to the technical field of system design and relates to a method for determining the reliability of carrier flight software based on a real-time operating system. Background Art

[0002] Launch vehicle flight software is a crucial component of the rocket system. It performs navigation, guidance, attitude control, timing control, redundancy management and fault diagnosis, mission reconfiguration, bus communication, and telemetry information organization during flight. It must be highly complex and precise while also requiring exceptional reliability and stability. Flight software developed based on an embedded real-time operating system generates executable image files with complex file structures, large code segments, and diverse data variables. Verifying that the executable image files are correctly loaded and that the software's memory allocation is normal has become a key factor in determining flight software reliability. Summary of the Invention

[0003] The technical problem solved by the present invention is: to overcome the shortcomings of the existing technology and propose a method for determining the reliability of carrier flight software based on a real-time operating system. Without making any changes to the embedded real-time operating system, the code domain and data domain during the operation of the flight software are checked for status, and the effect of data isolation is achieved.

[0004] The solution of the present invention is:

[0005] A method for determining the reliability of carrier flight software based on a real-time operating system comprises:

[0006] By editing the linker script file, add a start marker to the beginning of the code segment in the linker script file; add an end marker to the end of the code segment; add a new user data segment in the linker script file; add a start marker to the beginning of the user data segment and an end marker to the end of the user data segment; add a stack start marker to the end of the linker script; the flight software obtains memory layout information through the memory address returned by the above identifiers;

[0007] When editing the source code of the flight software, add a segment identifier after the name of the global variable to specify the storage location of the global variable;

[0008] The flight software obtains the starting address of the code segment based on the code segment start identifier and obtains the ending address of the code segment based on the code segment end identifier; calculates the code segment checksum based on the starting address and ending address of the code segment; summarizes the starting address, ending address, and code segment checksum into a flight file, and transmits the flight file to the ground software through the network interface;

[0009] The ground software decompiles the flight file to generate an image file. It calculates the checksum of the code segment in the image file and compares it with the checksum calculated by the flight software to determine whether the flight software is incorrect.

[0010] The flight software compiles the start address of the user data segment, the end address of the user data segment, the address of the global variable, and the space size into a parameter file and passes it to the ground software;

[0011] The ground software decrypts the parameter file and generates mirror parameters; then compares them with the parameter file downloaded by the flight software to determine whether the flight software is wrong;

[0012] Flight software download stack space starting address, stack space size, user task stack starting address and size;

[0013] The ground software determines whether the task stack is allocated normally based on the parameters downloaded by the flight software.

[0014] In the above-mentioned method for determining the reliability of flight software based on a real-time operating system, the link script file is used to combine multiple target files into an executable file or a library file; the functions of the link script file include defining the starting execution point of the program, defining global symbols, merging segments of the same type, and relocation.

[0015] In the above-mentioned method for determining the reliability of flight software based on a real-time operating system, the code segment checksum is calculated as follows:

[0016] The flight software converts the code segment in the memory into an unsigned integer array, calculates the sum of the array, and obtains 32 bits of valid data.

[0017] In the above-mentioned method for determining the reliability of the carrier flight software based on a real-time operating system, the image file is in ELF format; the ground software decompiles the flight file according to the ELF file format convention to obtain the image file;

[0018] The method for ground software to calculate the checksum of the code segment in the image file is:

[0019] The ground software starts reading the data in the image file and calculates the code segment checksum according to the unsigned integer.

[0020] In the above-mentioned method for determining the reliability of flight software based on a real-time operating system, the method for determining whether the flight software is erroneous is as follows:

[0021] The ground software uses the variable address to calculate the code segment length and compares it with the code segment length in the ELF file. If they are inconsistent, it is considered that the flight software compilation and linking are incorrect; otherwise, the flight software compilation and linking are judged to be correct. The ground software uses the variable address and code segment checksum to compare with the code segment start address, end address and code segment checksum downloaded by the flight software. If they are inconsistent, it is judged that the flight software loading is abnormal; otherwise, it is judged that the flight software loading is normal.

[0022] In the above-mentioned method for determining the reliability of carrier flight software based on a real-time operating system, the flight software obtains the first address of the global variable through the global variable name; obtains the length of the global variable through the sizeof statement; and the flight software passes the parameter file to the ground software through the network interface.

[0023] In the above-mentioned method for determining the reliability of carrier flight software based on a real-time operating system, the ground software decompiles the parameter file in the ELF format, and obtains the variable names and first addresses of all variables that are greater than the starting address of the user data segment and less than the ending address of the user data segment from the generated image parameters.

[0024] In the above-mentioned method for determining the reliability of flight software based on a real-time operating system, the method for determining whether the flight software is erroneous is as follows:

[0025] The ground software uses the start and end addresses of the user data segment downloaded by the flight software to compare with the start and end addresses of the user data segment obtained from the image parameters. If they are inconsistent, the flight software loading is considered abnormal.

[0026] The ground software compares the variable names and first addresses downloaded by the flight software with those obtained from the image parameters. If they are inconsistent, the flight software loading is considered abnormal.

[0027] The ground software uses the variable starting address and variable length downloaded by the flight software to calculate the variable's ending address. Based on the variable's starting and ending addresses, it determines whether there is variable space overlap. If the starting and ending addresses of a variable are within the address space of another variable, it is considered a variable space overlap and the flight software memory space allocation is incorrect.

[0028] The ground software calculates the memory space occupied by all global variables by adding up the lengths of all variables based on the variable lengths downloaded by the flight software. The ground software then compares the consistency with the user space size obtained by subtracting the first address of the user space from the end address of the user space. If they are inconsistent, the memory space allocation is considered to be incorrect.

[0029] In the above-mentioned method for determining the reliability of carrier flight software based on a real-time operating system, the flight software obtains the size of the system stack space according to the operating system interface function; the flight software obtains the stack space starting address and stack size requested by the user through the operating system interface function; the flight software passes the system stack space starting address, system stack space size, user-requested stack starting address and user-requested stack space size to the ground software through the network interface.

[0030] In the above-mentioned method for determining the reliability of flight software based on a real-time operating system, the method for ground software to determine whether the task stack is normally allocated is:

[0031] The ground software calculates the end address of the system stack space by adding the starting address and memory size of the system stack space downloaded by the flight software.

[0032] The ground software calculates the end address of the stack space requested by the user by adding the first address and the size of the stack space requested by the user.

[0033] The ground software uses the system stack space start and end addresses to determine whether the stack space start and end addresses requested by the user are within the valid range of the stack space. If the stack space start and end addresses reviewed by the user are smaller than the system stack space start address, but greater than the system stack space end address, the stack space requested by the user is considered abnormal.

[0034] The ground software determines the starting and ending addresses of the stack space requested by the user. If the starting address or the ending address of a stack space is within the address space of another stack space, the stack space requested by the user is considered abnormal.

[0035] The beneficial effects of the present invention compared with the prior art are:

[0036] (1) The present invention has low cost and does not require any changes to the embedded real-time operating system;

[0037] (2) The present invention is highly customizable, and users can arbitrarily change the link script file according to their needs;

[0038] (3) The present invention has a comprehensive status check, which can perform a comprehensive status check on the code domain and the data domain;

[0039] (4) The present invention is simple to operate and only requires a simple modification of the link script file to obtain the detailed memory layout during the software operation, making it convenient to perform status checking on the memory layout;

[0040] (5) The present invention is applicable to all software developed based on embedded real-time operating systems. BRIEF DESCRIPTION OF THE DRAWINGS

[0041] Figure 1 This is a flow chart for ensuring the reliability of the flight software of the present invention. DETAILED DESCRIPTION

[0042] The present invention will be further described below in conjunction with the embodiments.

[0043] The present invention provides a method for determining the reliability of carrier flight software based on a real-time operating system. Without changing the operating system, the method completes code verification, memory space isolation, and user task stack space inspection during the operation of the flight software. The method is applicable to all application software developed based on an embedded operating system, achieving a simple, reliable, clear status, data isolation, and fast and practical engineering application effect.

[0044] Reliability assurance methods for flight software based on real-time operating systems, such as Figure 1 As shown, the specific steps include:

[0045] 1) Edit the linker script file and add a start marker to the beginning of the code segment in the linker script file; add an end marker to the end of the code segment; add a new user data segment to the linker script file; add a start marker to the beginning of the user data segment and an end marker to the end of the user data segment; add a stack start marker to the end of the linker script; the flight software obtains memory layout information through the memory address returned by the above identifiers. The linker script file combines multiple target files into an executable file or library file; the functions of the linker script file include defining the program's starting execution point, defining global symbols, merging segments of the same type, and relocation.

[0046] In the present invention, a linker script file is used to combine multiple target files into an executable file or library file. Its main functions include defining the program's starting execution point, defining global symbols, merging segments of the same type, and relocation. The method modifies the linker script file, adding a code segment start identifier (_text=.;) at the start of the code segment, a code segment end identifier (_etext=.;) at the end of the code segment, a start identifier (_sdata=.;) at the start of the data segment, and an end identifier (_edata=.;) at the end of the data segment. A new user data segment (*(.usr)) is added, a start identifier (usr_data_start=.;) is added at the start of the user data segment, an end identifier (usr_data_end=.;) is added at the end of the user data segment, and a stack space start identifier PROVIDE (heap_start=.;) is added. Through the memory addresses returned by these identifiers, the flight software can obtain information related to the memory layout.

[0047] 2) When editing the source program of the flight software, add a segment identifier after the name of the global variable to specify the storage location of the global variable.

[0048] During the development of flight software, when defining global variables, add the __attribute__((section(".usr"))) statement after the variable name.

[0049] 3) The flight software obtains the starting address of the code segment based on the code segment starting identifier, and obtains the ending address of the code segment based on the code segment ending identifier; calculates the code segment checksum based on the starting address and ending address of the code segment; summarizes the starting address, ending address and code segment checksum into a flight file, and transmits the flight file to the ground software through the network interface.

[0050] The code segment checksum is calculated as follows:

[0051] The flight software converts the code segment in the memory into an unsigned integer array, calculates the sum of the array, and obtains 32 bits of valid data.

[0052] In the flight software source code, the code segment's starting address is obtained using the ((u32)_text) expression, and its ending address is obtained using the ((u32)_etext) expression. The code segment in memory is converted into an unsigned integer array, and the sum of the array is calculated, resulting in a 32-bit valid value. The starting address, ending address, and code segment checksum are transmitted to the ground software via the network interface.

[0053] 4) The ground software decompiles the flight file to generate an image file; calculates the checksum of the code segment in the image file and compares it with the checksum calculated by the flight software to determine whether the flight software is incorrect.

[0054] The image file is in ELF format; the ground software decompiles the flight file according to the ELF file format convention to obtain the image file;

[0055] The method for ground software to calculate the checksum of the code segment in the image file is:

[0056] The ground software starts reading the data in the image file and calculates the code segment checksum according to the unsigned integer.

[0057] The method to determine whether the flight software is wrong is:

[0058] The ground software uses the variable address to calculate the code segment length and compares it with the code segment length in the ELF file. If they are inconsistent, it is considered that the flight software compilation and linking are incorrect; otherwise, the flight software compilation and linking are judged to be correct. The ground software uses the variable address and code segment checksum to compare with the code segment start address, end address and code segment checksum downloaded by the flight software. If they are inconsistent, it is judged that the flight software loading is abnormal; otherwise, it is judged that the flight software loading is normal.

[0059] The flight file image file is in ELF format. The ground software decompiles the flight file according to the ELF file format convention, obtains the address of the image file (_text) and (_etext) variables and the code segment length, reads the data in the image file starting from the _text address and ending at the _etext address, and calculates the code segment checksum as an unsigned integer. The ground software uses the (_text) and (_etext) variable addresses to calculate the code segment length and compares it with the code segment length in the ELF file. If they are inconsistent, it is considered that the flight software compilation and linking errors. The ground software uses the (_text) and (_etext) variable addresses and code segment checksum to compare with the code segment start address, end address and code segment checksum downloaded by the flight software. If they are inconsistent, it is considered that the flight software loading is abnormal.

[0060] 5) The flight software compiles the starting address of the user data segment, the ending address of the user data segment, the address of the global variable and the space size into a parameter file and passes it to the ground software.

[0061] The flight software obtains the first address of the global variable through the global variable name; obtains the length of the global variable through the sizeof statement; and passes the parameter file to the ground software through the network interface.

[0062] In the flight software source code, the user data segment start address is obtained using the ((u32)usr_data_start) expression, the user data segment end address is obtained using the ((u32)usr_data_end) expression, the global variable first address is obtained using the global variable name, and the global variable length is obtained using the sizeof statement. The user data segment start address, user data segment end address, global variable name, global variable first address, and global variable length are transmitted to the ground software via the network interface.

[0063] 6) The ground software decrypts the parameter file and generates mirror parameters; then compares them with the parameter file downloaded by the flight software to determine whether the flight software is incorrect.

[0064] The ground software decompiles the parameter file in ELF format and obtains the variable names and first addresses of all variables that are greater than the starting address of the user data segment and less than the ending address of the user data segment from the generated image parameters.

[0065] The method to determine whether the flight software is wrong is:

[0066] The ground software uses the start and end addresses of the user data segment downloaded by the flight software to compare with the start and end addresses of the user data segment obtained from the image parameters. If they are inconsistent, it is considered that the flight software loading is abnormal.

[0067] The ground software uses the variable names and first addresses downloaded by the flight software to compare with the variable names and first addresses obtained from the mirror parameters. If they are inconsistent, it is considered that the flight software loading is abnormal.

[0068] The ground software uses the variable starting address and variable length downloaded by the flight software to calculate the variable's ending address. It then determines whether there is variable space overlap based on the variable's starting and ending addresses. If the starting and ending addresses of a variable are within the address space of another variable, it is considered a variable space overlap and a flight software memory space allocation error has occurred.

[0069] The ground software calculates the memory space occupied by all global variables by adding up the lengths of all variables based on the variable lengths downloaded by the flight software. The ground software then compares the consistency with the user space size obtained by subtracting the first address of the user space from the end address of the user space. If they are inconsistent, the memory space allocation is considered to be incorrect.

[0070] The ground software decompiles the ELF-formatted flight software parameter file, generating the address of the variable (usr_data_start) in the image parameter as the start address of the user data segment and the address of the variable (usr_data_end) in the image parameter as the end address of the user data segment. It then obtains the names and first addresses of all variables whose addresses are greater than the usr_data_start address and less than the usr_data_end address. The ground software compares the start and end addresses of the user data segment transmitted by the flight software with the start and end addresses obtained from the image parameter. If they do not match, the flight software is considered to have loaded abnormally. The ground software also compares the variable names and first addresses transmitted by the flight software with the variable names and first addresses obtained from the image parameter. If they do not match, the flight software is considered to have loaded abnormally. The ground software uses the variable first addresses and lengths transmitted by the flight software to calculate the variable end addresses. Based on the variable start and end addresses, it determines whether there is any variable space overlap. If the start and end addresses of a variable are within the address space of another variable, it is considered to have overlapped with the variable space and is an error in the flight software memory allocation. The ground software calculates the memory space occupied by all global variables by adding up the lengths of all variables based on the variable lengths downloaded by the flight software. The ground software then compares the consistency with the user space size obtained by subtracting the first address of the user space from the end address of the user space. If they are inconsistent, the memory space allocation is considered to be incorrect.

[0071] 7) The flight software downloads the stack space starting address, stack space size, and the user task stack starting address and size. The flight software obtains the system stack space size through the operating system interface function; the flight software also obtains the user-requested stack space starting address and stack size through the operating system interface function; the flight software transmits the system stack space starting address, system stack space size, user-requested stack starting address, and user-requested stack space size to the ground software through the network interface.

[0072] In the flight software source code, the system stack starting address is obtained using the ((u32)heap_start) expression. The system stack size is obtained using the operating system interface function. The user-requested stack starting address and stack size are also obtained using the operating system interface function. The system stack starting address, system stack size, user-requested stack starting address, and user-requested stack size are transmitted to the ground software via the network interface.

[0073] 8) The ground software determines whether the task stack is allocated normally based on the parameters downloaded by the flight software.

[0074] The method used by the ground software to determine whether the task stack is allocated normally is:

[0075] The ground software calculates the end address of the system stack space based on the starting address of the system stack space and the size of the memory space downloaded by the flight software by adding the two.

[0076] The ground software calculates the end address of the stack space requested by the user by adding the starting address and the size of the stack space requested by the user.

[0077] The ground software uses the system stack space start address and end address to determine whether the stack space start address and end address requested by the user are within the valid range of the stack space. If the stack space start address and end address reviewed by the user are smaller than the system stack space start address and larger than the system stack space end address, the stack space requested by the user is considered abnormal.

[0078] The ground software determines the starting and ending addresses of the stack space requested by the user. If the starting address or the ending address of a stack space is within the address space of another stack space, the stack space requested by the user is considered abnormal.

[0079] Example

[0080] 1. Change the link script file in the development environment and add the address identifier of the key segment

[0081] Add the "_text=.;" expression to the first line of the link script code segment (text segment), and add the "_etext=.;" expression to the last line to indicate the starting address and ending address of the code segment.

[0082] Add a new user data segment (usr segment) and add the user data segment start and end identifier. The expression is as follows: "usr_data_start = .; * (.usr) usr_data_end = .;".

[0083] Add the stack space starting address identifier at the end of the kernel of the connection script file, the expression is as follows "PROVIDE (heap_start = .);".

[0084] 2. Modify the flight software source code to obtain the address information of the key segment and download it

[0085] In the source code of the flight software, when defining global variables, add the "__attribute__((section(".usr")))" expression at the end to indicate that the global variables belong to the user data segment.

[0086] Added "extern char_text[];", "extern char_etext[];", "extern char usr_data_start[];", "extern char usr_data_end[];", and "extern u32heap_start;" external variable declarations. The flight software obtains the starting and ending addresses of the code segment, the starting and ending addresses of the user data segment, and the starting address of the stack space through the values of these variables.

[0087] The flight software has added a function for calculating the checksum of the entire code segment based on the starting and ending addresses of the code segment, in units of 4 bytes, and transmitting the starting address, ending address, and code segment checksum.

[0088] The flight software has added a new function for downloading the user data segment start address, user data segment end address, global variable name, global variable first address and global variable length.

[0089] The flight software has added a new function for downloading the stack space starting address, stack space size, task stack space starting address, and task stack space size.

[0090] 3. Joint compilation of flight software and embedded operating system to generate self-booting image file

[0091] The flight software development project is configured as a self-booting project to achieve joint compilation and linking of the embedded real-time operating system and flight software to generate an executable image file containing the operating system.

[0092] 4. After the flight software is started, it transmits key messages indicating the operating status

[0093] After the flight software is started, the code segment start address and code segment end address, code segment checksum, user data segment start address and end address, global variable name, global variable start address and global variable length, stack space start address, stack space size, task stack space start address and task stack space size are downloaded.

[0094] 5. Obtain key information about the flight software's operating status from the flight software image file

[0095] Decode the flight software image file in ELF format on the ground to generate the segment information table and symbol table.

[0096] Get the code segment length and code segment file offset address according to the segment information table, and calculate the code segment checksum in the ELF file.

[0097] Get information such as "_text", "_etext", "usr_data_start", "usr_data_end", "heap_start" and the first address of all global variables according to the symbol table.

[0098] 6. Compare the information in the image file with the information downloaded by the flight software for consistency

[0099] The information downloaded by the flight software is compared with the corresponding information in the image file for consistency. This includes the start and end addresses of the code segment, the code segment checksum, the start and end addresses of the data segment, the first address and length of global variables, and the first address of the task stack space.

[0100] Based on the global variable's first address and variable length, check whether the global variable space overlaps or exceeds the user data segment.

[0101] Based on the user task stack head address and stack space size, determine whether the task stack space overlaps or exceeds the stack space.

[0102] The present invention has low cost and does not require any changes to the embedded real-time operating system.

[0103] The present invention has strong customizability, and users can arbitrarily change the link script file according to their own needs.

[0104] The present invention has a comprehensive status check and can perform a comprehensive status check on the code domain and the data domain.

[0105] The present invention is easy to operate and only requires simple changes to the link script file. The detailed memory layout during software operation can be obtained, making it convenient to perform status checking on the memory layout.

[0106] The present invention is applicable to all software developed based on embedded real-time operating systems.

[0107] Although the present invention has been disclosed above in terms of preferred embodiments, it is not intended to limit the present invention. Any person skilled in the art may make possible changes and modifications to the technical solutions of the present invention by using the methods and technical contents disclosed above without departing from the spirit and scope of the present invention. Therefore, any simple modifications, equivalent changes and modifications made to the above embodiments based on the technical essence of the present invention without departing from the content of the technical solutions of the present invention shall fall within the scope of protection of the technical solutions of the present invention.

Claims

1. A method for determining the reliability of flight software based on a real-time operating system, characterized by: include: By editing the link script file, add a start marker to the beginning of the code segment in the link script file; Add an end marker at the end of the code segment; Add a new user data segment to the linker script file; add a start marker at the beginning of the user data segment and an end marker at the end of the user data segment; add a stack start marker at the end of the linker script; the flight software obtains memory layout information through the memory address returned by the above identifiers; When editing the source code of the flight software, add a segment identifier after the name of the global variable to specify the storage location of the global variable; The flight software obtains the starting address of the code segment based on the code segment start identifier and obtains the ending address of the code segment based on the code segment end identifier; calculates the code segment checksum based on the starting address and ending address of the code segment; the flight software compiles the starting address, ending address, and code segment checksum into a flight file and transmits the flight file to the ground software via a network interface; The ground software decompiles the flight file and generates an image file; Calculate the checksum of the code segment in the image file and compare it with the checksum calculated by the flight software to determine whether the flight software is wrong; The flight software compiles the start address of the user data segment, the end address of the user data segment, the address of the global variable, and the space size into a parameter file and passes it to the ground software; The ground software decrypts the parameter file and generates mirror parameters; then compares them with the parameter file downloaded by the flight software to determine whether the flight software is wrong; Flight software download stack space starting address, stack space size, user task stack starting address and size; The ground software determines whether the task stack is allocated normally based on the parameters downloaded by the flight software.

2. The method for determining the reliability of carrier flight software based on a real-time operating system according to claim 1, characterized in that: The link script file realizes combining multiple target files into an executable file or library file; the functions of the link script file include defining the starting execution point of the program, defining global symbols, merging segments of the same type and relocation.

3. The method for determining the reliability of carrier flight software based on a real-time operating system according to claim 1, wherein: The code segment checksum is calculated as follows: The flight software converts the code segment in the memory into an unsigned integer array, calculates the sum of the array, and obtains 32 bits of valid data.

4. The method for determining the reliability of carrier flight software based on a real-time operating system according to claim 1, wherein: The image file is in ELF format; the ground software decompiles the flight file according to the ELF file format convention to obtain the image file; The method for ground software to calculate the checksum of the code segment in the image file is: The ground software starts reading the data in the image file and calculates the code segment checksum according to the unsigned integer.

5. The method for determining the reliability of carrier flight software based on a real-time operating system according to claim 4, characterized in that: The method to determine whether the flight software is wrong is: The ground software uses the variable address to calculate the code segment length and compares it with the code segment length in the ELF file. If they are inconsistent, it is considered that the flight software compilation and linking are incorrect; otherwise, the flight software compilation and linking are judged to be correct. The ground software uses the variable address and code segment checksum to compare with the code segment start address, end address and code segment checksum downloaded by the flight software. If they are inconsistent, it is judged that the flight software loading is abnormal; otherwise, it is judged that the flight software loading is normal.

6. The method for determining the reliability of carrier flight software based on a real-time operating system according to claim 1, characterized in that: The flight software obtains the global variable's first address through the global variable name; obtains the global variable's length through the sizeof statement; and transmits the parameter file to the ground software through the network interface.

7. The method for determining the reliability of carrier flight software based on a real-time operating system according to claim 6, characterized in that: The ground software decompiles the parameter file in ELF format, and obtains all variable names and first addresses that are greater than the starting address of the user data segment and less than the ending address of the user data segment from the generated image parameters.

8. The method for determining the reliability of carrier flight software based on a real-time operating system according to claim 7, characterized in that: The method to determine whether the flight software is wrong is: The ground software uses the start and end addresses of the user data segment downloaded by the flight software to compare with the start and end addresses of the user data segment obtained from the image parameters. If they are inconsistent, the flight software loading is considered abnormal. The ground software compares the variable names and first addresses downloaded by the flight software with those obtained from the image parameters. If they are inconsistent, the flight software loading is considered abnormal. The ground software uses the variable starting address and variable length downloaded by the flight software to calculate the variable's ending address. Based on the variable's starting and ending addresses, it determines whether there is variable space overlap. If the starting and ending addresses of a variable are within the address space of another variable, it is considered a variable space overlap and the flight software memory space allocation is incorrect. The ground software calculates the memory space occupied by all global variables by adding up the lengths of all variables based on the variable lengths downloaded by the flight software. The ground software then compares the consistency with the user space size obtained by subtracting the first address of the user space from the end address of the user space. If they are inconsistent, the memory space allocation is considered to be incorrect.

9. The method for determining the reliability of carrier flight software based on a real-time operating system according to claim 8, characterized in that: The flight software obtains the size of the system stack space according to the operating system interface function; the flight software obtains the stack space starting address and stack size requested by the user through the operating system interface function; the flight software passes the system stack space starting address, system stack space size, user-requested stack starting address and user-requested stack space size to the ground software through the network interface.

10. The method for determining the reliability of carrier flight software based on a real-time operating system according to claim 9, characterized in that: The method used by the ground software to determine whether the task stack is allocated normally is: The ground software calculates the end address of the system stack space by adding the starting address and memory size of the system stack space downloaded by the flight software. The ground software calculates the end address of the stack space requested by the user by adding the first address and the size of the stack space requested by the user. The ground software uses the system stack space start and end addresses to determine whether the stack space start and end addresses requested by the user are within the valid range of the stack space. If the stack space start and end addresses reviewed by the user are smaller than the system stack space start address, but greater than the system stack space end address, the stack space requested by the user is considered abnormal. The ground software determines the starting and ending addresses of the stack space requested by the user. If the starting address or the ending address of a stack space is within the address space of another stack space, the stack space requested by the user is considered abnormal.