JP2001265620A - Program debugging system for rom - Google Patents

Program debugging system for rom

Info

Publication number
JP2001265620A
JP2001265620A JP2000080416A JP2000080416A JP2001265620A JP 2001265620 A JP2001265620 A JP 2001265620A JP 2000080416 A JP2000080416 A JP 2000080416A JP 2000080416 A JP2000080416 A JP 2000080416A JP 2001265620 A JP2001265620 A JP 2001265620A
Authority
JP
Japan
Prior art keywords
program
rom
area
ram
memory management
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.)
Pending
Application number
JP2000080416A
Other languages
Japanese (ja)
Inventor
Hideki Hayashi
秀樹 林
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.)
Kyocera Corp
Original Assignee
Kyocera 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 Kyocera Corp filed Critical Kyocera Corp
Priority to JP2000080416A priority Critical patent/JP2001265620A/en
Publication of JP2001265620A publication Critical patent/JP2001265620A/en
Pending legal-status Critical Current

Links

Landscapes

  • Debugging And Monitoring (AREA)

Abstract

PROBLEM TO BE SOLVED: To set a software breakpoint in a ROM area. SOLUTION: In this system provided with a ROM storing a program, a RAM storing at least a memory management table and the program code of the ROM area, a memory management device provided with a logical/physical address conversion function for managing the storage data of the ROM and the RAM and a control means, by writing the change instruction of program control inside the RAM area corresponding to the ROM area storing the program by the control means and setting an execution address to the RAM by using the logical/physical address conversion function of the memory management device, the software breakpoint is set in the ROM area.

Description

【発明の詳細な説明】DETAILED DESCRIPTION OF THE INVENTION

【0001】[0001]

【発明の属する技術分野】本発明は、インサーキットエ
ミュレータ(ICE)等を用いないでプログラムのデバ
ッグを行なう方式に関するものである。
The present invention relates to a system for debugging a program without using an in-circuit emulator (ICE) or the like.

【0002】[0002]

【従来の技術】従来のプログラムデバッグ方式の一つと
してソフトウエアブレークポイントデバッグ方式があ
る。このソフトウエアブレークポイントデバッグ方式
は、スイッチポイントを設定したいプログラム命令を、
プログラム制御を変更するための命令、たとえば割り込
みを発生させる命令(トラップ命令)に、一時的に置き
換える手段をとっていた。
2. Description of the Related Art As one of conventional program debugging methods, there is a software breakpoint debugging method. In this software breakpoint debugging method, program instructions for setting switch points are
A means for temporarily replacing an instruction for changing the program control, for example, an instruction for generating an interrupt (trap instruction) has been employed.

【0003】この方式によれば、ブレークポイントを設
定する領域は、RAM領域に展開したプログラムに限ら
れてしまうので、ROM領域にソフトウエアブレークポ
イントを設定することは物理的に実施することができな
かった。
According to this method, the area for setting a breakpoint is limited to a program developed in the RAM area, so that setting a software breakpoint in the ROM area can be physically performed. Did not.

【0004】たとえば、特開9−288598号公報に
記載された内容によれば、ROM上のプログラムをター
ゲットとして、マネージャによって、該プログラムのプ
ロセスの予め設定したスイッチポイントから、スイッチ
テーブルを参照して、プログラムのプロセスがデバッガ
のプロセスに制御移行され、ROM上のプログラムがデ
バッガされ、またスイッチテーブルを管理するテーブル
マネージャにより、デバッガの対象となるプログラムを
切換え、対応するスイッチテーブルを参照して、プログ
ラムのプロセスがデバッガのプロセスに制御移行され、
ROM上の異なる複数のプログラムをデバッガすること
が可能になることが提案されている。
For example, according to the contents described in Japanese Patent Application Laid-Open No. 9-288598, a program is stored in a ROM as a target, and a manager refers to a switch table from a preset switch point of a process of the program. The program process is transferred to the debugger process, the program on the ROM is debugged, and the program to be debugged is switched by the table manager that manages the switch table, and the program is referred to by the corresponding switch table. Process is transferred to the debugger process,
It has been proposed that a plurality of different programs on the ROM can be debugged.

