CN100371908C - Method for correcting ROM code in embedded system - Google Patents

Method for correcting ROM code in embedded system Download PDF

Info

Publication number
CN100371908C
CN100371908C CNB2005100257026A CN200510025702A CN100371908C CN 100371908 C CN100371908 C CN 100371908C CN B2005100257026 A CNB2005100257026 A CN B2005100257026A CN 200510025702 A CN200510025702 A CN 200510025702A CN 100371908 C CN100371908 C CN 100371908C
Authority
CN
China
Prior art keywords
rom
code
function
embedded system
ram
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CNB2005100257026A
Other languages
Chinese (zh)
Other versions
CN1862509A (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.)
Xiamen Ziguang exhibition Rui Technology Co. Ltd.
Original Assignee
Spreadtrum Communications Shanghai 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 Spreadtrum Communications Shanghai Co Ltd filed Critical Spreadtrum Communications Shanghai Co Ltd
Priority to CNB2005100257026A priority Critical patent/CN100371908C/en
Publication of CN1862509A publication Critical patent/CN1862509A/en
Application granted granted Critical
Publication of CN100371908C publication Critical patent/CN100371908C/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Stored Programmes (AREA)

Abstract

The present invention discloses a modifying method for ROM codes in an embedded system. A plurality of comparators are realized on a bus of a program. When the output of some a comparator is true, a function which is to be modified in the current ROM is invoked. In the process of interrupting a service process, the modified function can be invoked to replace the function in the ROM. The present invention can effectively reduce the used space of RAM when the ROM code is modified.

Description

The amending method of ROM code in a kind of embedded system
Technical field
The present invention relates to the modification and the upgrade technique of firmware code in the embedded system, particularly relate to a kind of amending method of ROM code.
Background technology
The composition of firmware in the embedded system (firmware) code usually is divided into two parts, is put into the ROM district behind a part of code compile, puts the RAM district behind another part code compile into.In the time will making some modification (patch installing), then must put the code that will revise in the ROM district and correlative code recompility in the RAM district into the code in ROM district.The shortcoming of this amending method is, because the RAM in the embedded system is fewer usually, must take more ram space when revising ROM.
Summary of the invention
The technical problem to be solved in the present invention provides the amending method of ROM code in a kind of embedded system, and it can reduce employed ram space when revising ROM.
For solving the problems of the technologies described above, the amending method of ROM code is in the embedded system of the present invention, in the code call process of program, realize a plurality of comparers, each comparer comparison be the address of certain function that will revise in the address of the current institute of program invoke code and the ROM space, when some comparers are output as true time, system then can stop current program run, and sends and interrupt to system, in interrupt service routine, can call amended function and replace function among the ROM.
Adopt method of the present invention,, illustrate that the function that will revise among the current ROM has been called, in interrupt service routine, can call amended function and replace function among the ROM when some comparers are output as true time.Can effectively reduce employed ram space when revising ROM like this.
Description of drawings
The present invention is further detailed explanation below in conjunction with accompanying drawing and embodiment.
Fig. 1 is traditional method synoptic diagram to the ROM code revision;
Fig. 2 is the realization block diagram to the ROM code revision that the present invention adopts.
Embodiment
Ram space in the embedded system is fewer usually, the objective of the invention is the ram space that uses when revising ROM in order to reduce.
As shown in Figure 1, set, there is principal function Main () code area of RAM, and there is function F unc1 () the ROM code area, Func2 (), Func3 ().Assumed function Func3 has problem now, needs patch installing.Traditional way is that a function F unc3_patch () who revises back (after beating patch) proposes to be put into the RAM district from the ROM district, and the function F unc1 of direct and indirect call function F unc3 and Func2 are proposed to be put into the RAM district from the ROM district.Will inevitably take a lot of RAM storage spaces like this, make originally, can not bring into play its due resource effect with regard to less ram space.
In the present invention, in the code call process of program, realized a plurality of comparers, each comparer comparison be the address of certain function that will revise in the address of the current institute of program invoke code and the ROM space.
As shown in Figure 2, wherein whether the current code operation address Paddr that constantly relatively reads from RAM or ROM of address comparator equals Func3.When it is output as true time, illustrate that the Func3 function has been called among the current ROM, system then can stop current program run, and sends interruption to system.In interrupt service routine, can call amended Func3_patch function and replace Func3 function among the ROM.

Claims (1)

