[go: up one dir, main page]

CN112241271A - A Partial Upgrading Method of Embedded Software - Google Patents

A Partial Upgrading Method of Embedded Software Download PDF

Info

Publication number
CN112241271A
CN112241271A CN201910643373.3A CN201910643373A CN112241271A CN 112241271 A CN112241271 A CN 112241271A CN 201910643373 A CN201910643373 A CN 201910643373A CN 112241271 A CN112241271 A CN 112241271A
Authority
CN
China
Prior art keywords
file
program
upgrading
embedded
upgrade
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN201910643373.3A
Other languages
Chinese (zh)
Inventor
刘乐盈
杜鑫
王瑞
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
XI'AN FLAG ELECTRONICS CO Ltd
Original Assignee
XI'AN FLAG ELECTRONICS CO Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by XI'AN FLAG ELECTRONICS CO Ltd filed Critical XI'AN FLAG ELECTRONICS CO Ltd
Priority to CN201910643373.3A priority Critical patent/CN112241271A/en
Publication of CN112241271A publication Critical patent/CN112241271A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/60Software deployment
    • G06F8/65Updates

Landscapes

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

Abstract

本发明提供一种嵌入式软件的部分升级方法。所述嵌入式软件的部分升级方法,包括以下方法:S1:使用的编译器生成ELF格式的嵌入式操作系统文件;S2:将S1中嵌入式操作系统文件下载到单片机系统,并运行;S3:使用编译器生成ELF格式的升级程序文件X;S4:将升级程序文件X通过通讯链路传输给单片机系统;S5:单片机系统在确定升级程序文件X传输完成后,嵌入式操作系统校验文件有效性和完整性;S6:进行升级操作,升级中单片机系统中的嵌入式操作系统对接收到的文件X数据进行分析。本发明提供的嵌入式软件的部分升级方法具有该嵌入式软件的部分升级方法提高了软件升级的速率,且升级的稳定性更强,且步骤简单容易实施。

Figure 201910643373

The invention provides a partial upgrade method of embedded software. The partial upgrading method of the embedded software includes the following methods: S1: using a compiler to generate an embedded operating system file in ELF format; S2: downloading the embedded operating system file in S1 to a single-chip microcomputer system, and running it; S3: Use the compiler to generate the upgrade program file X in ELF format; S4: Transmit the upgrade program file X to the single-chip microcomputer system through the communication link; S5: After the single-chip computer system determines that the transfer of the upgrade program file X is completed, the embedded operating system verifies that the file is valid S6: perform an upgrade operation, and the embedded operating system in the single-chip microcomputer system in the upgrade analyzes the received file X data. The method for partial upgrading of embedded software provided by the present invention has the advantages of the method for partial upgrading of embedded software, which improves the speed of software upgrading, has stronger upgrading stability, and is simple and easy to implement.

Figure 201910643373

Description

