[go: up one dir, main page]

CN1265395C - Flash memory and its program planning and reprogramming method - Google Patents

Flash memory and its program planning and reprogramming method Download PDF

Info

Publication number
CN1265395C
CN1265395C CN 02141065 CN02141065A CN1265395C CN 1265395 C CN1265395 C CN 1265395C CN 02141065 CN02141065 CN 02141065 CN 02141065 A CN02141065 A CN 02141065A CN 1265395 C CN1265395 C CN 1265395C
Authority
CN
China
Prior art keywords
block
program
callback function
application program
flash memory
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
CN 02141065
Other languages
Chinese (zh)
Other versions
CN1467751A (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.)
Yogon Science & Technology Co Ltd
Original Assignee
Lite On Technology Corp
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 Lite On Technology Corp filed Critical Lite On Technology Corp
Priority to CN 02141065 priority Critical patent/CN1265395C/en
Publication of CN1467751A publication Critical patent/CN1467751A/en
Application granted granted Critical
Publication of CN1265395C publication Critical patent/CN1265395C/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Images

Landscapes

  • Stored Programmes (AREA)

Abstract

A flash memory and a program planning and repeated burning method thereof are used for burning modified application programs into a planned flash memory after compiling the application programs. The flash memory comprises a fixed program block which comprises a program which is completely burned and does not need to be modified; an application block, which contains application programs that can be modified or changed; and a callback function entry point block comprising a callback function entry point matrix. The entry point matrix records the starting address values of all callback functions in the application block when called by the fixed program. When the burning is repeated, only the program codes of the callback function entry point block and the application program block need to be burnt. Therefore, the burning efficiency can be improved, and the time of maintenance procedure can be reduced.

Description

闪存及其程序规划和重复烧录的方法Flash memory and its program planning and reprogramming method

技术领域technical field

本发明是关于一种闪存及其程序规划和重复烧录的方法,尤指一种闪存及在闪存规划出程序进入点矩阵后再在闪存中重复烧录程序的方法。The present invention relates to a flash memory and a method for program planning and repeated programming thereof, in particular to a flash memory and a method for repeatedly programming a program in the flash memory after planning a program entry point matrix in the flash memory.

背景技术Background technique

闪存是大多数手持设备用来储存操作系统的一种内存。闪存亦用于移动电话、数字像机、LAN转换器、PC卡、机顶盒和内嵌式控制器等。闪存在烧录时一次写入一整块区块,速度比一次写入一个字节的EEPROM快。新式的计算机使用闪存作为储存BIOS的组件,使BIOS可由一般使用者作更新,而不必使用特殊的烧录器(Burner)。Flash memory is a type of memory that most handheld devices use to store the operating system. Flash memory is also used in mobile phones, digital cameras, LAN converters, PC cards, set-top boxes, and embedded controllers. Flash memory writes an entire block at a time during programming, which is faster than EEPROM that writes one byte at a time. Modern computers use flash memory as a component for storing the BIOS, so that the BIOS can be updated by ordinary users without using a special burner (Burner).

随着MMI(人机接口)应用及需求的日益广泛,软件的复杂度及长度也随着增加,尤其是软件的分工及整合更是明确,对一位软件工程师来说,某一部分程序修改后,必须经由编译器将所有程序重新再编译,因此新的程序代码往往都是牵一发而动全身。With the increasing application and demand of MMI (man-machine interface), the complexity and length of software also increase, especially the division of labor and integration of software is more clear. For a software engineer, after a certain part of the program is modified , All programs must be recompiled by the compiler, so new program codes often affect the whole body.

