JP2001101030A - Program debugging system - Google Patents

Program debugging system

Info

Publication number
JP2001101030A
JP2001101030A JP27536299A JP27536299A JP2001101030A JP 2001101030 A JP2001101030 A JP 2001101030A JP 27536299 A JP27536299 A JP 27536299A JP 27536299 A JP27536299 A JP 27536299A JP 2001101030 A JP2001101030 A JP 2001101030A
Authority
JP
Japan
Prior art keywords
memory
program
instruction
rom
temporary storage
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
JP27536299A
Other languages
Japanese (ja)
Inventor
Akihiro Kobayashi
昭浩 小林
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 JP27536299A priority Critical patent/JP2001101030A/en
Publication of JP2001101030A publication Critical patent/JP2001101030A/en
Pending legal-status Critical Current

Links

Landscapes

  • Debugging And Monitoring (AREA)

Abstract

PROBLEM TO BE SOLVED: To set a software break point in a ROM region. SOLUTION: This system is provided with a reloadable memory, a maintenance means for arbitrarily reloading the memory, and a lock means for preventing the operation that the memory is automatically updated. In this case, an instruction for changing program control is written in the memory equivalent to the ROM region by using a maintenance means, and the locking operation is executed so that the memory can be prevented from being automatically reloaded by the maintenance means. Thus, a software break point can be set in the ROM region.

Description

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

【0001】[0001]

【発明の属する技術分野】本発明は、インサーキットエ
ミュレータ(ICE)等を用いないプログラムデバッグ
方式に関するものである。
[0001] 1. Field of the Invention [0002] The present invention relates to a program debugging system that does not use 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 it was not physically possible to set a software breakpoint in the ROM area.

【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作成後
に任意の位置にスイッチポイントを設定することが困難
であった。また、プログラム命令の中に、スイッチポイ
ントを必要数埋め込むことを前提とする方式のため、R
OM容量が極めて増大し、その結果、トータルプログラ
ムサイズが増大し、設計の自由度が束縛される結果をも
たらしていた。本発明の目的は、従来技術のこれらの問
題点を解決し、ROM領域にソフトウエアブレークポイ
ントの設定を可能にする手段を提供することにある。
However, according to this method, each time the program is executed, a large amount of time is required for the operation of comparing the reference tables. 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 a required number of switch points is embedded in a program instruction, R
The OM capacity has increased significantly, resulting in an increase in the total program size, which has limited the freedom of design. SUMMARY OF THE INVENTION It is an object of the present invention to solve these problems of the prior art and to provide means for setting a software breakpoint in a ROM area.

【0006】[0006]

【課題を解決するための手段】上記課題を解決するため
に、本発明は、書き換え可能なメモリと、該メモリを任
意に書き換えるメンテナンス手段と、前記メモリが自動
的に更新される動作を阻止するロック手段とを有するシ
ステムにおいて、ROM領域に該当する前記メモリ内
に、プログラム制御を変更するための命令を前記メンテ
ナンス手段を用いて書き込み、さらに該メンテナンス手
段を用いて前記メモリが、自動的に書き換わらないよう
にロックすることにより、ROM領域にソフトウエアブ
レークポイントを設定可能にした。
In order to solve the above-mentioned problems, the present invention provides a rewritable memory, a maintenance means for arbitrarily rewriting the memory, and an operation for automatically updating the memory. In a system having a lock unit, an instruction for changing program control is written into the memory corresponding to the ROM area using the maintenance unit, and the memory is automatically written using the maintenance unit. Software breakpoints can be set in the ROM area by locking them so that they do not change.

【0007】[0007]

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

【0008】図1は、本発明の実施形態の構成を示すブ
ロック図である。図2は、オンチップメモリ(OCM)
を用いた場合の構成を示すブロック図である。同一部分
は同一符号を付している。
FIG. 1 is a block diagram showing a configuration of an embodiment of the present invention. Figure 2 shows an on-chip memory (OCM)
It is a block diagram which shows the structure at the time of using. The same parts are denoted by the same reference numerals.

【0009】図1において、1はデバッグの対象となる
プログラムが格納されているリードオンリーメモリ(以
下ROMという)であり、このプログラム中にデバッガ
を起動するポイントとなるべき命令が包含されている。
2は、ROM1内のプログラム命令を格納している形式
を示しており、アドレスに対応したプログラムがアドレ
ス順に格納されている様子を示す。
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.

