CN102819442B - A kind of method and system of embedded device program burn writing - Google Patents

A kind of method and system of embedded device program burn writing Download PDF

Info

Publication number
CN102819442B
CN102819442B CN201210268472.6A CN201210268472A CN102819442B CN 102819442 B CN102819442 B CN 102819442B CN 201210268472 A CN201210268472 A CN 201210268472A CN 102819442 B CN102819442 B CN 102819442B
Authority
CN
China
Prior art keywords
programming
card
file
embedded device
boot loader
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.)
Expired - Fee Related
Application number
CN201210268472.6A
Other languages
Chinese (zh)
Other versions
CN102819442A (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.)
ChinaGPS Co Ltd Shenzhen
Original Assignee
ChinaGPS Co Ltd Shenzhen
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 ChinaGPS Co Ltd Shenzhen filed Critical ChinaGPS Co Ltd Shenzhen
Priority to CN201210268472.6A priority Critical patent/CN102819442B/en
Publication of CN102819442A publication Critical patent/CN102819442A/en
Application granted granted Critical
Publication of CN102819442B publication Critical patent/CN102819442B/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Test And Diagnosis Of Digital Computers (AREA)
  • Testing Of Individual Semiconductor Devices (AREA)

Abstract

The present invention relates to a kind of method of embedded device program burn writing, including:It will treat that programming program file is divided into Boot loader Boot Loader and remaining the programming file being stored in SD card;Increasing changes BootLoader Open Source Codes, and the Boot Loader increased after changing are entered embedded device by cd-rom recorder programming;Boot loader utilities are run, are entered remaining programming file programming in the FLASH of embedded device using the file in SD card.The present invention also provides a kind of system of embedded device program burn writing, including Boot Loader modules(1)With programming module(2).The advantage of the invention is that:Cd-rom recorder only needs burning Boot Loader, the less influence of bad block;Programming to needed programming program can be completed by SD card;By sound and display reminding during programming, human-computer interaction is realized.

Description