如图1所示,一个完整的手机软件,是从上层的应用程序(如MMI应用程序)到下层部分固定程序(如:驱动程序、通讯协议程序、操作系统、字型、图文件、影像文件等)所分工完成的,当工程师修改部分应用程序时,其大部分固定程序往往是不需要变动或更改,惟有两者间需要联系时,会因为应用程序中的回呼函数经过部分修改后而改变了其起始地址,如图2所示,固定程序区块中的一程序A要联系的应用程序A’,其回呼函数经过部分修改后而改变起始地址。此时必须经由编译器将所有程序重新编译且烧录一次。从而,固定程序才能够呼叫到应用程序中的回呼程序而不会造成系统运作的不正常。但结果是,耗费了整个烧录时间,而且过程繁琐,增加研发成本。As shown in Figure 1, a complete mobile phone software is from the upper application program (such as MMI application program) to the lower part of the fixed program (such as: driver program, communication protocol program, operating system, font, image file, image file etc.), when engineers modify part of the application program, most of the fixed programs often do not need to be changed or changed, only when the two need to be linked, it will be because the callback function in the application program has been partially modified Its initial address is changed, as shown in FIG. 2 , the application program A' to be contacted by a program A in the fixed program block, its callback function is partially modified to change the initial address. At this time, all programs must be recompiled and burned once through a compiler. Therefore, the fixed program can call the callback program in the application program without causing abnormal operation of the system. But the result is that the entire burning time is consumed, and the process is cumbersome, which increases the cost of research and development.

发明内容Contents of the invention

本发明的闪存及其程序规划和重复烧录的方法,主要是在一手机软件烧录过程中,将程序进入点矩阵的概念加入到手机软件架构中,当固定程序区块中的程序需要呼叫到应用程序区块中的回呼函数时,只须进入点矩阵便可通过对照表找到回呼函数的起始地址。The method for flash memory and its program planning and repeated burning of the present invention is mainly to add the concept of program entry point matrix into the mobile phone software architecture during the burning process of a mobile phone software. When the program in the fixed program block needs to call When going to the callback function in the application program block, you only need to enter the dot matrix to find the starting address of the callback function through the comparison table.

因此,本发明的主要目的是提供一种闪存及其程序规划和重复烧录的方法,当被修改的应用程序被编译后,只需烧录回呼函数进入点区块以及应用程序点区块的程序代码即可,而固定程序区块的程序代码并不需要再重新烧录,如此可节省整个烧录时间。Therefore, the main purpose of the present invention is to provide a method for flash memory and its program planning and repeated programming. After the modified application program is compiled, only the callback function entry point block and the application program point block are burned. The program code of the fixed program block does not need to be reprogrammed, which can save the entire programming time.

本发明的又一目的是提供一种闪存及其程序规划和重复烧录的方法,就程序设计而言,将成熟且完整的程序放在内存中的固定程序区块而将正在开发或必须再维护修改部分的程序放在应用程序区块,只需将其起始地址加入到进入点矩阵,如此重复烧录过程中便可再度提升烧录的效率,也同时减少维护程序的时间。Another object of the present invention is to provide a method for flash memory and its program planning and repeated programming. As far as program design is concerned, a mature and complete program is placed in a fixed program block in the internal memory and will be under development or must be reprogrammed. The program for maintenance and modification is placed in the application program block, and its start address is only needed to be added to the entry point matrix, so that the programming efficiency can be improved again during the repeated programming process, and the time for maintaining the program can also be reduced.

根据本发明的一个方面,提供了一种闪存,通过内存的规划将该内存分成三部分,该三部分为:一固定程序区块,其中包含烧录完整且不需再修改的程序;一应用程序区块,其中包含可修改或变更的应用程序;以及一回呼函数进入点区块,其中包含一回呼函数进入点矩阵,该进入点矩阵记录在该应用程序区块内的所有回呼函数当被固定程序呼叫时的起始地址值。According to one aspect of the present invention, a kind of flash memory is provided, and the memory is divided into three parts through memory planning, and the three parts are: a fixed program block, which contains a program that is completely programmed and does not need to be modified; an application a program block, which contains the application program which can be modified or changed; and a callback function entry point block, which contains a callback function entry point matrix, which records all the callback functions in the application program block The starting address value of the function when it is called by the fixed procedure.

