[go: up one dir, main page]
More Web Proxy on the site http://driver.im/

CN113010186B - Firmware and application data integration method and system applied to optical module - Google Patents

Firmware and application data integration method and system applied to optical module Download PDF

Info

Publication number
CN113010186B
CN113010186B CN202110160239.5A CN202110160239A CN113010186B CN 113010186 B CN113010186 B CN 113010186B CN 202110160239 A CN202110160239 A CN 202110160239A CN 113010186 B CN113010186 B CN 113010186B
Authority
CN
China
Prior art keywords
application data
hex
firmware program
original
file
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.)
Active
Application number
CN202110160239.5A
Other languages
Chinese (zh)
Other versions
CN113010186A (en
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.)
Wuhan Linktel Technologies Co Ltd
Original Assignee
Wuhan Linktel Technologies 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 Wuhan Linktel Technologies Co Ltd filed Critical Wuhan Linktel Technologies Co Ltd
Priority to CN202110160239.5A priority Critical patent/CN113010186B/en
Publication of CN113010186A publication Critical patent/CN113010186A/en
Application granted granted Critical
Publication of CN113010186B publication Critical patent/CN113010186B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/60Software deployment
    • G06F8/61Installation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/30Creation or generation of source code
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Landscapes

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

Abstract

A firmware and application data integration method and system applied to an optical module are provided, the method comprises the following steps: acquiring a firmware program and corresponding application data; encoding the application data according to the encoding format of the original HEX file of the firmware program; the firmware program and the coded application data are synthesized into a new executable HEX file, and the synthesized new HEX file is downloaded into a specified single chip microcomputer through a downloader or upper computer software according to a mode of downloading the HEX file. The invention combines the firmware program and the application data into a unified executable file, and downloads the unified executable file into the firmware at one time, thereby improving the production efficiency and reducing the risk. And because the firmware program has a uniform address data corresponding coding format, the application of the firmware program in application data import is also a uniform management mode, and the reliability of data downloading is improved.

Description