A kind of method and system of embedded device program burn writing
Technical field
The present invention relates to embedded software technology field, more specifically to a kind of embedded device program burn writing Method and system.
Background technology
Embedded system is widely used in electronic equipment, such as mobile phone, palm PC, electromechanical equipment, from software respective See that the formula system of being typically embedded into is divided into:
Bootstrap:Including curing guidance code, that is, Boot codes and Boot loader, that is, Boot in firmware Loader two large divisions, wherein Boot codes are optional;
Kernel:For manage system to process, memory, device driver, file etc., decide system performance and Stability;
File system:Including root file system and build on the file system on FLASH memory devices;
User application:Specific to the application program of user.
And step essential during the program burn writing of embedded system, i.e., by binary program file write storage device In, these files frequently include above-mentioned bootstrap, kernel, root file system and application program etc..Common programming method is led to It crosses cd-rom recorder to enter Boot Loader, kernel and root file system etc. together programming in Flash, the shortcomings that this method is Programming will be caused to fail if there are bad blocks in programming region.
Invention content
The technical problem to be solved in the present invention is, in the prior art when programming region will cause to burn there are bad block Failure is write, a kind of method and system of embedded device program burn writing are provided.
The technical solution adopted by the present invention to solve the technical problems is as follows:
A kind of method of embedded device program burn writing is constructed, including:
A1)By treat programming program file be divided into Boot loader i.e. Boot Loader and be stored in SD card remaining Programming file;
A2)Increasing changes Boot Loader Open Source Codes, and the Boot Loader increased after changing are entered insertion by cd-rom recorder programming Formula equipment;The content that the Boot Loader source codes increasing changes is included to the support of SD card reading and writing data and to fat32 files system The parsing of system;The Open Source Code includes VIVI.
A3)Run Boot loader utilities, activation system;
A4)Judge with the presence or absence of programming file is treated in SD card, if it does, using the file in SD card that remaining programming is literary Part programming enters in the FLASH of embedded device, otherwise, return to step A3);Remaining described programming file includes kernel image text Part, root file system image file, root file system packet, application package and flashburn tools, then the step A4)Further packet It includes:
B1)Start flashburn tools, kernel and root file system image file are copied in memory from SD card and run;
B2)In the FLASH that All Files programming is entered to embedded device by kernel, root file system and flashburn tools.
A5)After the completion of programming, SD card is removed, restarts system.
The method of embedded device program burn writing of the present invention, step A3)And A4)Between further include:Judge current With the presence or absence of SD card in system, if it is present carry SD card, obtains the listed files in SD card, and enter step A4), it is no Then, return to step A3).
The method of embedded device program burn writing of the present invention is suitable for based on ARM9 and with the embedded of upper mounting plate Equipment during programming, can pass through sound or display reminding based on different embedded devices.
The present invention also provides a kind of system of embedded device program burn writing, including Boot Loader modules and programming Module, the Boot Loader modules are used to judge current system with the presence or absence of external SD card and when there are initial during SD card Change SD card and read file in SD card, when the file in SD card is there are during flashburn tools, start flashburn tools;The programming mould Block is used for after flashburn tools startup, and the programmings such as kernel, root file system and application program are entered to the FLASH of embedded device In.
Implement the method and system of the embedded device program burn writing of the present invention, have the advantages that:Cd-rom recorder is only Need burning Boot Loader, the less influence of bad block;Programming to needed programming program can be completed by SD card;Programming In the process by sound and display reminding, human-computer interaction is realized.
Description of the drawings
Below in conjunction with accompanying drawings and embodiments, the invention will be further described, in attached drawing:
Fig. 1 is the flow chart of the method for embedded device program burn writing in the present invention;
Fig. 2 is the structural schematic block diagram of the system of embedded device program burn writing in the present invention.
Fig. 3 is that the work of the Boot Loader modules of the system of embedded device program burn writing in the embodiment of the present invention is former Reason figure;
Fig. 4 is the fundamental diagram of the programming module of the system of embedded device program burn writing in the embodiment of the present invention.
Specific embodiment
For a clearer understanding of the technical characteristics, objects and effects of the present invention, now control attached drawing is described in detail The specific embodiment of the present invention.
Referring to Fig. 1, it is the flow chart of the method for embedded device program burn writing of the present invention, this method specifically includes following Step:A kind of method of the program burn writing of embedded device is constructed, including:
Step 11:It will treat that programming program file is divided into Boot Loader and remaining the programming file being stored in SD card;
Step 12:Increasing changes Boot Loader Open Source Codes, and the Boot Loader increased after changing are entered by cd-rom recorder programming Embedded device;
In the present embodiment, Boot Loader use Open Source Code VIVI, increase the content changed and include:SD card data are read The support write, compatibility standard SD card and SDHC cards and the parsing to fat32 file system.Due to Boot Loader files compared with It is small, when cd-rom recorder is used to carry out programming, cause the possibility of programming failure minimum because there is bad block.
Step 13:Run Boot loader utilities, normal activation system;
Step 14:Judge with the presence or absence of SD card in current system, if it is present carry SD card, obtains the text in SD card Part list, and into following step, otherwise return to step 103;
Wherein, at step 14, when there are during SD card, initialize SD card, discriminating SD first in the current system detected The type of card reads the data in SD card by address, and standard SD card is byte address, and SDHC cards are block address, and to fat32 texts The parsing of part system with reference first to the form of fat32 file system, by filename, finds the first address of file data, makees SD card module for reading and writing is transmitted to for parameter, and obtains the number of clusters of file occupancy, to determine whether file runs through.Then pass through SD card is mounted in file system by mount orders, to carry out following step.
Step 15:Judge to whether there is in SD card and treat programming file, if it does not, return to step 13, if it does, sharp It will treat that programming file programming enters in embedded device with remaining programming file in SD card;
Wherein, remaining described programming file includes kernel image file, root file system image file, root file system Packet, application package and flashburn tools, the then step 15)Further comprise:
Step 151:Start flashburn tools, kernel and root file system image file are copied in memory from SD card and transported Row;
Step 152:All Files programming is entered into embedded device by kernel, root file system and flashburn tools In FLASH.For kernel, can kernel subregion be write direct by the interface that kernel mtd is provided, for that can be incited somebody to action with file system Root file system subregion is mounted in file system, is then decompressed file packet;It, can be by replicating, deleting for application program Except command operation is realized.
Step 16:After the completion of programming, SD card is removed, restarts system.
Based on above-mentioned steps, completed by SD card and kernel, root file system are included to needed programming file, using journey The programming of sequence without treating that programming file carries out programming to these by cd-rom recorder, thus is avoided and is burnt caused by bad block Write failure.The method of the program burn writing of embedded device described in the embodiment of the present invention is suitable for based on ARM9 and with upper mounting plate Embedded device, during programming, based on different embedded devices can by sound or display reminding, it is achieved thereby that Human-computer interaction, appearance is abnormal during programming can stop programming in time, substantially increase programming quality and efficiency.
A kind of system of embedded device program burn writing is also disclosed in the embodiment of the present invention, as shown in Fig. 2, including Boot Loader modules 1 and programming module 2, wherein Boot Loader modules 1 are located in embedded system, and programming module 2 is located at SD card In.
It please refers to shown in Fig. 3, is the fundamental diagram of Boot Loader modules 1.Boot Loader modules 1 are present in embedding In embedded system, the content extremely burning of module enters the Boot Loader in embedded device, is mainly used for judging current system With the presence or absence of external SD card and when there are during SD card initialize SD card and read SD card in file, when the file in SD card It is middle there are during remaining programming file, the kernel in SD card and root file system image file are copied in memory and run, and is opened The flashburn tools in remaining programming file are moved, to carry out programming.
It please refers to shown in Fig. 4, is the fundamental diagram of programming module 2.The programming module is used to start in flashburn tools Afterwards, in the FLASH that the programmings such as kernel, root file system and application program are entered to embedded device, wherein kernel passes through kernel mtd The interface of offer writes direct kernel subregion, and root file system subregion is mounted in file system, then by file packet decompress with File system is written, and for application program, can by flashburn tools using replicating, the orders progress programming such as delete, while By display or auditory tone cues programming process during programming, to realize human-computer interaction.
The above, for those of ordinary skill in the art, can according to the technique and scheme of the present invention and technology Other various corresponding changes and deformation are made in design, and all these changes and deformation should all belong to the claim of the present invention Protection domain.