【0005】[0005]

【発明が解決しようとする課題】しかしながら、この方
式によると、プログラムを実行する都度、参照テーブル
を比較する動作に多大の時間を要する。さらに、所定の
ブレークポイントとなるスイッチポイントを予めプログ
ラム命令の中に埋め込む方式のため、ROM作成後に任
意の位置にスイッチポイントを設定することが困難であ
った。また、プログラム命令の中に、スイッチポイント
を必要数埋め込むことを前提とする方式のため、ROM
容量が極めて増大し、その結果、トータルプログラムサ
イズが増大し、設計の自由度が束縛される結果をもたら
していた。
However, according to this method, a large amount of time is required for the operation of comparing the reference tables each time the program is executed. Furthermore, since a switch point to be a predetermined break point is embedded in a program instruction in advance, it is difficult to set a switch point at an arbitrary position after the ROM is created. In addition, since it is assumed that the required number of switch points is embedded in the program instructions,
The capacity has increased significantly, resulting in an increase in the total program size, which has limited the freedom of design.

【0006】本発明の目的は、かかる問題点を解決した
プログラムデバック方式を提案することにある。
An object of the present invention is to propose a program debugging method which solves such a problem.

【0007】[0007]

【課題を解決するための手段】上記課題を解決するため
に、本発明は、プログラムを記憶したROMと、少なく
もメモリ管理テーブル及び前記ROM領域のプログラム
コードを格納したRAMと、前記ROM及びRAMの記
憶データを管理し、論理・物理アドレス変換機能を有す
るメモリ管理装置と、制御手段とを有するシステムにお
いて、前記制御手段により前記プログラムを格納したR
OM領域に対応する前記RAM領域内に、プログラム制
御の変更命令を書き込み、前記メモリ管理装置の論理・
物理アドレス変換機能を用いて、実行アドレスを前記R
AMに設定することにより、ROM領域にソフトウエア
ブレークポイントを設定することを可能にした。
In order to solve the above-mentioned problems, the present invention provides a ROM storing a program, a RAM storing at least a memory management table and a program code of the ROM area, the ROM and the RAM. In a system having a memory management device that manages the stored data and has a logical / physical address conversion function, and a control unit, the control unit stores the program by the control unit.
A program control change instruction is written in the RAM area corresponding to the OM area, and the logic
Using the physical address conversion function, the execution address is
By setting it to AM, it became possible to set a software breakpoint in the ROM area.

【0008】〔発明の詳細な説明〕メモリ管理装置を有
するシステムで、メモリ管理テーブル制御手段を有する
システムにおいて、ROM領域に該当するRAM領域内
に、プログラム制御を変更するための命令を書き込み、
メモリ管理装置の論理・物理アドレス変換機能を用い
て、実行アドレスをRAMに設定することにより、RO
M領域にソフトウエアブレークポイントを設定すること
を可能にしたことを特徴とするプログラムデバック方
式。
DETAILED DESCRIPTION OF THE INVENTION In a system having a memory management device, in a system having a memory management table control means, an instruction for changing program control is written in a RAM area corresponding to a ROM area.
By setting the execution address in the RAM using the logical / physical address conversion function of the memory management device, the RO
A program debugging method, wherein a software breakpoint can be set in the M area.

【0009】[0009]

【発明の実施の形態】本発明の実施形態を図1、図2を参
照して説明する。
DESCRIPTION OF THE PREFERRED EMBODIMENTS An embodiment of the present invention will be described with reference to FIGS.

【0010】図1は、本発明の実施形態を示す説明図で
ある。図2は、本実施形態の動作を説明するための説明
図である。
FIG. 1 is an explanatory diagram showing an embodiment of the present invention. FIG. 2 is an explanatory diagram for explaining the operation of the present embodiment.