Firmware and application data integration method and system applied to optical module
Technical Field
The invention relates to the technical field of embedded firmware import and application data import of an optical module, in particular to a firmware and application data integration method and system applied to the optical module.
Background
Driven by 5G of big data, the demand of higher network speed bandwidth for higher speed fibre channel is more urgent, resulting in a rapid increase in demand for more high speed modules, which require larger firmware programs and more records of application information.
In the production process of the optical module, the firmware program and the application data in the optical module need to be separately imported, the firmware program needs to be imported, and then the application information is imported by means of the firmware program, so that multi-step operation and opening of different software are needed to complete different operations, more risk items are brought, and after separate downloading, version information needs to be verified and compared for many times, so that additional production cost expenditure and risk items are caused.
Disclosure of Invention
In view of the technical defects and technical drawbacks in the prior art, embodiments of the present invention provide a method and a system for integrating firmware and application data applied to an optical module, which overcome the above problems or at least partially solve the above problems, and the specific solution is as follows:
as a first aspect of the present invention, there is provided a firmware and application data integration method applied to a light module, the method including:
step 1, acquiring a firmware program and corresponding application data;
step 2, encoding the application data according to the encoding format of the original HEX file of the firmware program;
and 3, synthesizing the firmware program and the coded application data into a new executable HEX file, and downloading the synthesized new HEX file into a specified single chip microcomputer through a downloader or upper computer software according to a HEX file downloading mode, so as to integrate the firmware and the application data of the optical module.
Further, step 2 further includes analyzing the encoding format of the original HEX file of the firmware program to obtain the encoding format of the original HEX file, and in step 2, encoding the application data by using the encoding format of the original HEX file of the firmware program specifically includes: and encoding the application data according to the address and the data encoding mode of the original HEX file.
Further, in step 2, the encoded application data is stored in a table form, including an application data address mapping table and an application data table, where the application data table stores a mapping relationship between a table sequence number and corresponding data, and the application data address mapping table stores a mapping relationship between a table sequence number and an address.
Further, step 3 specifically comprises: matching the addresses in the application data address mapping table with the addresses of original HEX files of the firmware programs one by one, generating an address comparison table index of the application data and the original HEX files based on the application data table, finally generating a HEX frame structure of the application data according to the arrangement rule of the original HEX files, and synthesizing a new executable HEX file based on the HEX frame structure of the application data and the firmware programs.
As a second aspect of the present invention, there is provided a firmware and application data integration system applied to an optical module, the system including a data acquisition module, an encoding module, and a composition module;
the data acquisition module is used for acquiring a firmware program and corresponding application data;
the encoding module is used for encoding the application data according to the encoding format of the original HEX file of the firmware program;
the synthesis module is used for synthesizing the firmware program and the coded application data into a new executable HEX file, and downloading the synthesized new HEX file to a specified single chip microcomputer through a downloader or upper computer software according to a mode of downloading the HEX file.
Further, the encoding module is specifically configured to analyze an encoding format of an original HEX file of the firmware program to obtain the encoding format of the original HEX file, and encode the application data according to an address and a data encoding manner of the original HEX file.
Further, the coded application data is stored in a table form, and includes an application data address mapping table and an application data table, where the application data table stores a mapping relationship between a table sequence number and corresponding data, and the application data address mapping table stores a mapping relationship between a table sequence number and an address.
Further, the synthesis module is specifically configured to match addresses in the application data address mapping table with addresses of original HEX files of the firmware program one by one, generate an address comparison table index of the application data and the original HEX files based on the application data table, finally generate a HEX frame structure of the application data according to an arrangement rule of the original HEX files, and synthesize a new executable HEX file based on the HEX frame structure of the application data and the firmware program.
The invention has the following beneficial effects:
the method is mainly used in the production process of the optical module firmware, firmware information and application data need to be downloaded in the existing firmware production process, and the production efficiency is low and the complexity is increased due to multiple downloads, so that the error probability is improved. The invention combines the firmware program and the application data into a unified executable file which is downloaded to the firmware at one time, thereby improving the production efficiency and reducing the risk.
Drawings
Fig. 1 is a flowchart of a firmware and application data integration method applied to an optical module according to an embodiment of the present invention;
fig. 2 is a schematic diagram of data import performed by an upper computer according to this embodiment.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the present invention, and not all embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
As shown in fig. 1, as a first embodiment of the present invention, there is provided a firmware and application data integration method applied to an optical module, the method including:
step 1, acquiring a firmware program and corresponding application data;
step 2, encoding the application data according to the encoding format of the original HEX file of the firmware program;
and 3, synthesizing the firmware program and the coded application data into a new executable HEX file, and downloading the synthesized new HEX file into a specified single chip microcomputer through a downloader or upper computer software according to a HEX file downloading mode, so as to integrate the firmware and the application data of the optical module.
As an embodiment of the present invention, a specific HEX file format and a data pattern after the integration are provided, where the HEX file format is shown in table 1 below:
Figure BDA0002936255200000041
TABLE 1
The HEX file contains 6 parts, which are: colon, length, start address, data type, data and check code, each part length and example in HEX frame format are given in table 2 below;
Figure BDA0002936255200000042
TABLE 2
In example 1, the behavior is a data frame, in which data has 5 bytes, the start address of the address allocated in the firmware is 0x0010, and the check code is 0x67;
in example 2, the frame end ends with a check code of 0xFF;
the HEX frame has several data types, as shown in table 3 below:
Figure BDA0002936255200000051
TABLE 3
The algorithm of the checksum is as follows: the cumulative sum (not counting the carry) of all 16-ary codes before the checksum is calculated.
Test sum =0x 100-cumulative sum
Table 4 below shows a simple full HEX file format (for format style presentation only):
Figure BDA0002936255200000052
TABLE 4
Preferably, the step 2 further includes analyzing the encoding format of the original HEX file of the firmware program to obtain the encoding format of the original HEX file, and the encoding of the application data by using the encoding format of the original HEX file of the firmware program in the step 2 is specifically: and encoding the application data according to the address and the data encoding mode of the original HEX file.
Preferably, in step 2, the encoded application data is stored in a form of a table, including an application data address mapping table and an application data table, where the application data table stores a mapping relationship between a table number and corresponding data, and the application data address mapping table stores a mapping relationship between a table number and an address.
The application data table is shown in table 5 below, where the application data is generated based on the optical module, and is a table according to a protocol corresponding to 128 bytes, so that the application data is divided into N data tables, where 128 bytes are one segment.
Figure BDA0002936255200000061
TABLE 5
The above is an application data storage format, each table is 128 bytes, and storage and address allocation are performed according to the sequence of table sequence numbers. The method can increase and decrease application data according to requirements, is flexible in distribution, can be suitable for optical modules with various rates, can be adjusted according to protocols and application requirements, and can be adjusted according to the corresponding rear address mapping.
The application data address lookup table is shown in table 6 below:
Figure BDA0002936255200000062
TABLE 6
The above is an application data address mapping table, the addresses in the table are matched with the addresses in the firmware program, and the number and definition of the table are matched with the application data table.
Preferably, step 3 is specifically: matching addresses in the application data address mapping table with addresses of original HEX files of the firmware programs one by one, generating address comparison table indexes of the application data and the original HEX files based on the application data table, finally generating HEX frame structures of the application data according to the arrangement rules of the original HEX files, and synthesizing a new executable HEX file based on the HEX frame structures of the application data and the firmware programs.
According to the invention, by means of an upper computer, three import data interfaces are provided, one is an original executable file and a firmware program, the other is application data (application data coded according to a set format), and the other is application data corresponding to address information, as shown in fig. 2, an executable HEX file with application data and combining the executable file and the application data is finally generated, and then the combined HEX file is downloaded to a specified single chip microcomputer through a downloader or upper computer software according to a HEX downloading mode.
The merged file is generated by upper computer integration, and the data style of the merged file is shown in the following table 7:
Figure BDA0002936255200000071
TABLE 7
And generating a final executable HEX file after integration, and importing the file into an embedded carrier (such as a singlechip) at one time according to a HEX import mode.
As a second embodiment of the present invention, there is also provided a firmware and application data integration system applied to an optical module, the system including a data acquisition module, a coding module, and a synthesis module;
the data acquisition module is used for acquiring a firmware program and corresponding application data;
the encoding module is used for encoding the application data according to the encoding format of the original HEX file of the firmware program;
the synthesis module is used for synthesizing the firmware program and the coded application data into a new executable HEX file, and downloading the synthesized new HEX file to a specified single chip microcomputer through a downloader or upper computer software according to a mode of downloading the HEX file.
Preferably, the encoding module is specifically configured to analyze an encoding format of an original HEX file of the firmware program to obtain the encoding format of the original HEX file, and encode the application data according to an address and a data encoding mode of the original HEX file.
Preferably, the encoded application data is stored in a table form, and includes an application data address mapping table and an application data table, where the application data table stores a mapping relationship between a table sequence number and corresponding data, and the application data address mapping table stores a mapping relationship between a table sequence number and an address.
Preferably, the synthesis module is specifically configured to match addresses in the application data address mapping table with addresses of original HEX files of the firmware program one by one, generate an address comparison table index of the application data and the original HEX files based on the application data table, finally generate a HEX frame structure of the application data according to an arrangement rule of the original HEX files, and synthesize a new executable HEX file based on the HEX frame structure of the application data and the firmware program.
The above description is only for the purpose of illustrating the preferred embodiments of the present invention and should not be taken as limiting the scope of the present invention, which is intended to cover any modifications, equivalents, improvements, etc. within the spirit and scope of the present invention.