根据本发明的另一方面,提供一种闪存中固定程序呼叫回呼函数的方法,其中该闪存通过内存的规划将该内存分成三部分,该三部分包括一固定程序区块,其中包含烧录完整且不需再修改的程序;一应用程序区块,其中包含可修改或变更的应用程序;以及一回呼函数进入点区块,其中包含一回呼函数进入点矩阵,该进入点矩阵记录在该应用程序区块内的所有回呼函数当被固定程序呼叫时的起始地址值,该方法包括有以下步骤:a)当该固定程序区块中的一程序呼叫该应用程序区块中的回呼函数时,先到该回呼函数进入点区块寻找该回呼函数在一回呼函数对照表的一起始地址值;b)再进入在该应用程序区块的该回呼程序的一闪存起始地址。According to another aspect of the present invention, a method for calling a callback function by a fixed program in a flash memory is provided, wherein the flash memory is divided into three parts through memory planning, and the three parts include a fixed program block, which includes programming A complete program that does not need to be modified; an application program block, which contains the application program that can be modified or changed; and a callback function entry point block, which contains a callback function entry point matrix, and the entry point matrix records The initial address values of all callback functions in the application program block when called by the fixed program, the method includes the following steps: a) when a program in the fixed program block calls the application program block When the callback function, first go to the callback function entry point block to find a starting address value of the callback function in a callback function comparison table; b) then enter the callback program in the application program block A starting address of the flash memory.

根据本发明的再一方面,提供了一种闪存程序重复烧录方法,其中该闪存通过内存的规划将该内存分成三部分,该三部分包括一固定程序区块,其中包含烧录完整且不需再修改的程序;一应用程序区块,其中包含可修改或变更的应用程序;以及一回呼函数进入点区块,其中包含一回呼函数进入点矩阵,该进入点矩阵记录在该应用程序区块内的所有回呼函数当被固定程序呼叫时的起始地址值,该方法包括有步骤:将修改的一应用程序进行编译;b)将编译后的应用程序烧录在所述闪存的应用程序区块和回呼函数进入点区块中。According to yet another aspect of the present invention, a method for repeatedly programming flash memory programs is provided, wherein the flash memory is divided into three parts through memory planning. The program that needs to be modified again; an application program block, which contains the application program that can be modified or changed; and a callback function entry point block, which contains a callback function entry point matrix, and the entry point matrix is recorded in the application The initial address values of all callback functions in the program block when called by the fixed program, the method includes the steps of: compiling a modified application program; b) burning the compiled application program in the flash memory The application block and callback function of the entry point block.

较佳地,在步骤b)中,只需烧录该回呼函数进入点区块和该应用程序区块的程序代码。Preferably, in step b), it is only necessary to burn the program codes of the callback function entry point block and the application program block.

根据本发明的再另一方面,提供了一种闪存的规划方法,主要是包含如下步骤:a)将一闪存分成三部分:一固定程序区块,一应用程序区块和一回呼函数进入点区块;b)将成熟且完整的程序放在该固定程序区块;c)将正在开发或必须再维护修改部分的程序放在该应用程序区块;以及d)将回呼函数的起始地址加入到该回呼函数进入点区块的一进入点矩阵。According to still another aspect of the present invention, a kind of planning method of flash memory is provided, mainly comprises the following steps: a) a flash memory is divided into three parts: a fixed program block, an application program block and a callback function entry point block; b) put the mature and complete program in the fixed program block; c) put the program under development or need to maintain the modified part in the application block; and d) put the call-back function start The origin address is added to an entry point matrix of the callback function entry point block.

附图简述Brief description of the drawings

本发明的这些目的和其它目的、特点和优点通过以下说明配合附图对本领域的熟练技术人员将更清晰明了。These objects and other objects, features and advantages of the present invention will be more clearly understood by those skilled in the art through the following description with accompanying drawings.

图1是常规手机软件架构示意图;FIG. 1 is a schematic diagram of a conventional mobile phone software architecture;

图2是已知闪存经编译器编译新修改后的程序架构变化示意图;Fig. 2 is a schematic diagram of the change of the program structure of the known flash memory after being compiled by the compiler;