【0011】図1において、1はデバッグの対象となる
プログラムが格納されているリードオンリーメモリ(以
下ROMという)であり、このプログラム中にデバッガ
を起動するポイントとなるべき命令が包含されている。
2は、ROM1内のプログラム命令を格納している形式
を示しており、アドレスに対応したプログラムがアドレ
ス順に格納されている様子を示す。また、3はプログラ
ム及びメモリ管理装置(MMU)が使用するメモリ管理
テーブルを格納するランダムアクセスメモリ(RAM)
である。4は、本実施形態の必須の条件であるメモリ管
理装置(MMU)であり、セントラルプロセッシングユ
ニット(CPU)5の指示により、ROM1内に又はR
AM3内のアドレスを制御するものであり、後述のプロ
グラム領域コピー手段7、ブレークコード制御手段8、
アドレス変換テーブル制御手段9を構成する。
In FIG. 1, reference numeral 1 denotes a read-only memory (hereinafter referred to as a ROM) in which a program to be debugged is stored. The program includes an instruction to be a point for starting a debugger.
Reference numeral 2 denotes a format in which program instructions in the ROM 1 are stored, and shows that programs corresponding to addresses are stored in the order of addresses. A random access memory (RAM) 3 stores a program and a memory management table used by a memory management unit (MMU).
It is. Reference numeral 4 denotes a memory management unit (MMU) which is an essential condition of the present embodiment.
It controls an address in the AM 3, and includes a program area copy unit 7, a break code control unit 8,
The address translation table control means 9 is constituted.

【0012】CPU5がROM1に格納されているプロ
グラムのアドレスを元に読み出し実行するが、その実行
される命令のアドレスをMMU4が変換してCPU5に
取込まれ、命令が実行されることは、周知の事実であ
る。
It is well known that the CPU 5 reads and executes the address of the program stored in the ROM 1 based on the address of the instruction to be executed, and the MMU 4 converts the address of the executed instruction to be taken into the CPU 5 to execute the instruction. It is a fact of.

【0013】さて、ROM1内には、プログラム領域
A、B、Cが格納されており、デバックの対象となるプ
ログラム(図2の6デバックポイントを包含する領域で
あるプログラム領域B)をデバックする必要が生じた
時、図2のようにROM1領域内のデバックの対象とな
るプログラムを含む領域(図2のデバックポイント包含
領域6)を制御手段5の命令でメモリ管理装置4内のプ
ログラム領域コピー手段7を用いてRAM3領域内のプ
ログラム領域Xにコピーし、プログラム制御を変更する
ための命令を、ブレークコード制御手段8を用いて、コ
ピーしたプログラム領域X内に未実装命令(ブレークコ
ード8a)を書き込み、アドレス変換テーブル制御手段
9を用いてアドレス変換テーブル10を10aから10
bのように書き換える。
In the ROM 1, program areas A, B, and C are stored, and it is necessary to debug a program to be debugged (a program area B including six debug points in FIG. 2). When an error occurs, an area including a program to be debugged in the ROM 1 area (a debug point inclusion area 6 in FIG. 2) in the ROM 1 area as shown in FIG. 7, the instruction for changing the program control is copied to the program area X in the RAM 3 area, and the unimplemented instruction (break code 8a) is copied in the copied program area X using the break code control means 8. The address translation table 10 is changed from 10a to 10
Rewrite as b.

【0014】図1のCPU5がデバックポイント包含領
域6内のデバックの対象となるプログラムを読み出す動
作を実行した時、図1のMMU4がアドレス変換テーブ
ル10を変更し書き換えられたテーブル10bのアドレ
スと照合することによってRAM3領域のプログラム領
域X8のアドレスを参照するようになり、予め書き込ん
でおいたプログラム制御を変更するための命令を読み出
し、デバックを支援するデバッガプログラムに制御を移
すことで、あたかもROM1領域のプログラムにソフト
ウエアブレークポイントを設定したかのように動作させ
ることができる。
When the CPU 5 of FIG. 1 executes an operation of reading a program to be debugged in the debug point inclusion area 6, the MMU 4 of FIG. 1 changes the address conversion table 10 and compares it with the address of the rewritten table 10b. By doing so, the address of the program area X8 in the RAM3 area is referred to, the instruction for changing the program control written in advance is read, and the control is transferred to a debugger program that supports debugging. Can operate as if a software breakpoint was set in the program.

【0015】[0015]