Claims (4)

1. A firmware and application data integration method applied to an optical module is characterized by comprising the following steps:
step 1, acquiring a firmware program and corresponding application data;
step 2, encoding the application data according to the encoding format of the original HEX file of the firmware program;
step 3, synthesizing the firmware program and the coded application data into a new executable HEX file, and downloading the synthesized new HEX file into a specified single chip microcomputer through a downloader or upper computer software according to a mode of downloading the HEX file;
in step 2, the coded application data is stored in a table form, and the table form comprises an application data address mapping table and an application data table, wherein the application data table stores a mapping relation between a table sequence number and corresponding data, and the application data address mapping table stores a mapping relation between a table sequence number and an address;
wherein, the step 3 is specifically as follows: matching the addresses in the application data address mapping table with the addresses of original HEX files of the firmware programs one by one, generating an address comparison table index of the application data and the original HEX files based on the application data table, finally generating a HEX frame structure of the application data according to the arrangement rule of the original HEX files, and synthesizing a new executable HEX file based on the HEX frame structure of the application data and the firmware programs.
2. The method as claimed in claim 1, wherein the step 2 further includes parsing an encoding format of an original HEX file of the firmware program to obtain an encoding format of the original HEX file, and the step 2 encoding the application data in the encoding format of the original HEX file of the firmware program specifically includes: and encoding the application data according to the address and the data encoding mode of the original HEX file.
3. The system is characterized by comprising a data acquisition module, a coding module and a synthesis module;
the data acquisition module is used for acquiring a firmware program and corresponding application data;
the encoding module is used for encoding the application data according to the encoding format of the original HEX file of the firmware program;
the synthesis module is used for synthesizing the firmware program and the coded application data into a new executable HEX file, and downloading the synthesized new HEX file into a specified single chip microcomputer through a downloader or upper computer software according to a mode of downloading the HEX file;
the coded application data is stored in a form of a table, and comprises an application data address mapping table and an application data table, wherein the application data table stores a mapping relation between a table sequence number and corresponding data, and the application data address mapping table stores a mapping relation between the table sequence number and an address;
the synthesis module is specifically configured to match addresses in the application data address mapping table with addresses of original HEX files of the firmware program one by one, generate an address comparison table index of the application data and the original HEX files based on the application data table, finally generate a HEX frame structure of the application data according to an arrangement rule of the original HEX files, and synthesize a new executable HEX file based on the HEX frame structure of the application data and the firmware program.
4. The system as claimed in claim 3, wherein the encoding module is specifically configured to parse an encoding format of an original HEX file of the firmware program to obtain the encoding format of the original HEX file, and encode the application data according to an address and a data encoding manner of the original HEX file.
CN202110160239.5A 2021-02-05 2021-02-05 Firmware and application data integration method and system applied to optical module Active CN113010186B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110160239.5A CN113010186B (en) 2021-02-05 2021-02-05 Firmware and application data integration method and system applied to optical module

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110160239.5A CN113010186B (en) 2021-02-05 2021-02-05 Firmware and application data integration method and system applied to optical module