Partial upgrading method for embedded software
Technical Field
The invention relates to the field of embedded software, in particular to a partial upgrading method of embedded software.
Background
The embedded software is operating system and development tool software embedded in hardware, and the association relationship in the industry is embodied as follows: chip design and manufacture, embedded system software, and embedded electronic device development and manufacture, wherein the embedded system refers to a special computer system for executing independent functions. It is composed of a series of microelectronic chips and devices including microprocessor, timer, microcontroller, memory and sensor, and micro-operation system and control application software embedded in the memory, and can implement various automatic processing tasks of real-time control, monitoring, management, mobile calculation and data processing, etc.
In the using process of the embedded software, for example, the embedded software is often required to be upgraded to make up for some bugs or improve some performances, and the upgrading stability of the existing embedded software is low, so that the upgrading process is slow.
Therefore, it is necessary to provide a partial upgrade method for embedded software to solve the above technical problems.
Disclosure of Invention
The invention provides a partial upgrading method of embedded software, which solves the problems of low upgrading stability and low upgrading process speed when the existing embedded software is upgraded.
In order to solve the technical problem, the method for partially upgrading the embedded software provided by the invention comprises the following steps:
s1: the used compiler generates an embedded operating system file in an ELF format;
1. s2: downloading the embedded operating system file in the S1 to a single chip microcomputer system and operating the single chip microcomputer system, wherein the single chip microcomputer system comprises an embedded system core program area and a dynamically loadable program area, and the single chip microcomputer system program area has enough storage space for upgrading codes;
s3: generating an upgrading program file X in an ELF format by using a compiler;
s4: transmitting the upgrading program file X to the single chip microcomputer system through a communication link;
s5: after the single chip microcomputer system determines that the transmission of the upgrading program file X is completed, the embedded operating system verifies the validity and the integrity of the file;
s6: carrying out upgrading operation, wherein an embedded operating system in a singlechip system in the upgrading analyzes the received file X data, modifies the corresponding address of the symbol table, and realizes the relocation of code segments, data segments, the symbol table and program entry information addresses;
s7: after the updating code segment is relocated, replacing the program entry address to be updated in the entry address list of the loadable program as the updating program entry address, starting a new program to complete the updating, and arranging a plurality of program entry addresses in the single chip microcomputer system.
Preferably, the embedded operating system file in S1 includes an embedded system kernel and a dynamically loadable program.
Preferably, the program of the singlechip system is based on an embedded operating system, and the embedded operating system supports dynamic connection and dynamic loading functions.
Preferably, in S4, the single chip microcomputer system needs to establish a communication link with the upgrade server first, and then store the upgrade program file X in the data program storage area of the single chip microcomputer system through the communication link.
Preferably, the communication link in S4 may be UART, SPI, IIC, BLE, NB-Iot, etc.
Preferably, the embedded operating system in S6 relocates code segments, data segments, symbol tables, and program entry information addresses of the file X through a dynamic loading function.
Preferably, in S6, after the relocation of the upgrade code segment is completed, the target program needs to be exited.
Preferably, the upgrade program file X is transmitted to the single chip microcomputer system by the upgrade server through a communication link.
Preferably, the embedded operating system file and the upgrade program file X generated by the encoder must be in the ELF format.
Preferably, in S5, if the upgrade program file X is validated, the upgrade operation is performed, otherwise, the upgrade program file X is deleted.
Compared with the related art, the partial upgrading method of the embedded software provided by the invention has the following beneficial effects:
the invention provides a part of embedded software upgrading method, the compiler used generates the embedded operating system file of ELF format, download the embedded operating system file in S1 to the one-chip computer system, and operate, the compiler used generates the upgrading program file X of ELF format, the one-chip computer system sets up the communication link with upgrading server, transmit upgrading program file X to the one-chip computer system through the communication link, the one-chip computer system is after confirming that upgrading program file X transmits and finishes, the embedded operating system checks file validity and integrality, carry on the upgrading operation, the embedded operating system in the one-chip computer system analyzes the file X data received in upgrading, revise the corresponding address of symbol table, realize the relocation of code segment, data segment, symbol table, procedure entry information address through the dynamic loading function; after the updating code segment is relocated, replacing the program entry address to be updated in the entry address list of the loadable program as the updating program entry address, starting the new program, and completing the updating.
Drawings
FIG. 1 is a schematic structural diagram of a preferred embodiment of a method for partially upgrading embedded software according to the present invention;
FIG. 2 is a partial functional block diagram of FIG. 1;
FIG. 3 is a partial functional block diagram of FIG. 1;
fig. 4 is a partial schematic block diagram of fig. 1.
Detailed Description
The invention is further described with reference to the following figures and embodiments.
Please refer to fig. 1, fig. 2, fig. 3 and fig. 4 in combination, wherein fig. 1 is a schematic structural diagram of a preferred embodiment of a partial upgrading method for embedded software according to the present invention; FIG. 2 is a partial functional block diagram of FIG. 1; FIG. 3 is a partial functional block diagram of FIG. 1; fig. 4 is a partial schematic block diagram of fig. 1. The partial upgrading method of the embedded software comprises the following steps:
s1: the used compiler generates an embedded operating system file in an ELF format;
s2: downloading the embedded operating system file in the S1 to a single chip microcomputer system and operating;
s3: generating an upgrading program file X in an ELF format by using a compiler;
s4: transmitting the upgrading program file X to the single chip microcomputer system through a communication link;
s5: after the single chip microcomputer system determines that the transmission of the upgrading program file X is completed, the embedded operating system verifies the validity and the integrity of the file;
s6: carrying out upgrading operation, wherein an embedded operating system in a singlechip system in the upgrading analyzes the received file X data, modifies the corresponding address of the symbol table, and realizes the relocation of code segments, data segments, the symbol table and program entry information addresses;
s7: after the updating code segment is relocated, replacing the program entry address to be updated in the entry address list of the loadable program as the updating program entry address, and starting the new program to complete the updating.
The embedded operating system file in S1 includes an embedded system kernel and a dynamically loadable program.
The system program of the single chip microcomputer is based on an embedded operating system, and the embedded operating system supports dynamic connection and dynamic loading functions.
In S4, the single chip microcomputer system needs to establish a communication link with the upgrade server first, and then stores the upgrade program file X in the data program storage area of the single chip microcomputer system through the communication link.
The communication link in the S4 can be UART, SPI, IIC, BLE, NB-Iot and the like, and the upgrade file can be directly written into the program area of the single chip microcomputer system through the communication link.
The embedded operating system in S6 realizes relocation of the file X code segment, data segment, symbol table, and program entry information address through a dynamic loading function.
In S6, after the relocation of the upgrade code segment is completed, the target program needs to be exited.
And the upgrading program file X is transmitted to the singlechip system by the upgrading server through a communication link.
The embedded operating system file and the upgrade program file X generated by the encoder must be in the ELF format.
And in the step S5, if the upgrade program file X is validated, performing an upgrade operation, otherwise, deleting the upgrade program file X.
The working principle of the partial upgrading method of the embedded software provided by the invention is as follows:
s1: the used compiler generates an embedded operating system file in an ELF format;
s2: downloading the embedded operating system file in the S1 to a single chip microcomputer system and operating;
s3: generating an upgrading program file X in an ELF format by using a compiler;
s4: the single chip microcomputer system and the upgrading server establish a communication link, and an upgrading program file X is transmitted to the single chip microcomputer system through the communication link;
s5: after the single chip microcomputer system determines that the transmission of the upgrading program file X is completed, the embedded operating system verifies the validity and the integrity of the file;
s6: carrying out upgrading operation, wherein an embedded operating system in a singlechip system in the upgrading analyzes the received file X data, modifies the corresponding address of the symbol table, and realizes the relocation of code segments, data segments, the symbol table and program entry information addresses through a dynamic loading function;
s7: after the updating code segment is relocated, replacing the program entry address to be updated in the entry address list of the loadable program as the updating program entry address, and starting the new program to complete the updating.
Compared with the related art, the partial upgrading method of the embedded software provided by the invention has the following beneficial effects:
the invention provides a part of embedded software upgrading method, the compiler used generates the embedded operating system file of ELF format, download the embedded operating system file in S1 to the one-chip computer system, and operate, the compiler used generates the upgrading program file X of ELF format, the one-chip computer system sets up the communication link with upgrading server, transmit upgrading program file X to the one-chip computer system through the communication link, the one-chip computer system is after confirming that upgrading program file X transmits and finishes, the embedded operating system checks file validity and integrality, carry on the upgrading operation, the embedded operating system in the one-chip computer system analyzes the file X data received in upgrading, revise the corresponding address of symbol table, realize the relocation of code segment, data segment, symbol table, procedure entry information address through the dynamic loading function; after the updating code segment is relocated, replacing the program entry address to be updated in the entry address list of the loadable program as the updating program entry address, starting the new program, and completing the updating.
The above description is only an embodiment of the present invention, and not intended to limit the scope of the present invention, and all modifications of equivalent structures and equivalent processes, which are made by using the contents of the present specification and the accompanying drawings, or directly or indirectly applied to other related technical fields, are included in the scope of the present invention.