Claims (5)

  1. A kind of 1. method of embedded device program burn writing, which is characterized in that including:
    A1) it will treat that remaining programming that programming program file is divided into Boot loader Boot Loader and is stored in SD card is literary Part;
    A2) increase and change Boot Loader Open Source Codes, the Boot Loader increased after changing are entered into embedded set by cd-rom recorder programming It is standby;
    A3 Boot loader utilities, activation system) are run;
    A4) judge with the presence or absence of programming file is treated in SD card, if it does, being burnt remaining programming file using the file in SD card It is written in the FLASH of embedded device, otherwise, return to step A3);
    A5) after the completion of programming, SD card is removed, restarts system;
    Step A2) in, content that Boot Loader source codes increasing changes includes support to SD card reading and writing data and right The parsing of fat32 file system;The Open Source Code includes VIVI;
    Remaining described programming file includes kernel image file, root file system image file, root file system packet, application program Packet and flashburn tools, then the step A4) further comprise:
    B1) start flashburn tools, kernel and root file system image file are copied in memory from SD card and run;
    In B2) FLASH that All Files programming is entered to embedded device by kernel, root file system and flashburn tools.
  2. 2. the method for embedded device program burn writing according to claim 1, which is characterized in that step A3) and A4) between It further includes:Judge with the presence or absence of SD card in current system, if it is present carry SD card, obtains the listed files in SD card, and Enter step A4), otherwise, return to step A3).
  3. 3. the method for the embedded device program burn writing according to any one of claim 1-2, which is characterized in that the journey The method of sequence programming is suitable for the embedded device based on ARM9 and with upper mounting plate.
  4. 4. the method for embedded device program burn writing according to claim 3, which is characterized in that the side of described program programming Method passes through sound or display reminding during programming based on different embedded devices.
  5. 5. a kind of system of embedded device program burn writing, which is characterized in that including Boot Loader modules (1) and programming mould Block (2), the Boot Loader modules (1) are for judging current system with the presence or absence of external SD card and when there are during SD card The file in SD card and reading SD card is initialized, the programming module (2) enters embedded device for remaining programming file programming FLASH in;The BootLoader modules (1) are additionally operable to when the file in SD card is there are during remaining programming file, by kernel It is copied to root file system image file and flashburn tools is run and started in memory;The programming module (2) is additionally operable to Pass through sound or display reminding programming progress during programming.
CN201210268472.6A 2012-07-31 2012-07-31 A kind of method and system of embedded device program burn writing Expired - Fee Related CN102819442B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201210268472.6A CN102819442B (en) 2012-07-31 2012-07-31 A kind of method and system of embedded device program burn writing

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201210268472.6A CN102819442B (en) 2012-07-31 2012-07-31 A kind of method and system of embedded device program burn writing

Publications (2)

Publication Number Publication Date
CN102819442A CN102819442A (en) 2012-12-12
CN102819442B true CN102819442B (en) 2018-06-26

Family

ID=47303567

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201210268472.6A Expired - Fee Related CN102819442B (en) 2012-07-31 2012-07-31 A kind of method and system of embedded device program burn writing