Publications (2)

Publication Number Publication Date
CN113010186A CN113010186A (en) 2021-06-22
CN113010186B true CN113010186B (en) 2023-03-21

Family

ID=76383780

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110160239.5A Active CN113010186B (en) 2021-02-05 2021-02-05 Firmware and application data integration method and system applied to optical module

Country Status (1)

Country Link
CN (1) CN113010186B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113849245B (en) * 2021-09-23 2023-09-12 武汉深之度科技有限公司 Application program running method, computing device and storage medium

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1811961A (en) * 2006-01-27 2006-08-02 肖辉 MP3 file generating method and playing method for generated MP3 file
CN104424105A (en) * 2013-08-26 2015-03-18 华为技术有限公司 Memory data reading and writing processing method and device
CN105224370A (en) * 2015-10-21 2016-01-06 安一恒通(北京)科技有限公司 A kind of method and apparatus of loading ELF document
CN110045978A (en) * 2019-04-16 2019-07-23 杭州阿姆科技有限公司 A kind of firmware of different type SSD equipment unifies upgrade method and system

Family Cites Families (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8612959B2 (en) * 2011-10-03 2013-12-17 International Business Machines Corporation Linking code for an enhanced application binary interface (ABI) with decode time instruction optimization
CN103019794B (en) * 2012-12-27 2016-07-13 安徽中兴继远信息技术股份有限公司 A kind of embedded multiprogram file off-line batch programming method
CN104317618B (en) * 2014-10-24 2018-03-27 福州瑞芯微电子股份有限公司 A kind of firmware partition treating method and apparatus
CN104679507B (en) * 2015-02-05 2017-10-03 四川长虹电器股份有限公司 The generation method and device of NAND Flash programmable device burning image files
US9563446B2 (en) * 2015-04-30 2017-02-07 Microsoft Technology Licensing, Llc Binary file generation
CN105677422B (en) * 2016-01-05 2019-04-30 惠州市蓝微新源技术有限公司 The method for updating monitoring programme and application program and subsequent more new application simultaneously
CN108388435A (en) * 2018-02-10 2018-08-10 山东国金汽车制造有限公司 A method of by BootLoader and the disposable programming of application program
CN111796836A (en) * 2020-06-18 2020-10-20 徐州帝意电子有限公司 Method for modifying HEX file based on PC software and application

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1811961A (en) * 2006-01-27 2006-08-02 肖辉 MP3 file generating method and playing method for generated MP3 file
CN104424105A (en) * 2013-08-26 2015-03-18 华为技术有限公司 Memory data reading and writing processing method and device
CN105224370A (en) * 2015-10-21 2016-01-06 安一恒通(北京)科技有限公司 A kind of method and apparatus of loading ELF document
CN110045978A (en) * 2019-04-16 2019-07-23 杭州阿姆科技有限公司 A kind of firmware of different type SSD equipment unifies upgrade method and system

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
应用Excel实现教案首页自动化生成及通用表格正反向数据整合;邹宏伟;《电脑知识与技术》(第22期);202-203 *

Also Published As

Publication number Publication date
CN113010186A (en) 2021-06-22

Similar Documents

Publication Publication Date Title
CN108664239B (en) Cross-technology-stack web front-end development system and method based on micro-service
CN111858472B (en) File format conversion method, device, computer equipment and storage medium
CN111629081B (en) Internet Protocol (IP) address data processing method and device and electronic equipment
CN113010186B (en) Firmware and application data integration method and system applied to optical module
US20220200798A1 (en) Key code data burning method, device, terminal equipment and readable storage medium
CN111683066A (en) Heterogeneous system integration method and device, computer equipment and storage medium
CN115495133B (en) DBC dynamic self-adaptive updating method and device, electronic equipment and storage medium
CN111563075B (en) Service verification system, method and equipment and storage medium
EP2219117A1 (en) A processing module, a device, and a method for processing of XML data
CN109120477A (en) Dynamic analysis method, apparatus, server and storage medium based on modbus agreement
CN113626512A (en) Data processing method, device, equipment and readable storage medium
CN101202736A (en) Method for realizing encoding-decoding in communication network
US7890548B2 (en) Automation process system and method to upgrade from non-unicode transformation support to unicode data transformation support
CN111901453A (en) Identification generation method and device, computer equipment and storage medium
KR20190088112A (en) Method for transforming data for low volume transmission of meta model base protocol which monitors power amount data of new recycle energy, and data transmitting system for low volume transmission of meta model base protocol which monitors power amount data of new recycle energy
CN115276889B (en) Decoding processing method, decoding processing device, computer equipment and storage medium
CN116775599A (en) Data migration method, device, electronic equipment and storage medium
CN112486885B (en) Data frame generation method, storage medium and computer equipment
CN115048920A (en) Front-end data exporting method, device, equipment and storage medium
CN113890541A (en) Data compression method and system, computer readable storage medium
KR100968083B1 (en) Method and devices for encoding/decoding structured documents, especially xml documents
CN112416315A (en) CSS code compression method, electronic device and storage medium
CN113094040B (en) Applet compiling method and device
CN115834605B (en) Data acquisition method, device, equipment and storage medium
CN110087155A (en) Coding control method, device, communication equipment and storage medium in PON

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
GR01 Patent grant
GR01 Patent grant