Claims (10)

1. A partial upgrading method of embedded software is characterized by comprising the following steps:
s1: the used compiler generates an embedded operating system file in an ELF format;
s2: downloading the embedded operating system file in the S1 to a single chip microcomputer system and operating;
s3: generating an upgrading program file X in an ELF format by using a compiler;
s4: transmitting the upgrading program file X to the single chip microcomputer system through a communication link;
s5: after the single chip microcomputer system determines that the transmission of the upgrading program file X is completed, the embedded operating system verifies the validity and the integrity of the file;
s6: carrying out upgrading operation, wherein an embedded operating system in a singlechip system in the upgrading analyzes the received file X data, modifies the corresponding address of the symbol table, and realizes the relocation of code segments, data segments, the symbol table and program entry information addresses;
s7: after the updating code segment is relocated, replacing the program entry address to be updated in the entry address list of the loadable program as the updating program entry address, and starting the new program to complete the updating.
2. The method for partial upgrade of embedded software according to claim 1, wherein the embedded operating system files in S1 include an embedded system kernel and a dynamically loadable program.
3. The method for partially upgrading embedded software according to claim 1, wherein the single-chip system program is based on an embedded operating system, and the embedded operating system supports dynamic connection and dynamic loading functions.
4. The method for partially upgrading embedded software according to claim 1, wherein the monolithic processor system in S4 needs to establish a communication link with the upgrade server first, and then stores the upgrade program file X in the data program storage area of the monolithic processor system through the communication link.
5. The method for partial upgrade of embedded software according to claim 1, wherein the communication link in S4 may be UART, SPI, IIC, BLE, NB-Iot, etc.
6. The method for partially upgrading embedded software according to claim 1, wherein the embedded operating system in S6 relocates code segments, data segments, symbol tables and program entry information addresses of the file X through a dynamic loading function.
7. The method for partial upgrade of embedded software according to claim 1, wherein in S6, after the relocation of the upgrade code segment is completed, the target program needs to be exited.
8. The method for partially upgrading embedded software according to claim 1, wherein the upgrade program file X is transmitted to the one-chip microcomputer system by an upgrade server through a communication link.
9. The method of claim 1, wherein the embedded operating system file and the upgrade program file X generated by the encoder must be in ELF format.
10. The method for partial upgrade of embedded software according to claim 1, wherein the upgrade program file X is validated and then upgraded in S5, otherwise, the upgrade program file X is deleted.
CN201910643373.3A 2019-07-17 2019-07-17 A Partial Upgrading Method of Embedded Software Pending CN112241271A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910643373.3A CN112241271A (en) 2019-07-17 2019-07-17 A Partial Upgrading Method of Embedded Software

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910643373.3A CN112241271A (en) 2019-07-17 2019-07-17 A Partial Upgrading Method of Embedded Software

