CN101201791A - Method and system for developing and debugging application program - Google Patents

Method and system for developing and debugging application program Download PDF

Info

Publication number
CN101201791A
CN101201791A CNA2007100767259A CN200710076725A CN101201791A CN 101201791 A CN101201791 A CN 101201791A CN A2007100767259 A CNA2007100767259 A CN A2007100767259A CN 200710076725 A CN200710076725 A CN 200710076725A CN 101201791 A CN101201791 A CN 101201791A
Authority
CN
China
Prior art keywords
application program
exploitation
memory headroom
memory
debugging
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.)
Granted
Application number
CNA2007100767259A
Other languages
Chinese (zh)
Other versions
CN100576187C (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.)
Shenzhen Coship Electronics Co Ltd
Original Assignee
Shenzhen Coship 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 Shenzhen Coship Electronics Co Ltd filed Critical Shenzhen Coship Electronics Co Ltd
Priority to CN200710076725A priority Critical patent/CN100576187C/en
Publication of CN101201791A publication Critical patent/CN101201791A/en
Application granted granted Critical
Publication of CN100576187C publication Critical patent/CN100576187C/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Debugging And Monitoring (AREA)
  • Techniques For Improving Reliability Of Storages (AREA)

Abstract

The invention is applicable to the debugging technical field of software program development and provides a developing and debugging method on an applicable program and a system thereof. The method includes following steps: a memory space used for a simulated flash is distributed in the memory; developing and debugging are realized by the data exchange between the application program and the memory space. A memory simulated flash is adopted by the embodiment of the invention, writing and reading speed is high, the application program is convenient to be debugged and the speed of the developing and debugging of the application program is improved.

Description

