CN103902306A - Program solidifying method based on Ethernet - Google Patents

Program solidifying method based on Ethernet Download PDF

Info

Publication number
CN103902306A
CN103902306A CN201210575427.5A CN201210575427A CN103902306A CN 103902306 A CN103902306 A CN 103902306A CN 201210575427 A CN201210575427 A CN 201210575427A CN 103902306 A CN103902306 A CN 103902306A
Authority
CN
China
Prior art keywords
loading
packet
loaded
curing document
treat
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
CN201210575427.5A
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.)
AVIC No 631 Research Institute
Original Assignee
AVIC No 631 Research Institute
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 AVIC No 631 Research Institute filed Critical AVIC No 631 Research Institute
Priority to CN201210575427.5A priority Critical patent/CN103902306A/en
Publication of CN103902306A publication Critical patent/CN103902306A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Computer And Data Communications (AREA)

Abstract

The invention relates to a program solidifying method based on the Ethernet. The method comprises the steps of initializing an end to be loaded, establishing network connection between a loading end and the end to be loaded so as to finish synchronization, enabling the loading end to load files to be solidified to the end to be loaded, and enabling the end to be loaded to solidify the files to be solidified into a Flash storer one by one through calling a writing Flash drive program according to a file loading information table. According to the program solidifying method, the characteristic that the Ethernet is quicker in transmission speed than media such as serial ports is utilized, and the files to be solidified are loaded from the loading end to the end to be loaded quickly, so that time needed by loading files is effectively shortened, and program solidifying efficiency is improved.

Description