Publications (1)

Publication Number Publication Date
CN112241271A true CN112241271A (en) 2021-01-19

Family

ID=74167641

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910643373.3A Pending CN112241271A (en) 2019-07-17 2019-07-17 A Partial Upgrading Method of Embedded Software

Country Status (1)

Country Link
CN (1) CN112241271A (en)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CA2744108A1 (en) * 2008-11-18 2010-05-27 Tencent Technology (Shenzhen) Company Limited Method for dynamically linking program on embedded platform and embedded platform
CN101937340A (en) * 2009-06-29 2011-01-05 中兴通讯股份有限公司 Method and device for dynamically upgrading and controlling software using patches
CN104461594A (en) * 2013-09-22 2015-03-25 杭州海康威视数字技术股份有限公司 Updating method and device of embedded operating system
CN107943504A (en) * 2017-12-07 2018-04-20 中国航空工业集团公司西安航空计算技术研究所 The dynamic update method of software module in a kind of embedded system

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CA2744108A1 (en) * 2008-11-18 2010-05-27 Tencent Technology (Shenzhen) Company Limited Method for dynamically linking program on embedded platform and embedded platform
CN101937340A (en) * 2009-06-29 2011-01-05 中兴通讯股份有限公司 Method and device for dynamically upgrading and controlling software using patches
CN104461594A (en) * 2013-09-22 2015-03-25 杭州海康威视数字技术股份有限公司 Updating method and device of embedded operating system
CN107943504A (en) * 2017-12-07 2018-04-20 中国航空工业集团公司西安航空计算技术研究所 The dynamic update method of software module in a kind of embedded system

Similar Documents

Publication Publication Date Title
US7174544B2 (en) JAVA compile-on-demand service system for accelerating processing speed of JAVA program in data processing system and method thereof
CN107992308B (en) Plug-in management method for android terminal application program
CN108196878A (en) Method and device for generating application program installation package, electronic equipment and storage medium
CN107577609B (en) Embedded system dynamic module debugging system based on host end dynamic link
CN114296871A (en) Container-based continuous integration method, device, system, working node and medium
CN106796521B (en) API versioning independent of product releases
CN102760068A (en) Loading method of Active X plugin and device
CN105760289A (en) Debugging method and device of embedded system
CN114327477A (en) Intelligent contract execution method and device, electronic device and storage medium
CN108351790B (en) Apparatus, method, and medium for non-monotonic eventual convergence of desired state configurations
CN104021011A (en) Program upgrading system and method for embedded device
CN105138337A (en) Plugin adaptation method and plugin adaptation device
US20060184924A1 (en) Intelligent platform management interface firmware architecture and method of building the same
CN106528215A (en) Java-based dynamic command loading method and device
CN116455694A (en) A baud rate setting method, device, equipment and storage medium
CN112363726A (en) Cross-kernel version compiling method and system of kernel module
CN110134423B (en) Firmware updating method and device and computer readable storage medium
CN110457058A (en) Control node online upgrade method, device, host computer, system and electronic equipment
CN101782860B (en) A program linking method and device
CN114780173A (en) Method for loading plug-in application, computing equipment and storage medium
CN112241271A (en) A Partial Upgrading Method of Embedded Software
CN113360161B (en) Resource upgrading method and related products
US20060080636A1 (en) Method of building intelligent platform management interface firmware architecture
TW201441932A (en) Processing devices and system program updating methods
CN1926513A (en) Method and data processing device for updating computer programs by data transmission

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
RJ01 Rejection of invention patent application after publication

Application publication date: 20210119

RJ01 Rejection of invention patent application after publication