A kind of exploitation adjustment method and system of application program
Technical field
The invention belongs to software program development debugging field, relate in particular to a kind of exploitation adjustment method and system of application program.
Background technology
Flash memory (F1ash Memory) but owing to have characteristics such as non-volatile, electric erasable overprogram and high density, low-power consumption, be widely used in the data storage devices such as mobile phone, MP3, digital camera, notebook computer.
At present nearly all embedded system all with flash memory as memory device; for not only writing in the flash memory together program but also user data, economize on hardware cost application producer goes; in order to realize power down protection; application program has to often flash content be detected, so that recover original user data as much as possible.
At present, mostly adopt real these application programs of flash memory exploitation debugging, adopting emulator application program to be downloaded on the concrete chip system on the embedded system, by reading and writing the problem in the real flash memory discovery application program, yet, had a strong impact on development progress because the restriction of hardware causes the read-write of flash content very slow.In addition, the speed that not only downloads is slow, and more serious problem is that the read-write of flash memory, erasing speed are slow, inconvenient debugging, debug (debug) interface that a lot of embedded type debugging instruments are friendly without comparison, the information that can only need by a large amount of printf statement output.And, necessary embedded platform and often will spend than higher cost with the supporting embedded type debugging instrument of platform, and the commissioning device of lazy weight has a strong impact on the development progress of built-in application program.
Summary of the invention
The purpose of the embodiment of the invention is to provide a kind of exploitation adjustment method of application program, is intended to solve prior art and adopts the slow-footed problem of true flash memory exploitation debugging utility.
The embodiment of the invention is achieved in that a kind of exploitation adjustment method of application program, comprises the steps: to divide in internal memory the memory headroom that is used in the simulation flash memory; Application program and memory headroom carry out data interaction and realize the exploitation debugging.
Another purpose of the embodiment of the invention is to provide a kind of exploitation debug system of application program, comprising: the memory headroom distribution module is used for dividing the memory headroom that is used in the simulation flash memory at internal memory; And the application development debugging module, be used to make application program and memory headroom to carry out data interaction and realize the exploitation debugging.
The embodiment of the invention is used to simulate flash memory by distribute a part of memory headroom in internal memory, makes the direct and memory headroom of application program develop debugging alternately, has accelerated the exploitation debugging speed of application program, and has realized that simply access speed is fast.
Description of drawings
Fig. 1 is the process flow diagram of the exploitation adjustment method of embodiment of the invention application program;
Fig. 2 is the exploitation adjustment method of embodiment of the invention application program is carried out the application program debugging in PC a synoptic diagram;
Fig. 3 is the synoptic diagram of the exploitation debug system of embodiment of the invention application program.
Embodiment
For the purpose, technical scheme and the advantage that make the embodiment of the invention is clearer,, the present invention is further elaborated below in conjunction with drawings and Examples.Should be appreciated that specific embodiment described herein only in order to explanation the present invention, and be not used in qualification the present invention.
The present invention is by dividing the memory headroom that is used in the simulation flash memory in internal memory; in hard disk, create the power down protection file of simulation flash memory; thereby realized utilizing internal memory and fixed disk file simulation flash memory to carry out the program development debugging; adopt true flash memory to carry out the method for program development debugging compared to existing technology; exploitation debugging speed of the present invention is faster, and realizes simple.
As shown in Figure 1, the exploitation adjustment method of embodiment of the invention application program may further comprise the steps:
In step S101, in internal memory, divide the memory headroom that is used in the simulation flash memory, the flash memory space equal and opposite in direction that the size of this memory headroom and application program will be visited;
In hard disk or other Nonvolatile memory devices, create the power down protection file (as the file of file flash.dat by name) of simulation flash memory, and write initialized dummy status data to memory headroom by this power down protection file, make the original state of memory headroom when developing for the first time debugging for empty; Certainly, also can be but directly write the dummy status data to memory headroom not by the power down protection file, so the power down protection file also can be created after the application program first time has been debugged;
In step S102, during application program launching, check whether the power down protection file that is used to simulate flash memory in the hard disk exists, and does not create in step S103 if do not exist then, continues execution in step S104 if exist;
In step S103, in hard disk, create the power down protection file of simulation flash memory, then execution in step S104.
In step S104, in the memory headroom that distributes, develop debugging utility, it mainly comprises following three kinds of operations (please in the lump with reference to figure 2):
Read operation: when application program need be visited flash memory, reading of data from memory headroom; When if application program need be visited flash memory once more after system's power down, the file system of internal memory by PC read the content of the file of simulation flash memory power down protection in the hard disk in the corresponding memory headroom, application program can be from memory headroom reading of data.
Erase operation: the data of preserving when flash memory dispatches from the factory are complete 1, just 0xFF is the original state of all bytes, this moment, the inside, space of this byte write any data in the past, in case this byte has been write as 0x00, adopt write operation just can't make it become the data of other any byte, just become 0xFF after having only monoblock to wipe, so the data that the memory headroom of simulation flash memory be wiped the needs of correspondence all are set to 0xFF when wiping.
Write operation: write operation can only become 0 from 1 with data bit in the real flash memory, and can not become 1 from 0, if requiring certain flash block can use again, must carry out erase operation and the content of whole flash block could be become 1 from 0, write operation to true flash memory is to cause the overall slower most important reason of the true flash memory of application access, real flash drive all must write four earlier when writing the data of each, the data that the programming byte of five byte instructions could will write are delivered on the data bus of flash memory, also to wait end check results to be programmed afterwards, will go up tens times slowly so the velocity ratio that writes is read; And the embodiment of the invention only need judge whether the byte of the data in the corresponding memory headroom was 0xFF entirely before assignment, then can think if not 0xFF to write failure, and can point out mistake this moment, if 0xFF can be defaulted as and write success;
In step S105, for the memory headroom that makes the simulation flash memory has the function of outage memory, before application program withdraws from, the content of the memory headroom of the correspondence file system by PC is write the power down protection file, when treating the initialization of next application program debugging, the data in the power down protection file are read memory headroom again; The situation that can also cause the flash memory space content to be damaged with the sudden power of simulation embedded system to power down protection file write error data in addition is with the function of the automatic restoring user data of start of test application.
For the exploitation adjustment method that proves embodiment of the invention application program fast than prior art speed, the method test log flash memory file system (JournallingFlash File System, the embodiment of garbage reclamation function JFFS) that adopt the true flash memory and the embodiment of the invention below will be provided.
JFFS is a kind of Journaling File System of increasing income, be suitable for being placed on the flash chip, its garbage reclamation functional requirement be no more than under the situation of power system capacity that flash memory space wants can be recycling, as follows successively such as operation in the flash memory space of a 1.5M byte capacity to a 1M byte file: create, write the 1M byte content, close, delete, create again, write the 1M byte content ..., so repeating will to guarantee to circulate, flash memory still has living space and can utilize after 1000 times.If on real flash memory, the flash memory storage sheet of joining S29GL064A90T such as the ST5100 chip, move test and needed to surpass 10 hours time, and adopt the method for the embodiment of the invention owing to adopt internal memory simulation flash memory, the speed of reading and writing and erase operation is all very fast, and test only spends the time less than 1 minute.
The exploitation debug system of embodiment of the invention application program is described below with reference to Fig. 3.
In the exploitation debug system of the application program of the embodiment of the invention, memory headroom distribution module 11 is divided the memory headroom that is used in the simulation flash memory, the flash memory space equal and opposite in direction that the size of memory headroom and application program will be visited in internal memory 1.
Document creation module 15 is created the power down protection file (as the file of file flash.dat by name) of simulation flash memory in hard disk 3, the power down protection file writes initialized dummy status data to memory headroom, makes the memory headroom original state first time for empty.
File checking module 17 is created the back that finishes in document creation module 15 and is checked whether the power down protection file in the hardware exists, if do not exist circular document creation module 15 to create once more.
Application development debugging module 30 is used for realizing with the data interaction of memory headroom the exploitation debugging of application program.
The read operation module 301 of application development debugging module 30 is used for reading the data of memory headroom, erase operation module 303 is used for that the data of memory headroom are all put 1 and realizes erase operation, write operation judge module 305 is by judging that whether byte in the memory headroom was complete 1 to judge and write whether success before assignment, when the byte in the memory headroom was complete 1 the time, prove the write operation success before assignment.
The power down protection module 307 of application development debugging module 30 writes the data in the memory headroom simulation flash memory power down protection file in the hard disk before application program withdraws from; therefore; when application program need be visited flash memory once more; the content of the simulation flash memory power down protection file in the hard disk read in the internal memory get final product, realized power-down protection.
The data recovery test module 309 of application development debugging module 30 is used for the function by the automatic restoring user data of start of write error data test application program.
It is pointed out that document creation module 15 can create the power down protection file immediately after memory headroom distribution module 11 distributes memory headroom, also can establishment after application development debugging module 30 finish application program debugging for the first time.When creating the power down protection file after the application program debugging first time, can adopt alternate manner to assign the back and write initialized dummy status data to it at memory headroom, make the original state of memory headroom before test for the first time for empty.
The exploitation modulator approach of the application program of the embodiment of the invention and system are by internal memory and file simulation flash memory, implementation method is simple, access speed is fast, not only save the considerable time for the exploitation of built-in application program, and the emulator that has used when having saved embedded system development, therefore allow concurrent development application program under the situation of resource-constrained, guarantee that product goes on the market as early as possible.
The above only is preferred embodiment of the present invention, not in order to restriction the present invention, all any modifications of being done within the spirit and principles in the present invention, is equal to and replaces and improvement etc., all should be included within protection scope of the present invention.