Country Status (1)

Country Link
CN (1) CN102819442B (en)

Families Citing this family (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103914303A (en) * 2014-04-10 2014-07-09 福建伊时代信息科技股份有限公司 Method and device for presenting progress bars
CN104317622B (en) * 2014-10-30 2018-05-29 深圳市捷顺科技实业股份有限公司 A kind of embedded device burning program processing method and system
CN104965725B (en) * 2015-01-16 2018-06-08 北京中电兴发科技有限公司 A kind of full-automatic firmware programming method of embedded device based on SD card
CN105590072A (en) * 2015-12-18 2016-05-18 上海华测导航技术股份有限公司 Method for achieving automatic burning of embedded system
CN105653330A (en) * 2015-12-30 2016-06-08 国家电网公司 SD card based NorFlash programming system and method
CN105677429A (en) * 2016-01-14 2016-06-15 北京天诚盛业科技有限公司 Program burning method, processor and electronic circuit
CN108228281A (en) * 2018-02-07 2018-06-29 深圳怡化电脑股份有限公司 A kind of software programming method and device, embedded device
CN108334453B (en) * 2018-02-28 2021-07-20 深圳创维数字技术有限公司 File debugging method and device, terminal equipment and storage medium
CN108563452A (en) * 2018-03-09 2018-09-21 南昌市科陆智能电网科技有限公司 A kind of method and system of embedded scm automatic online programming program
CN109542466A (en) * 2018-11-15 2019-03-29 上海乐野网络科技有限公司 A method of based on the quick programming firmware of SD card

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101216773A (en) * 2008-01-09 2008-07-09 深圳国人通信有限公司 Embedded Linux system firmware downloading method and device
CN101334737A (en) * 2008-07-31 2008-12-31 深圳市同洲电子股份有限公司 Embedded equipment start-up or reset method
CN102063317A (en) * 2010-12-22 2011-05-18 Tcl集团股份有限公司 Method and system for renewedly burning application program by embedded equipment

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101216773A (en) * 2008-01-09 2008-07-09 深圳国人通信有限公司 Embedded Linux system firmware downloading method and device
CN101334737A (en) * 2008-07-31 2008-12-31 深圳市同洲电子股份有限公司 Embedded equipment start-up or reset method
CN102063317A (en) * 2010-12-22 2011-05-18 Tcl集团股份有限公司 Method and system for renewedly burning application program by embedded equipment

Also Published As

Publication number Publication date
CN102819442A (en) 2012-12-12

Similar Documents

Publication Publication Date Title
CN102819442B (en) A kind of method and system of embedded device program burn writing
CN103473067B (en) Built-in Linux subregion and data restoration method, system and system development method
TWI515735B (en) Data erasing method, memory control circuit unit and memory storage apparatus
CN104200843A (en) Flash memory burner, burning system and burning method
CN104317622A (en) Embedded device program burn processing method and system
CN101271396A (en) Electronic device and method for on-line updating firmware
CN105590072A (en) Method for achieving automatic burning of embedded system
CN101923473B (en) Embedded electronic device and method for updating firmware thereof
CN106951289A (en) A kind of online upgrading method, dsp controller and upgrade-system
CN101000553A (en) Embedded system
CN105468544B (en) Method and device for realizing power-down prevention file system and power-down prevention file system
CN105760191A (en) Embedded system equipment programming mass production method
CN102543193A (en) Flash memory recording method as well as recording equipment and system
CN102663471B (en) Based on mobile terminal safety information storage means and the system of EMMC chip
TW201250695A (en) Memory erasing method, memory controller and memory storage apparatus
CN102841802A (en) Software upgrading method for mobile terminal
CN103430178A (en) Method, apparatus and product of data updating
US20140365710A1 (en) Data storage apparatus and management method thereof
US20100153622A1 (en) Data Access Controller and Data Accessing Method
CN101581959B (en) Method and equipment for resetting single core in multicore chip
CN102207905A (en) System recovery method, storage media controller and storage system
CN110688141B (en) Firmware updating method
CN103389941A (en) Memorizer formatting method, memorizer controller and memorizer memory device
CN100440383C (en) External storing performance testing method and apparatus
CN103136234A (en) Data processing method and data processing device

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
EXSB Decision made by sipo to initiate substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant
CF01 Termination of patent right due to non-payment of annual fee

Granted publication date: 20180626

Termination date: 20200731

CF01 Termination of patent right due to non-payment of annual fee