Program Solidification method based on Ethernet
Technical field
The invention belongs to computer software application field, be specifically related to a kind of program Solidification method based on Ethernet.
Background technology
Embedded software, after exploitation debugging, need to be cured in the Flash storer of target machine by solidification software.Solidification process, is mainly divided into and will treats that by treating that curing document is loaded into be loaded end (target machine) and to be loaded end from loading end (being generally PC) curing document writes two steps of Flash storer.To treat that curing document is loaded into and is loaded end from loading end, can adopt different transmission mediums, as serial ports, Ethernet, AFDX bus etc.Under different transmission medium conditions, spent time of file loading procedure is also different.Such as adopting serial ports as transmission medium, file transfer speed is low, in the time solidifying large file, need to expend for a long time, and curing efficiency is low.Therefore, adopt a kind of transmission medium of two-forty, can shorten the load time, improve curing efficiency.
Summary of the invention
The invention provides a kind of program Solidification method based on Ethernet, utilize Ethernet transfer rate compared with the media such as serial ports characteristic faster, to treat that curing document is loaded into and is loaded end from loading end rapidly, and effectively shorten file and load required time, improve program Solidification efficiency.
Technical solution of the present invention:
Program Solidification method based on Ethernet, its special character is: comprise the following steps:
1] be loaded end initialization:
Start the operating system, initialization files loader, startup file loading tasks, sets up PORT COM, waits for the command request receiving from loading end;
2] loading end is set up network and is connected with being loaded end, completes synchronously:
3] loading end will be treated that curing document is loaded into and be loaded end:
3.1] loading end sends multiple loading packets to being loaded end; Each loading packet comprises that a loading command word, one treat that curing document ID, one treat curing document total block data, load the corresponding current block number of packet, load valid data, valid data length and check code that packet comprises; Described check code is that loading end calculates according to valid data; According to the total block data for the treatment of curing document, correspondence is treated to curing document is divided into multiple data blocks, and with piece number to multiple data block number consecutivelies;
3.2] be loaded end and receive one by one loading packet:
3.2.1] be loaded termination and receive first and load packet, load file total block data in packet according to first receiving and treat curing document application correspondence memory space for first, obtain first and treat the start address of curing document memory headroom;
The valid data that first is loaded in packet store in the corresponding memory headroom of current block number;
The file loader that is loaded end will treat that curing document ID, memory headroom start address are written in file load information table;
3.2.2] continue to receive and load packet, judge and in current received loading packet, treat curing document ID and treat that whether curing document ID is consistent in a upper loading packet:
As treated in received loading packet, curing document ID loads and treats that curing document ID is consistent in packet with upper one, belong to a loading packet for the treatment of curing document, the valid data that comprise in received current loading packet are stored in the corresponding memory headroom of current block number;
As treated in received loading packet, curing document ID and upper one load and treat that curing document ID is inconsistent in packet, belong to the next one and treat the loading packet of curing document, be the current curing document application correspondence memory space for the treatment of according to file total block data in the current loading packet receiving, obtain the current start address for the treatment of curing document memory headroom;
Valid data in current loading packet are stored in the corresponding memory headroom of current block number institute;
The file loader that is loaded end is written to ID, the memory headroom start address for the treatment of curing document in file load information table;
Treat that the valid data total length of curing document is written to the relevant position of file load information table for upper one that accumulative total is obtained simultaneously;
3.2.3] get back to step 3.2.2], until do not receive loading packet;
3.3] return to loading command respond packet to loading end;
3.4] loading end sends programming packet:
3.4.1] loading end sends multiple programming packets to being loaded end, comprises and treat that curing document ID and corresponding Flash storer solidify address in described programming packet;
3.4.2] be loaded termination and receive after all programming packets, according to treating in each programming packet that curing document ID solidifies address by its corresponding Flash storer and adds in file load information table;
4] being loaded end calls and writes Flash driver and will treat that curing document solidifies one by one in Flash storer according to file load information table.
In step 4] also comprise afterwards checking procedure:
The curing document content for the treatment of having cured in content and the memory headroom of the curing document in Flash storer is compared one by one, and comparison result is returned to loading end.
Above-mentioned steps 1] concrete steps be
1.1] being loaded end starts the operating system;
1.2] file loader initialization, by the zero clearing of file load information table;
1.3] open a target machine socket based on connecting;
1.4] by target machine socket and its address binding;
1.5] enabling target machine socket connects;
1.6] wait for and receive loading end command request.
Above-mentioned steps 2] concrete steps be:
2.1] loading end is initialised to the socket connection that is loaded end;
2.2] loading end sends synchronization request packet to being loaded end;
2.3] be loaded termination and receive synchronization request packet, carry out synch command handling procedure, and the Information encapsulation synchronously completing is entered to synch command respond packet feed back to loading end;
2.4] loading end receives to be loaded and holds after the synch command respond packet of returning, and confirms synchronously to complete;
Also comprise that storing valid data into memory headroom carries out valid data checking procedure before:
Be loaded end and calculate an Inspection code according to valid data, Inspection code is compared with the corresponding check code loading in packet, if consistent, store valid data; If inconsistent, return to miscue to loading end.
The present invention has advantages of:
1, the present invention adopts Ethernet transmission can significantly improve program Solidification efficiency, take the binary file of solidifying a 16M size as example, adopts the curing based on serial ports, need 1 hour, and employing this method only needs 6 minutes, time shorten is to original 1/10th.
2, loading procedure of the present invention is safe and reliable, and determinacy is strong.
Accompanying drawing explanation
Fig. 1 based on Ethernet program Solidification process flow diagram.
Embodiment
The concrete implementation step of program Solidification method based on Ethernet is as follows:
Step 1: be loaded end and start the operating system, initialization files loader, startup file loading tasks, sets up PORT COM, waits for the command request receiving from loading end.
This step realization flow is as follows:
1.1) being loaded end starts the operating system;
1.2) file loader initialization, by the zero clearing of file load information table;
1.3) open a target machine socket based on connecting;
1.4) by target machine socket and its address binding;
1.5) enabling target machine socket connects;
1.6) wait for and receive loading end command request;
Step 2: loading end is set up network and is connected with being loaded end, completes synchronously.
This step realization flow is as follows:
2.1) loading end is initialised to the socket connection that is loaded end;
2.2) loading end sends synchronization request packet to being loaded end;
2.3) be loaded termination and receive synchronization request packet, carry out synch command handling procedure, and the Information encapsulation synchronously completing is entered to synch command respond packet feed back to loading end;
2.4) loading end receives to be loaded and holds after the synch command respond packet of returning, and confirms synchronously to complete.
Step 3: loading end will be treated that curing document is loaded into and be loaded end.
This step realization flow is as follows:
3.1] loading end sends multiple loading packets to being loaded end; Each loading packet comprises that a loading command word, one treat that curing document ID, one treat curing document total block data, load the corresponding current block number of packet, load valid data, valid data length and check code that packet comprises; Described check code calculates according to valid data;
3.2] be loaded end and receive one by one loading packet:
3.2.1] be loaded termination and receive first and load packet, load file total block data in packet according to first receiving and treat curing document application correspondence memory space for first, obtain first and treat the start address of curing document memory headroom;
The valid data that first is loaded in packet store in the corresponding memory headroom of current block number;
The file loader that is loaded end will treat that curing document ID, memory headroom start address are written in file load information table;
3.2.2] continue to receive and load packet, judge and in current received loading packet, treat curing document ID and treat that whether curing document ID is consistent in a upper loading packet:
As treated in received loading packet, curing document ID loads and treats that curing document ID is consistent in packet with upper one, belong to a loading packet for the treatment of curing document, the valid data that comprise in received current loading packet are stored in the corresponding memory headroom of current block number;
As treated in received loading packet, curing document ID and upper one load and treat that curing document ID is inconsistent in packet, belong to the next one and treat the loading packet of curing document, be the current curing document application correspondence memory space for the treatment of according to file total block data in the current loading packet receiving, obtain the current start address for the treatment of curing document memory headroom;
Valid data in current loading packet are stored in the corresponding memory headroom of current block number institute;
The file loader that is loaded end is written to ID, the memory headroom start address for the treatment of curing document in file load information table;
Treat that the valid data total length of curing document is written to the relevant position of file load information table for upper one that accumulative total is obtained simultaneously;
3.2.3] get back to step 3.2.2], until do not receive loading packet;
3.3] return to loading command respond packet to loading end;
3.4] loading end sends programming packet:
3.4.1] loading end sends multiple programming packets to being loaded end, comprises and treat that curing document ID and corresponding Flash storer solidify address in described programming packet;
3.4.2] be loaded termination and receive after all programming packets, according to treating in each programming packet that curing document ID solidifies address by its corresponding Flash storer and adds in file load information table;
Step 4: be loaded end and will treat that curing document solidifies into Flash verification.
Being loaded end calls and writes Flash driver and will treat that curing document solidifies one by one in Flash storer according to file load information table.
Checking procedure: treat in the content of the curing document in Flash storer and memory headroom that by having cured curing document content compares one by one, and comparison result is returned to loading end.