【0010】また、3は本実施形態で用いた命令一時記
憶高速メモリとして使用したインストラクションキャッ
シュメモリであり、本一時記憶高速メモリ3は、通常R
OM1内のプログラムの最近出命令を一時的に保持し、
高速な命令読み出し動作に使用される。4のセントラル
プロセッシングユニット(CPU)は、ROM1に格納
されているプログラムをアドレスをもとに読み出し、実
行するが、その実行された命令は、同時に、一時記憶高
速メモリ3にも一時的に格納され、次回アドレスが一致
した命令が一時記憶高速メモリ3内にあればROM1か
らは命令を読み出す動作を省略し、本一時記憶高速メモ
リ3から命令を読み出すことにより、高速なプログラム
実行を実現している。5は、一時記憶高速メモリ3を任
意に書き換えるメンテナンス手段である。このメンテナ
ンス手段5としては、容易に操作可能であるキャッシュ
メンテナンスレジスタが用いられる。
Reference numeral 3 denotes an instruction cache memory used as an instruction temporary storage high-speed memory used in the present embodiment.
Temporarily store the most recent command of the program in OM1,
Used for high-speed instruction read operation. The central processing unit (CPU) 4 reads out and executes the program stored in the ROM 1 based on the address. The executed instruction is also temporarily stored in the temporary high-speed memory 3 at the same time. If the instruction whose address matches next time is in the temporary storage high-speed memory 3, the operation of reading the instruction from the ROM 1 is omitted, and by reading the instruction from the temporary storage high-speed memory 3, high-speed program execution is realized. . Reference numeral 5 denotes maintenance means for arbitrarily rewriting the temporary storage high-speed memory 3. As the maintenance means 5, a cache maintenance register which can be easily operated is used.

【0011】本発明では、ROM1内の対象となるプロ
グラムをデバッグする必要が生じたとき、一時記憶高速
メモリ3のメンテナンス手段5を用いて、一時記憶高速
メモリ3に該当するアドレスに対応するプログラム制御
を変更するための命令を一時記憶高速メモリ3に書き込
み、さらにメンテナンス手段5を用いて一時記憶高速メ
モリ3が自動的に書き換わらないようにロックするよう
にした。そして、CPU4がROM1内のデバッグ対象
となるプログラムを読み出す動作を実行したとき、一時
記憶高速メモリ3のアドレスと照合し、予め書き込んで
おいたプログラム制御を変更するための命令を読み出
し、制御をデバッグを支援するデバッガプログラムに制
御を移すことで、あたかもROM1領域内のプログラム
にソフトウエアブレークポイントを設定したかのように
動作させることができる。なお、6は、CPU4がプロ
グラム命令を読み出すためのインストラクションバスを
示しており、7は、一時記憶高速メモリ3内に格納され
るデータ形式を示すインストラクションキャッシュ内部
テーブルを示している。テーブル7には、プログラムア
ドレスに対応したプログラム命令がデータとして格納さ
れており、各アドレスに対応する行(ライン)には、当
該アドレスラインが有効であるか否かを示すフラグV及
び当該アドレスラインの更新を禁止するか否かを設定す
るフラグLが存在する。
In the present invention, when it becomes necessary to debug a target program in the ROM 1, the maintenance means 5 of the temporary storage high-speed memory 3 is used to control the program corresponding to the address corresponding to the temporary storage high-speed memory 3. Is written into the temporary storage high-speed memory 3 and the maintenance means 5 is locked so that the temporary storage high-speed memory 3 is not automatically rewritten. When the CPU 4 executes an operation of reading a program to be debugged in the ROM 1, the CPU 4 checks the address of the temporary storage high-speed memory 3 and reads an instruction written in advance to change the program control, and debugs the control. By transferring control to a debugger program that supports the above, it is possible to operate as if a software breakpoint was set in a program in the ROM1 area. Reference numeral 6 denotes an instruction bus for the CPU 4 to read out a program instruction, and reference numeral 7 denotes an instruction cache internal table indicating a data format stored in the temporary high-speed memory 3. A program instruction corresponding to a program address is stored in the table 7 as data, and a row (line) corresponding to each address includes a flag V indicating whether the address line is valid and a corresponding address line. There is a flag L for setting whether or not to prohibit the update of the.