图3是依照本发明一实施例的内存规划示意图;FIG. 3 is a schematic diagram of memory planning according to an embodiment of the present invention;

图4是依照本发明一实施例的程序进入点矩阵中程序呼叫时的动作示意图;以及FIG. 4 is a schematic diagram of actions when a program is called in a program entry point matrix according to an embodiment of the present invention; and

图5是依照本发明的一实施例的程序重新编译前后,固定程序呼叫回呼函数的动作示意图。FIG. 5 is a schematic diagram of the fixed program calling a callback function before and after the program is recompiled according to an embodiment of the present invention.

具体实施方式Detailed ways

首先,请参阅图3。图3是依照本发明一实施例的内存规划示意图。由图中可知一内存被规划成三部分:固定程序区块、回呼函数进入点区块和应用程序区块,固定程序区块是存有烧录完整且不需再修改的程序,如操作系统、通讯协议、驱动程序和字型、影像、图形文件等。应用程序区块储存有需要修改或变更的应用程序(MMI)。回呼函数进入点区块则是一回呼函数进入点矩阵,此矩阵纪录了所有回呼函数的起始地址。当一回呼函数被固定程序呼叫时即是通过其起始地址进行。First, see Figure 3. FIG. 3 is a schematic diagram of memory planning according to an embodiment of the present invention. It can be seen from the figure that a memory is divided into three parts: fixed program block, callback function entry point block and application program block. System, communication protocol, driver and font, image, graphic file, etc. The application program block stores the application programs (MMI) that need to be modified or changed. The callback function entry point block is a callback function entry point matrix, which records the starting addresses of all callback functions. When a callback function is called by the fixed program, it is through its starting address.

再请参阅图4,当固定程序区块中的一固定程序A或B呼叫应用程序区块中的回呼函数A”或B”时,要分别先到回呼函数进入点区块寻找一回呼函数对照表的起始地址值A’或B’后,再进入应用程序区块中回呼函数A”或B”以完成下层固定程序呼叫的动作。因而,不管应用程序如何修改,经编译器编译后,应用程序中的回呼函数起始地址都将纪录在回呼函数进入点区块的进入点矩阵。当下层固定程序呼叫上层回呼程序时只需到此进入点矩阵便可通过对照表找出上层回呼函数的起始地址。Referring to Fig. 4 again, when a fixed program A or B in the fixed program block calls the callback function A" or B" in the application program block, it is necessary to go to the callback function entry point block to find a return respectively After calling the initial address value A' or B' of the function comparison table, enter the callback function A" or B" in the application program block to complete the action of the lower layer fixed program call. Therefore, no matter how the application program is modified, after being compiled by the compiler, the starting address of the callback function in the application program will be recorded in the entry point matrix of the callback function entry point block. When the lower-layer fixed program calls the upper-layer callback program, it is only necessary to enter the dot matrix here to find out the starting address of the upper-layer callback function through the comparison table.

最后,请参阅图5。本图是依照本发明程序重新编译前后,固定程序呼叫回呼函数的动作示意图。依照本发明,如图上代表回呼函数A”的方块的移位,当一应用程序被修改并经编译后,固定程序区块中的一固定程序A所要呼叫的应用程序区块中的一回呼函数A”会变更起始地址,而起始地址值A’亦随之改变。但是,固定程序A尚保持在原地址。所以,在此情形下,当一工程师修改应用程序并编译后,只需要烧录回呼函数进入点区块以及应用程序区块的程序代码便可,而固定程序区块的程序代码并不需要再重新烧录,如此可省下烧录固定程序区块的时间部分。Finally, see Figure 5. This figure is a schematic diagram of the action of the fixed program calling the callback function before and after the program is recompiled according to the present invention. According to the present invention, as shown in the figure representing the shift of the block of the callback function A", when an application program is modified and compiled, one of the application program blocks to be called by a fixed program A in the fixed program block The callback function A" will change the initial address, and the initial address value A' will also change accordingly. However, fixed program A remains at the original address. Therefore, in this case, when an engineer modifies the application program and compiles it, he only needs to burn the program code of the callback function entry point block and the application program block, while the program code of the fixed program block does not need Then burn again, so that the time for burning fixed program blocks can be saved.