Claims (5)

1. the program Solidification method based on Ethernet, is characterized in that: comprise the following steps:
1] be loaded end initialization:
Start the operating system, initialization files loader, startup file loading tasks, sets up PORT COM, waits for the command request receiving from loading end;
2] loading end is set up network and is connected with being loaded end, completes synchronously;
3] loading end will be treated that curing document is loaded into and be loaded end:
3.1] loading end sends multiple loading packets to being loaded end; Each loading packet comprises that a loading command word, one treat that curing document ID, one treat curing document total block data, load the corresponding current block number of packet, load valid data, valid data length and check code that packet comprises; Described check code is that loading end calculates according to valid data;
3.2] be loaded end and receive one by one loading packet:
3.2.1] be loaded termination and receive first and load packet, load file total block data in packet according to first receiving and treat curing document application correspondence memory space for first, obtain first and treat the start address of curing document memory headroom;
The valid data that first is loaded in packet store in the corresponding memory headroom of current block number;
The file loader that is loaded end will treat that curing document ID, memory headroom start address are written in file load information table;
3.2.2] continue to receive and load packet, judge and in current received loading packet, treat curing document ID and treat that whether curing document ID is consistent in a upper loading packet:
As treated in received loading packet, curing document ID loads and treats that curing document ID is consistent in packet with upper one, belong to a loading packet for the treatment of curing document, the valid data that comprise in received current loading packet are stored in the corresponding memory headroom of current block number;
As treated in received loading packet, curing document ID and upper one load and treat that curing document ID is inconsistent in packet, belong to the next one and treat the loading packet of curing document, be the current curing document application correspondence memory space for the treatment of according to file total block data in the current loading packet receiving, obtain the current start address for the treatment of curing document memory headroom; Valid data in current loading packet are stored in the corresponding memory headroom of current block number institute; The file loader that is loaded end is written to ID, the memory headroom start address for the treatment of curing document in file load information table; Treat that the valid data total length of curing document is written to the relevant position of file load information table for upper one that accumulative total is obtained simultaneously;
3.2.3] get back to step 3.2.2], until do not receive loading packet;
3.3] return to loading command respond packet to loading end;
3.4] loading end sends programming packet:
3.4.1] loading end sends multiple programming packets to being loaded end, comprises and treat that curing document ID and corresponding Flash storer solidify address in described programming packet;
3.4.2] be loaded termination and receive after all programming packets, according to treating in each programming packet that curing document ID solidifies address by its corresponding Flash storer and adds in file load information table;
4] being loaded end calls and writes Flash driver and will treat that curing document solidifies one by one in Flash storer according to file load information table.
2. the program Solidification method based on Ethernet according to claim 1, is characterized in that: in step 4] also comprise afterwards checking procedure:
The curing document content for the treatment of having cured in content and the memory headroom of the curing document in Flash storer is compared one by one, and comparison result is returned to loading end.
3. the program Solidification method based on Ethernet according to claim 1 and 2, is characterized in that: described step 1] concrete steps be
1.1] being loaded end starts the operating system;
1.2] file loader initialization, by the zero clearing of file load information table;
1.3] open a target machine socket based on connecting;
1.4] by target machine socket and its address binding;
1.5] enabling target machine socket connects;
1.6] wait for and receive loading end command request.
4. the program Solidification method based on Ethernet according to claim 3, is characterized in that: described step 2] concrete steps be:
2.1] loading end is initialised to the socket connection that is loaded end;
2.2] loading end sends synchronization request packet to being loaded end;
2.3] be loaded termination and receive synchronization request packet, carry out synch command handling procedure, and the Information encapsulation synchronously completing is entered to synch command respond packet feed back to loading end;
2.4] loading end receives to be loaded and holds after the synch command respond packet of returning, and confirms synchronously to complete.
5. the program Solidification method based on Ethernet according to claim 4, is characterized in that: also comprise that storing valid data into memory headroom carries out valid data checking procedure before:
Be loaded end and calculate an Inspection code according to the valid data that receive, Inspection code is compared with the corresponding check code loading in packet, if consistent, store valid data; If inconsistent, return to miscue to loading end.
CN201210575427.5A 2012-12-26 2012-12-26 Program solidifying method based on Ethernet Pending CN103902306A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201210575427.5A CN103902306A (en) 2012-12-26 2012-12-26 Program solidifying method based on Ethernet

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201210575427.5A CN103902306A (en) 2012-12-26 2012-12-26 Program solidifying method based on Ethernet