【0012】なお、図2は、前記一時記憶高速メモリ3
に代えてオンチップメモリを使用した例を示すブロック
図である。8は付加的な命令一時記憶高速メモリとして
用いるオンチップメモリOCM)であり、本メモリ8
は、通常ROM1内の高速動作要求の高いプログラムの
命令を前もって格納し、高速な命令読み出し動作に使用
されている。CPU4が、ROM1に格納されているプ
ログラムをアドレスをもとに、読み出し実行するが、そ
のときオンチップメモリ8内を検索し、該当するプログ
ラム命令が存在する場合は、オンチップメモリ8から命
令を読み出すことにより、高速でプログラムを実行す
る。
FIG. 2 shows the temporary storage high-speed memory 3.
FIG. 13 is a block diagram showing an example in which an on-chip memory is used in place of FIG. Reference numeral 8 denotes an on-chip memory OCM used as an additional instruction temporary storage high-speed memory.
Are usually stored in advance in the ROM 1 for a high-speed operation requesting program instruction, and are used for high-speed instruction reading operation. The CPU 4 reads out and executes the program stored in the ROM 1 based on the address. At this time, the CPU 4 searches the on-chip memory 8 and, if a corresponding program instruction exists, reads the instruction from the on-chip memory 8. By reading, the program is executed at high speed.

【0013】この場合、ROM1内の対象となるプログ
ラムをデバッグする必要が生じたとき、データサイドオ
ンチップメモリバス9を用いて、オンチップメモリ8に
該当するアドレスに対応するプログラム制御を変更する
ための命令をオンチップメモリ8に書き込む。CPU4
がROM1内のデバッグの対象となるプログラムを読み
出す動作を実行したとき、オンチップメモリ8のアドレ
スと照合し、予め書き込んでおいたプログラム制御を変
更するための命令を、インストラクションサイドオンチ
ップメモリバス10を通して読み出し、デバッグを支援
するデバッガプログラムに制御を移すことで、あたかも
ROM1領域のプログラムにソフトウエアブレークポイ
ントを設定したかのように動作させることができる。1
1はCPU4がプログラム命令を読み出すためのインス
トラクションバスである。
In this case, when it becomes necessary to debug a target program in the ROM 1, the program control corresponding to the address corresponding to the on-chip memory 8 is changed by using the data-side on-chip memory bus 9. Is written in the on-chip memory 8. CPU4
Executes an operation of reading a program to be debugged in the ROM 1, checks an address of the on-chip memory 8, and issues an instruction for changing program control written in advance to the instruction side on-chip memory bus 10. , And control is transferred to a debugger program that supports debugging, thereby making it possible to operate as if a software breakpoint was set in the program in the ROM1 area. 1
1 is an instruction bus for the CPU 4 to read out program instructions.

【0014】[0014]

【発明の効果】以上説明したように、本発明の構成なら
びに方法によれば、ROM上のプログラムをターゲット
として、移行制御手段によって、ROM上のプログラム
の予め設定した所定のブレークポイントから命令を読み
出す代わりに、予め設定した所定のプログラム制御を変
更するための命令を一時記憶高速メモリから読み出すこ
とにより、プログラムの制御がデバッガへ制御移行され
るので、ROM上のプログラムをデバッグすることが可
能になる。
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, by reading an instruction for changing the preset predetermined program control from the temporary storage high-speed memory, the control of the program is transferred to the debugger, so that the program on the ROM 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は、オンチップメモリ(OCM)を用いた
場合の構成を示すブロック図である。
FIG. 2 is a block diagram illustrating a configuration when an on-chip memory (OCM) is used;

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

1 ROM 2 プログラム命令格納形式 3 一時記憶高速メモリ(インストラクションキャッ
シュ) 4 CPU 5 メンテナンス手段 6 命令バス 7 一時記憶高速メモリ命令格納形式 8 オンチップメモリ 9 データサイドオンチップメモリバス 10 インストラクションサイドオンチップメモリバス 11 命令バス
Reference Signs List 1 ROM 2 Program instruction storage format 3 Temporary storage high-speed memory (instruction cache) 4 CPU 5 Maintenance means 6 Instruction bus 7 Temporary storage high-speed memory instruction storage format 8 On-chip memory 9 Data side on-chip memory bus 10 Instruction side on-chip memory bus 11 Instruction bus