由以上的叙述,以程序设计的观点而言,若将成熟且完整的程序放在内存中的固定程序区块,而将正在开发或必须再维护修改部分的程序放在应用程序区块。当固定程序区块中的程序需要呼叫到应用程序区块中的回呼函数时,只需将其起始地址值加入到点矩阵,如此重复烧录过程便可再度提升烧录的效率,也同时减少维护程序的时间。From the above description, from the point of view of program design, if the mature and complete program is placed in the fixed program block in the memory, the program that is under development or needs to be maintained and modified is placed in the application program block. When the program in the fixed program block needs to call the callback function in the application program block, it only needs to add its start address value to the dot matrix, so that the burning process can be repeated to improve the burning efficiency again. At the same time reduce the time for maintenance procedures.

本发明的闪存程序重复烧录方法,用在一手机软件烧录过程中实施时,将程序进入点矩阵加入到手机软件架构中,经过实际烧录测试,结果显示所需烧录时间将只为原架构烧录时间的十分之一。The method for repeatedly burning flash memory programs of the present invention is implemented in a mobile phone software burning process. The program entry point matrix is added to the mobile phone software framework. After the actual burning test, the result shows that the required burning time will be only One-tenth of the burning time of the original architecture.

以上所述的内容,仅为本发明的一较佳实施例而已,并非用来限定本发明实施的范围。故即凡依本发明的权利要求所述的形状、构造、特征所作出的等效变化与修饰,均应包括于本发明的保护范围内。The content described above is only a preferred embodiment of the present invention, and is not intended to limit the implementation scope of the present invention. Therefore, all equivalent changes and modifications made in accordance with the shapes, structures, and features described in the claims of the present invention shall be included in the protection scope of the present invention.

Claims (5)