Publications (1)

Publication Number Publication Date
CN103902306A true CN103902306A (en) 2014-07-02

Family

ID=50993647

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201210575427.5A Pending CN103902306A (en) 2012-12-26 2012-12-26 Program solidifying method based on Ethernet

Country Status (1)

Country Link
CN (1) CN103902306A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108170490A (en) * 2017-12-07 2018-06-15 中国航空工业集团公司西安航空计算技术研究所 A kind of IMA system datas loading framework and loading method

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108170490A (en) * 2017-12-07 2018-06-15 中国航空工业集团公司西安航空计算技术研究所 A kind of IMA system datas loading framework and loading method

Similar Documents

Publication Publication Date Title
CN103777983B (en) A kind of On-board software is safeguarded and upgrade method in-orbit
CN103777972B (en) System, configuration method based on field programmable gate array and upgrade method
US20190243635A1 (en) Firmware update in a storage backed memory package
CN106406936A (en) FPGA program multi-version management apparatus and method
CN111124433B (en) Program programming equipment, system and method
US11126382B2 (en) SD card-based high-speed data storage method
CN106843982B (en) Data processing method and device based on FPGA
CN106648758A (en) Multi-core processor BOOT starting system and method
CN112667446A (en) Data backup method and device of MLC NAND and flash memory system
CN104461660A (en) Multi-mode dynamic loading method of heterogeneous system
CN104657295A (en) System and method for controlling write speed of nonvolatile memory device
CN102495746A (en) Onboard embedded computer data loading method
CN103064800A (en) Power failure protection system and implementation method thereof
CN104484132A (en) Data reduction method and device
CN103902306A (en) Program solidifying method based on Ethernet
CN103902303A (en) Program solidifying method based on configuration table
CN105573796A (en) Function switching method and function switching device for FPGA
CN105843698A (en) Method for automatically adjusting BIOS option value
US20150278299A1 (en) External merge sort method and device, and distributed processing device for external merge sort
KR20150072963A (en) Multisystem, and method of booting the same
CN105573940B (en) A kind of automatic detection method and device of SDIO interface peripherals
CN103793250B (en) The fast and safely starter of embedded system and startup method
CN105045624A (en) PowerPC mainboard and program writing method
US20160239224A1 (en) Method and system for transferring data over a plurality of control lines
CN115268987A (en) Heterogeneous platform FPGA multi-version configuration file loading management method

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
WD01 Invention patent application deemed withdrawn after publication
WD01 Invention patent application deemed withdrawn after publication

Application publication date: 20140702