Claims (10)

1. the exploitation adjustment method of an application program is characterized in that, described method comprises the steps:
In internal memory, divide the memory headroom that is used in the simulation flash memory;
Described application program and described memory headroom carry out data interaction and realize the exploitation debugging.
2. the exploitation adjustment method of application program as claimed in claim 1 is characterized in that, described application program and described memory headroom carry out data interaction and realize that the step of exploitation debugging comprises:
Described application program reads the read operation of the described data in the described memory headroom;
Described application program is all put described data 1 erase operation; With
Comprise and judge that whether described data were complete 1 the write operation of writing successfully determining step before assignment.
3. the exploitation adjustment method of application program as claimed in claim 1 is characterized in that, the described step of the memory headroom that is used in the simulation flash memory of dividing in internal memory further comprises:
In Nonvolatile memory devices, create the power down protection file, write initialization dummy status data to memory headroom.
4. the exploitation adjustment method of application program as claimed in claim 3 is characterized in that, described application program and described memory headroom carry out data interaction and realize that the step of exploitation debugging further comprises:
Before described application program withdraws from, the data in the described memory headroom are write described power down protection file;
In the initialization procedure when described application program is developed debugging next time, the content of described power down protection file is read in described memory headroom.
5. the exploitation adjustment method of application program as claimed in claim 1 is characterized in that, described application program and described memory headroom carry out data interaction and realize that the step of exploitation debugging further comprises:
In Nonvolatile memory devices, create the power down protection file;
Before described application program withdraws from, the data in the described memory headroom are write described power down protection file;
In the initialization procedure of described application program exploitation next time debugging, the content of described power down protection file is read in described memory headroom.
6. as the exploitation adjustment method of any described application program of claim 3 to 5, it is characterized in that, comprise after the step of described establishment power down protection file:
By misdata being write described power down protection file, test the automatic restore data function of start of described application program.
7. the exploitation debug system of an application program is characterized in that, described system comprises:
The memory headroom distribution module is used for dividing the memory headroom that is used in the simulation flash memory at internal memory; And
The application development debugging module is used to make described application program and described memory headroom to carry out data interaction and realizes the exploitation debugging.
8. the exploitation debug system of application program as claimed in claim 7 is characterized in that, described application development debugging module comprises:
The read operation module is used for reading the described data of described memory headroom;
The erase operation module is used for described data are all put 1; With
The write operation judge module is used to judge that whether described data were complete 1 before assignment, when described data are full write operation success 1 time before assignment.
9. the exploitation debug system of application program as claimed in claim 7 is characterized in that, described application development debugging module further comprises:
The document creation module is used for creating the power down protection file at Nonvolatile memory devices; And
The power down protection module is used for before described application program withdraws from the described data of internal memory are write described power down protection file.
10. the exploitation debug system of application program as claimed in claim 9 is characterized in that, described application development debugging module further comprises:
Data are recovered test module, are used for by misdata being write described power down protection file, test the automatic restore data function of start of described application program.
CN200710076725A 2007-08-28 2007-08-28 A kind of exploitation adjustment method and system of application program Expired - Fee Related CN100576187C (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN200710076725A CN100576187C (en) 2007-08-28 2007-08-28 A kind of exploitation adjustment method and system of application program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN200710076725A CN100576187C (en) 2007-08-28 2007-08-28 A kind of exploitation adjustment method and system of application program

Publications (2)

Publication Number Publication Date
CN101201791A true CN101201791A (en) 2008-06-18
CN100576187C CN100576187C (en) 2009-12-30

Family

ID=39516965

Family Applications (1)

Application Number Title Priority Date Filing Date
CN200710076725A Expired - Fee Related CN100576187C (en) 2007-08-28 2007-08-28 A kind of exploitation adjustment method and system of application program

Country Status (1)

Country Link
CN (1) CN100576187C (en)

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101576860B (en) * 2009-06-11 2011-06-08 成都市华为赛门铁克科技有限公司 Detection method and detection system of linux or windows operation system
CN104679592A (en) * 2013-12-02 2015-06-03 北京兆易创新科技股份有限公司 Method and system for dynamically distributing resources in microcontroller unit MCU
CN105446907A (en) * 2014-07-31 2016-03-30 展讯通信(上海)有限公司 Memory space management system and mobile terminal
CN106951350A (en) * 2017-03-30 2017-07-14 努比亚技术有限公司 The inspection method and device of a kind of mobile terminal disk
CN112231110A (en) * 2020-12-14 2021-01-15 深圳市芯天下技术有限公司 Method and device for improving simulation efficiency of nonvolatile memory, storage medium and terminal

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101576860B (en) * 2009-06-11 2011-06-08 成都市华为赛门铁克科技有限公司 Detection method and detection system of linux or windows operation system
CN104679592A (en) * 2013-12-02 2015-06-03 北京兆易创新科技股份有限公司 Method and system for dynamically distributing resources in microcontroller unit MCU
CN105446907A (en) * 2014-07-31 2016-03-30 展讯通信(上海)有限公司 Memory space management system and mobile terminal
CN105446907B (en) * 2014-07-31 2019-09-24 展讯通信(上海)有限公司 A kind of storage space management system and mobile terminal
CN106951350A (en) * 2017-03-30 2017-07-14 努比亚技术有限公司 The inspection method and device of a kind of mobile terminal disk
CN106951350B (en) * 2017-03-30 2021-08-03 努比亚技术有限公司 Method and device for checking mobile terminal disk
CN112231110A (en) * 2020-12-14 2021-01-15 深圳市芯天下技术有限公司 Method and device for improving simulation efficiency of nonvolatile memory, storage medium and terminal

Also Published As

Publication number Publication date
CN100576187C (en) 2009-12-30

Similar Documents

Publication Publication Date Title
US20080089161A1 (en) Method for testing flash memory power loss recovery
KR101969883B1 (en) Data storage device and operating method thereof
CN100461105C (en) Update and repair method of intellectualized equipment and system thereof
CN100474268C (en) Cache integrity apparatus, systems, and methods
CN100576187C (en) A kind of exploitation adjustment method and system of application program
KR20080084082A (en) Memory card and memory system including the same and operating method thereof
CN104423888A (en) Data writing method, memory control circuit unit and memory storage device
CN102841802A (en) Software upgrading method for mobile terminal
CN102592670B (en) Method for writing data, Memory Controller and memorizer memory devices
CN105512031A (en) Mobile terminal and automatic test method
CN108694052B (en) Firmware upgrading method, firmware upgrading device and firmware upgrading system
CN110931075B (en) Reconfigurable analog system and method of testing firmware of a memory device
CN104461859A (en) Emulator and method for supporting NVM soft breakpoint debugging
CN102446137B (en) Method for writing data, Memory Controller and memorizer memory devices
CN116719668A (en) Automatic testing method and testing system for RAID (redundant array of independent disks) of NVMe (non-volatile media management) solid-state disk group
US20060069848A1 (en) Flash emulation using hard disk
TWI493341B (en) Memory storage device and repairing method thereof
CN103389941A (en) Memorizer formatting method, memorizer controller and memorizer memory device
CN103577344A (en) Data writing method, memory controller and memory storage device
CN104657083A (en) Data writing method, storing device of memory, and control circuit unit of memory
CN101753352A (en) Method, system for loading business single plate and main control single plate
CN103324581A (en) Programming storage unit, data reading method, memorizer controller and storage device
CN102467460B (en) Data management method, memory controller and memory storage device
Tang et al. Flash controller design for FPGA application
CN102467459B (en) Data write method, memory controller and memory device

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C14 Grant of patent or utility model
GR01 Patent grant
CF01 Termination of patent right due to non-payment of annual fee

Granted publication date: 20091230

Termination date: 20210828

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