1, a kind of flash memory, the planning by internal memory is divided into three parts with this internal memory, and this three part is:
One fixed routine block, it is complete and do not need the program revised again wherein to comprise burning;
One application program block wherein comprises the application program that can revise or change; And
One callback function inlet point block wherein comprises a callback function inlet point matrix, and this inlet point matrix is recorded in the start address value of all callback functions when being fixed call program in this application program block.
2, the method that fixed routine is called out the callback function in a kind of flash memory, wherein this flash memory is divided into three parts by the planning of internal memory with this internal memory, and this three part comprises a fixed routine block, and it is complete and do not need the program revised again wherein to comprise burning; One application program block wherein comprises the application program that can revise or change; And a callback function inlet point block, wherein comprising a callback function inlet point matrix, this inlet point matrix is recorded in the start address value of all callback functions when being fixed call program in this application program block, and this method includes following steps:
A) when the callback function in this application program block of the call program in this fixed routine block, arrive first this callback function inlet point block and seek the initial address value of this callback function at a callback function reference table;
B) enter this start address again at this callback function of this application program block.
3, a kind of flash memory program repeats method for burn-recording, and wherein this flash memory is divided into three parts by the planning of internal memory with this internal memory, and this three part comprises a fixed routine block, and it is complete and do not need the program revised again wherein to comprise burning; One application program block wherein comprises the application program that can revise or change; And a callback function inlet point block, wherein comprising a callback function inlet point matrix, this inlet point matrix is recorded in the start address value of all callback functions when being fixed call program in this application program block, and this method includes step:
A) application program that will revise compiles;
B) the burning callback function inlet point block in the application program block of described flash memory and again of the application program burning after will compiling.
4, flash memory program according to claim 3 repeats method for burn-recording, wherein in the step b), only needs the program code of this callback function inlet point block of burning and this application program block.
5, a kind of planing method of flash memory mainly is to comprise following steps:
A) flash memory is divided into three parts: a fixed routine block, an application program block and a callback function inlet point block;
B) ripe and complete program are placed on this fixed routine block;
C) will develop or must safeguard again that the program of revising part is placed on this application program block; And
D) start address of callback function is joined an inlet point matrix of this callback function inlet point block.
CN 02141065 2002-07-12 2002-07-12 Flash memory and its program planning and reprogramming method Expired - Fee Related CN1265395C (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN 02141065 CN1265395C (en) 2002-07-12 2002-07-12 Flash memory and its program planning and reprogramming method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN 02141065 CN1265395C (en) 2002-07-12 2002-07-12 Flash memory and its program planning and reprogramming method

Publications (2)

Publication Number Publication Date
CN1467751A CN1467751A (en) 2004-01-14
CN1265395C true CN1265395C (en) 2006-07-19

Family

ID=34147719

Family Applications (1)

Application Number Title Priority Date Filing Date
CN 02141065 Expired - Fee Related CN1265395C (en) 2002-07-12 2002-07-12 Flash memory and its program planning and reprogramming method

Country Status (1)

Country Link
CN (1) CN1265395C (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101782854A (en) * 2009-01-19 2010-07-21 英业达股份有限公司 Communication method and system for selecting between read-only memory modules
US10838621B2 (en) * 2018-08-14 2020-11-17 Silicon Motion, Inc. Method and flash memory controller capable of avoiding inefficient memory block swap or inefficient garbage collection
CN109656584A (en) * 2019-02-15 2019-04-19 京信通信系统(中国)有限公司 A kind of method for burn-recording and device of program

Also Published As

Publication number Publication date
CN1467751A (en) 2004-01-14

Similar Documents

Publication Publication Date Title
CN103744709B (en) patch loading method and device
CN101566839B (en) Realizing method of trapezoidal pattern embedded configuration algorithm
EP2098954B1 (en) Systems and methods for template reverse engineering
CN107577483A (en) Component engineering calls method, storage medium, equipment and the system of main works code
CN100351785C (en) Method for debuging embedded system and equipment
CN116820811B (en) RPA component variable rapid deriving and assigning method and system based on shear plate
CN107305495A (en) Realize the method and terminal of software installation packet function modification
CN1265395C (en) Flash memory and its program planning and reprogramming method
CN102999371A (en) Lua script-based human-computer interface development method and system
CN101216776A (en) A method and system for automatically creating a compilation environment
US20060143523A1 (en) Apparatus and method for debugging embedded software
CN110659022B (en) Method for automatically calling Python script based on Java
US6922735B2 (en) Management of co-processor information by integrating non-program information with program information
JP7338922B2 (en) Method and apparatus for processing and executing heterogeneous embedded tabularized motion processes
JP2001296996A (en) Automatic generating device of component and expressing method
JP2009048259A (en) Program conversion method and conversion program
TWI241481B (en) Repeated burning method of flash memory program
CN115390508A (en) Industrial control program generation method, system and storage medium
CN114936049B (en) A hot-swappable data fusion platform operator dynamic expansion method
CN106528190A (en) Cross-compiling environment establishment method for locomotive computer controller of RTEMS
CN101149700B (en) The method of realizing command display through the configuration file
CN112306576A (en) Method for modifying internal number of application program of android device
JP3457520B2 (en) Task execution control method on real-time OS
CN113342411A (en) Browser operation process automation method and system for protecting user privacy data
CN120469712B (en) Partition newly-added and partition mapping burning realization method, device, equipment and medium

Legal Events

Date Code Title Description
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
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
ASS Succession or assignment of patent right

Owner name: YUGUAN TECHNOLOGY CO., LTD.

Free format text: FORMER OWNER: GUANGBAO TECHNOLOGY CO., LTD.

Effective date: 20080215

C41 Transfer of patent application or patent right or utility model
TR01 Transfer of patent right

Effective date of registration: 20080215

Address after: Delaware

Patentee after: Yogon Science & Technology Co., Ltd.

Address before: Taiwan, China

Patentee before: Lite-On Technology Corporation

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

Granted publication date: 20060719

Termination date: 20120712