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

Method for correcting ROM code in embedded system Download PDF

Info

Publication number
CN1862509A
CN1862509A CN 200510025702 CN200510025702A CN1862509A CN 1862509 A CN1862509 A CN 1862509A CN 200510025702 CN200510025702 CN 200510025702 CN 200510025702 A CN200510025702 A CN 200510025702A CN 1862509 A CN1862509 A CN 1862509A
Authority
CN
China
Prior art keywords
rom
function
code
embedded system
program
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
CN 200510025702
Other languages
Chinese (zh)
Other versions
CN100371908C (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 method for modifying ROM code in embedded system. It is characterized by that several comparators are implemented on bus of program, when some comparator output is true, it shows that the function to be modified in current ROM is called, in the interrupt service program the modified function can be called and substituted for function in ROM. Said invention can effectively reduce RAM space used 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, on the bus of program, realize a plurality of comparers, each comparer comparison be the address of certain function that will revise in current operation address of program 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.
Shown in figure one, to 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, on the bus of program, realized a plurality of comparers, each comparer comparison be the address of certain function that will revise in current operation address of program 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 a kind of embedded system, it is characterized in that: on the bus of program, realize a plurality of comparers, each comparer comparison be the address of certain function that will revise in current operation address of program 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 true CN1862509A (en) 2006-11-15
CN100371908C 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)

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6834384B2 (en) * 2001-03-14 2004-12-21 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
CN1200341C (en) * 2002-06-25 2005-05-04 联想(北京)有限公司 Method for realizing flush type system firmware program online updating
US7089547B2 (en) * 2002-09-13 2006-08-08 International Business Machines Corporation Firmware updating
US6996673B2 (en) * 2003-08-21 2006-02-07 International Business Machines 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
CN100371908C (en) 2008-02-27

Similar Documents

Publication Publication Date Title
US9880875B2 (en) Apparatus and method for hardware-based task scheduling
CN102981959B (en) The control method of solid-state storage device and collecting garbage action thereof
CN104899153A (en) Background application cleaning method and system
EP1679593A3 (en) Migration system
CN102981825A (en) Method and system of managing background data of mobile terminal
CN102681917A (en) Operating system (OS) and recovery method thereof
CN114115990A (en) Program migration method, system and storage medium for dynamic and static combined binary translation
CN110113852A (en) Scene lamp control method and system
CN102779191A (en) Achievement system and achievement method for my structured query language (My SQL) database smooth upgrading
CN101047670A (en) MAC address table ageing, operation method and process system thereof
CN103324716B (en) A kind of application database update method based on Android system
CN100371909C (en) Method for correcting ROM code in embedded system
CN1862509A (en) Method for correcting ROM code in embedded system
CN1801092A (en) Embedded chip and its program space extension method
CN1261893C (en) Method of renewing operating system of embedded equipment
TW200608247A (en) Method and system for updating software of a cellular phone
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
BRPI0520183A2 (en) Method to ensure intelligent user call processing
CN202954860U (en) Time correction system of engine
CN101063941A (en) Automatic total remote controlling method
CN101751330A (en) Method and device for controlling frequent resetting of embedded software
CN101916187B (en) Method for implementing command-line interface
CN109669639A (en) Bad block management method
CN101510178B (en) Method and system for implementing terminal equipment self start-up on computer

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

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.

TR01 Transfer of patent right