1. the amending method of ROM code in the embedded system, it is characterized in that: in the code call process of program, realize a plurality of comparers, each comparer comparison be the address of certain function that will revise in the address of the current institute of program invoke code and the ROM space, when some comparers are output as true time, system then can stop current program run, and send to interrupt to system, in interrupt service routine, can call amended function and replace function among the ROM.
CNB2005100257026A 2005-05-10 2005-05-10 Method for correcting ROM code in embedded system Active CN100371908C (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CNB2005100257026A CN100371908C (en) 2005-05-10 2005-05-10 Method for correcting ROM code in embedded system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CNB2005100257026A CN100371908C (en) 2005-05-10 2005-05-10 Method for correcting ROM code in embedded system

Publications (2)

Publication Number Publication Date
CN1862509A CN1862509A (en) 2006-11-15
CN100371908C true CN100371908C (en) 2008-02-27

Family

ID=37389943

Family Applications (1)

Application Number Title Priority Date Filing Date
CNB2005100257026A Active CN100371908C (en) 2005-05-10 2005-05-10 Method for correcting ROM code in embedded system

Country Status (1)

Country Link
CN (1) CN100371908C (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20020170050A1 (en) * 2001-03-14 2002-11-14 General Instrument Corporation Methods and apparatus for upgrading firmware in an embedded system
US20030018842A1 (en) * 2001-07-19 2003-01-23 Donald Harbin Interrupt controller
CN1464386A (en) * 2002-06-25 2003-12-31 联想(北京)有限公司 Method for realizing flush type system firmware program online updating
CN1495610A (en) * 2002-09-13 2004-05-12 国际商业机器公司 Method and device for firmware renewal
US20050044314A1 (en) * 2003-08-21 2005-02-24 International Business Machines (Ibm) Corporation Method and apparatus for managing inventory and door status during firmware update of an automated data storage library

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20020170050A1 (en) * 2001-03-14 2002-11-14 General Instrument Corporation Methods and apparatus for upgrading firmware in an embedded system
US20030018842A1 (en) * 2001-07-19 2003-01-23 Donald Harbin Interrupt controller
CN1464386A (en) * 2002-06-25 2003-12-31 联想(北京)有限公司 Method for realizing flush type system firmware program online updating
CN1495610A (en) * 2002-09-13 2004-05-12 国际商业机器公司 Method and device for firmware renewal
US20050044314A1 (en) * 2003-08-21 2005-02-24 International Business Machines (Ibm) Corporation Method and apparatus for managing inventory and door status during firmware update of an automated data storage library

Also Published As

Publication number Publication date
CN1862509A (en) 2006-11-15

Similar Documents

Publication Publication Date Title
US9880875B2 (en) Apparatus and method for hardware-based task scheduling
CN100445952C (en) Software version update method and device in communication equipment
US20020086688A1 (en) Method for processing messages in a cellular base station system
US20040267833A1 (en) Method and system for updating versions of content stored in a storage device
EP1679593A3 (en) Migration system
CN110837389A (en) Equipment upgrading method and device, Internet of things equipment and storage medium
WO2008040662A3 (en) Method for the computer-assisted optimization of the resource utilization of a program
CN114115990A (en) Program migration method, system and storage medium for dynamic and static combined binary translation
CN103324716B (en) A kind of application database update method based on Android system
CN100371908C (en) Method for correcting ROM code in embedded system
CN100371909C (en) Method for correcting ROM code in embedded system
CN103077066B (en) A kind of method and system of embedded product key message when compiling
CN102591684A (en) Software updating method
CN102779060A (en) Multi-time compression/decompression method of application program
CN110704528A (en) Data processing method capable of automatic identification and configuration conversion
CN111596970A (en) Dynamic library delay loading method, device, equipment and storage medium
CN102065524B (en) Energy-saving control method and device of base station between two radio network controllers
CN100596126C (en) A wireless packet domain gateway performance self-adapting method and device
CN101916187B (en) Method for implementing command-line interface
CN102843707A (en) Communication method of BBU (Building Base band Unit) and RRU (Radio Remote Unit) and base station
CN106502629B (en) Initramfs firmware Compilation Method and system based on openwrt translation and compiling environment
CN101510178A (en) Method and system for implementing terminal equipment self start-up on computer
CN101566956A (en) Method for interrupting overtime task by using timer
CN104375863A (en) Program online upgrading method in embedded system
US8010814B2 (en) Apparatus for controlling power management of digital signal processor and power management system and method using the same

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
TR01 Transfer of patent right
TR01 Transfer of patent right

Effective date of registration: 20161223

Address after: 361015 Xiamen torch hi tech Zone, Park Park, real estate industry building, Room 201, Fujian

Patentee after: Xiamen Ziguang exhibition Rui Technology Co. Ltd.

Address before: 201203 Shanghai City Songtao road Pudong Zhangjiang hi tech Park No. 696 3-5

Patentee before: Spreadtrum Communications (Shanghai) Co.,Ltd.