【発明の効果】以上説明したように、本発明の構成なら
びに方法によれば、ROM上のプログラムをターゲット
として、移行制御手段によって、ROM上のプログラム
の予め設定した所定のブレークポイントから命令を読み
出す代わりに、予め設定した所定のプログラム制御を変
更するための命令をRAMから読み出すことにより、プ
ログラムの制御がデバッガへ制御移行されるので、RO
M上のプログラムをデバッグすることが可能になる。
As described above, according to the configuration and method of the present invention, the instruction is read from a predetermined breakpoint of the program on the ROM by the transition control means by targeting the program on the ROM. Instead, the control of the program is transferred to the debugger by reading an instruction for changing the preset predetermined program control from the RAM.
The program on M can be debugged.

【図面の簡単な説明】[Brief description of the drawings]

【図1】図1は、本発明の実施形態の構成を示すブロッ
ク図である。
FIG. 1 is a block diagram showing a configuration of an embodiment of the present invention.

【図2】図2は、本発明の実施例の動作を示す説明図で
ある。
FIG. 2 is an explanatory diagram showing the operation of the embodiment of the present invention.

【符号の説明】[Explanation of symbols]

1 リードオンリーメモリ(ROM) 2 プログラム命令格納形式 3 ランダムアクセスメモリ(RAM) 4 メモリ管理ユニット(MMU) 5 セントラルプロセッシングユニット(CPU) 6 デバッグポイント包含領域 7 プログラム領域コピー手段 8 ブレークコード制御手段 8a ブレークコード 9 アドレス変換テーブル制御手段 10 アドレス変換テーブル DESCRIPTION OF SYMBOLS 1 Read-only memory (ROM) 2 Program instruction storage format 3 Random access memory (RAM) 4 Memory management unit (MMU) 5 Central processing unit (CPU) 6 Debug point inclusion area 7 Program area copy means 8 Break code control means 8a Break Code 9 Address conversion table control means 10 Address conversion table

Claims (1)

【特許請求の範囲】[Claims] 【請求項1】プログラムを記憶したROMと、少なくも
メモリ管理テーブル及び前記ROM領域のプログラムコ
ードを格納したRAMと、前記ROM及びRAMの記憶
データを管理し、論理・物理アドレス変換機能を有する
メモリ管理装置と、制御手段とを有するシステムにおい
て、前記制御手段により前記プログラムを格納したRO
M領域に対応する前記RAM領域内に、プログラム制御
の変更命令を書き込み、前記メモリ管理装置の論理・物
理アドレス変換機能を用いて、実行アドレスを前記RA
Mに設定することにより、ROM領域にソフトウエアブ
レークポイントを設定することを可能にしたことを特徴
とするROMのプログラムデバック方式。
1. A ROM storing a program, a RAM storing at least a memory management table and a program code of the ROM area, and a memory having a logical / physical address conversion function for managing data stored in the ROM and the RAM. In a system having a management device and a control unit, an RO storing the program by the control unit
A program control change command is written in the RAM area corresponding to the M area, and the execution address is changed to the RA using the logical / physical address conversion function of the memory management device.
A program debugging method for a ROM, wherein a software breakpoint can be set in a ROM area by setting the value to M.
JP2000080416A 2000-03-22 2000-03-22 Program debugging system for rom Pending JP2001265620A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2000080416A JP2001265620A (en) 2000-03-22 2000-03-22 Program debugging system for rom

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2000080416A JP2001265620A (en) 2000-03-22 2000-03-22 Program debugging system for rom

Publications (1)

Publication Number Publication Date
JP2001265620A true JP2001265620A (en) 2001-09-28

Family

ID=18597521

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2000080416A Pending JP2001265620A (en) 2000-03-22 2000-03-22 Program debugging system for rom

Country Status (1)

Country Link
JP (1) JP2001265620A (en)