Claims (3)

【特許請求の範囲】[Claims] 【請求項1】書き換え可能なメモリと、該メモリを任意
に書き換えるメンテナンス手段と、前記メモリが自動的
に更新される動作を阻止するロック手段とを有するシス
テムにおいて、ROM領域に該当する前記メモリ内に、
プログラム制御を変更するための命令を前記メンテナン
ス手段を用いて書き込み、さらに該メンテナンス手段を
用いて前記メモリが、自動的に書き換わらないようにロ
ックすることにより、ROM領域にソフトウエアブレー
クポイントを設定可能にしたことを特徴とするプログラ
ムデバッグ方式。
In a system having a rewritable memory, a maintenance means for arbitrarily rewriting the memory, and a lock means for preventing an operation of automatically updating the memory, the memory in the memory corresponding to a ROM area To
A software breakpoint is set in the ROM area by writing an instruction for changing the program control using the maintenance unit and further locking the memory using the maintenance unit so that the memory is not automatically rewritten. A program debugging method characterized by being made possible.
【請求項2】前記メモリに一時記憶高速メモリを使用し
てROM上のプログラムにソフトウエアブレークポイン
トを設定可能にしたことを特徴とする請求項1記載のプ
ログラムデバッグ方式。
2. The program debugging method according to claim 1, wherein a software breakpoint can be set in a program on the ROM by using a temporary storage high-speed memory as the memory.
【請求項3】前記メモリにプログラム命令読み出し可能
なオンチップメモリを使用してROM上のプログラムに
ソフトウエアブレークポイントを設定可能にしたことを
特徴とする請求項1記載のプログラムデバッグ方式。
3. The program debugging method according to claim 1, wherein a software breakpoint can be set in a program on the ROM by using an on-chip memory from which a program instruction can be read.
JP27536299A 1999-09-28 1999-09-28 Program debugging system Pending JP2001101030A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP27536299A JP2001101030A (en) 1999-09-28 1999-09-28 Program debugging system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP27536299A JP2001101030A (en) 1999-09-28 1999-09-28 Program debugging system

Publications (1)

Publication Number Publication Date
JP2001101030A true JP2001101030A (en) 2001-04-13

Family

ID=17554430

Family Applications (1)

Application Number Title Priority Date Filing Date
JP27536299A Pending JP2001101030A (en) 1999-09-28 1999-09-28 Program debugging system

Country Status (1)

Country Link
JP (1) JP2001101030A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2009043061A (en) * 2007-08-09 2009-02-26 Oki Electric Ind Co Ltd Debugging device and debugging method

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2009043061A (en) * 2007-08-09 2009-02-26 Oki Electric Ind Co Ltd Debugging device and debugging method

Similar Documents

Publication Publication Date Title
US5132971A (en) In-circuit emulator
JP2731692B2 (en) Debug device
US7912053B2 (en) Method and system for decreasing routing latency for switching platforms with variable configuration
US20030014736A1 (en) Debugger breakpoint management in a multicore DSP device having shared program memory
US20060174163A1 (en) Software breakpoints for use with memory devices
JPS63108434A (en) Program corrector of read-only-memory for digital data processor
JP3882321B2 (en) Computer with operating system module program
KR100526384B1 (en) Debugging device and debugging method
US20110126175A1 (en) Debugging method and debugging device using hardware breakpoints
EP0638864B1 (en) Development support system for microcomputer with internal cache
US6925522B2 (en) Device and method capable of changing codes of micro-controller
JP2001265620A (en) Program debugging system for rom
JP4740553B2 (en) Data access request remapping system
JP2001101030A (en) Program debugging system
JPH10214203A (en) Information processor
US20080133838A1 (en) Data processing device
JPH11259362A (en) Method and device for controlling cache memory
JPH11134204A (en) Stack protecting device
CN112802527B (en) Method for realizing high-speed programming of embedded flash memory and programming system of embedded flash memory
CN116069653A (en) Viewpoint debugging method supported by hardware
JPH09319615A (en) Software break point managing system for kernel debugger
JPS62162105A (en) Flow chart type programmable controller
JP2001265621A (en) On-rom program debugging system
US20030182523A1 (en) Cache memory control device and cache memory system
JPS59202550A (en) Debugging device