Cited By (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2005276065A (en) * 2004-03-26 2005-10-06 Denso Corp Emulator
JP2007042007A (en) * 2005-08-05 2007-02-15 Yafoo Japan Corp Memory leak detection program, device, and method
US7454663B2 (en) 2003-10-31 2008-11-18 Tian Holdings, Llc Method and circuitry for debugging/updating ROM
US7570561B2 (en) 2004-05-25 2009-08-04 Bryan Tai Method for determining type of digital versatile discs
US7602684B2 (en) 2003-09-15 2009-10-13 Chun-Ta Chen Discriminating method of an optical disc device for ascertaining the format of a loaded optical disc
US7626907B2 (en) 2004-05-25 2009-12-01 Ricky Chang Method and apparatus for determining type of digital versatile disc
US7746745B2 (en) 2004-05-25 2010-06-29 Ricky Chang Method for determining the type of digital versatile disc
US7843786B2 (en) 2002-10-24 2010-11-30 Yi-Chung Chan Discrimination method of optical storage medium
US7995434B2 (en) 2003-10-31 2011-08-09 Tian Holdings, Llc Method and apparatus for generating absolute time in pregroove data

Cited By (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7843786B2 (en) 2002-10-24 2010-11-30 Yi-Chung Chan Discrimination method of optical storage medium
US7602684B2 (en) 2003-09-15 2009-10-13 Chun-Ta Chen Discriminating method of an optical disc device for ascertaining the format of a loaded optical disc
US7454663B2 (en) 2003-10-31 2008-11-18 Tian Holdings, Llc Method and circuitry for debugging/updating ROM
CN100446128C (en) * 2003-10-31 2008-12-24 宇田控股有限公司 ROM circuit capable of debugging and updating and method of debugging and updating
US7995434B2 (en) 2003-10-31 2011-08-09 Tian Holdings, Llc Method and apparatus for generating absolute time in pregroove data
JP2005276065A (en) * 2004-03-26 2005-10-06 Denso Corp Emulator
US7570561B2 (en) 2004-05-25 2009-08-04 Bryan Tai Method for determining type of digital versatile discs
US7626907B2 (en) 2004-05-25 2009-12-01 Ricky Chang Method and apparatus for determining type of digital versatile disc
US7746745B2 (en) 2004-05-25 2010-06-29 Ricky Chang Method for determining the type of digital versatile disc
JP2007042007A (en) * 2005-08-05 2007-02-15 Yafoo Japan Corp Memory leak detection program, device, and method
JP4575252B2 (en) * 2005-08-05 2010-11-04 ヤフー株式会社 Memory leak detection program, memory leak detection device, and memory leak detection method

Similar Documents

Publication Publication Date Title
JPH06314213A (en) Debugging device
JP2008217799A (en) Processing system and method for reading and restoring information in ram structure
JP2001265620A (en) Program debugging system for rom
EP0638864B1 (en) Development support system for microcomputer with internal cache
JPH10214203A (en) Information processor
JP5900336B2 (en) Emulator verification system and emulator verification method
JP2005353020A (en) Simulation system for computer program
JP3846540B2 (en) PLC control program execution simulation apparatus and PLC having control program execution simulation function
JP2001265621A (en) On-rom program debugging system
JP3480957B2 (en) Memory programming equipment
JPH11259308A (en) Programmable controller
JP2663895B2 (en) CPU simulator
KR100415742B1 (en) Apparatus for a software controlled exception handling flow in a processor and a method of operation thereof
JP2004240717A (en) Software updating device
JP2006139440A (en) Emulator apparatus and its control method
JP2006313421A (en) Microcomputer and debug method
JP2000029508A (en) Programmable controller
JP2001101030A (en) Program debugging system
JP2619416B2 (en) emulator
JPS63159905A (en) Forcible on/off system for input/output of programmable controller
JPH1165884A (en) Microcomputer and debugging method therefor
JPH08320813A (en) Program simulator device and program debugging method
JPH06202901A (en) Rom emulation system debugger and rom emulation method
JPS6220034A (en) Program status word switching control system
JP2000322289A (en) Method and system for controller emulation and computer readable recording medium for storing program for implementation of controller emulation method by computer

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20040324

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20061109

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20061207

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20070131

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20070327

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20070525

A02 Decision of refusal

Free format text: JAPANESE INTERMEDIATE CODE: A02

Effective date: 20070904