JP2000293402A - Microprocessor and debugging method - Google Patents

Microprocessor and debugging method

Info

Publication number
JP2000293402A
JP2000293402A JP11101062A JP10106299A JP2000293402A JP 2000293402 A JP2000293402 A JP 2000293402A JP 11101062 A JP11101062 A JP 11101062A JP 10106299 A JP10106299 A JP 10106299A JP 2000293402 A JP2000293402 A JP 2000293402A
Authority
JP
Japan
Prior art keywords
monitor
program
interrupt
address
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.)
Pending
Application number
JP11101062A
Other languages
Japanese (ja)
Inventor
Takao Yamamoto
崇夫 山本
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.)
Panasonic Holdings Corp
Original Assignee
Matsushita Electric Industrial 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 Matsushita Electric Industrial Co Ltd filed Critical Matsushita Electric Industrial Co Ltd
Priority to JP11101062A priority Critical patent/JP2000293402A/en
Publication of JP2000293402A publication Critical patent/JP2000293402A/en
Pending legal-status Critical Current

Links

Landscapes

  • Debugging And Monitoring (AREA)
  • Stored Programmes (AREA)

Abstract

PROBLEM TO BE SOLVED: To increase the operation speed of a monitor program by holding the base address of an interrupt vector which jumps when an interrupt or exception for moving to the monitor program is generated. SOLUTION: For example, a monitor exception by the execution of a breakpoint instruction or a monitor interrupt by external terminal input is generated in a user program execution state, a return to a debugger execution step is made. At this time, a microprocessor 1 jumps to the specific address corresponding to the monitor interrupt regarding an address set in a monitor interrupt base address register 9 as a base address. The monitor program 6' is assigned to the address and enters a debugger execution step by executing the program from that address. Therefore, when the monitor interrupt is initiated, the place that the executed monitor program fetches can be changed.

Description

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

【0001】[0001]

【発明の属する技術分野】本発明は、モニタプログラム
を実行することによってユーザプログラムのデバッグを
効率良く行なう、マイクロプロセッサおよびデバッグ方
法に関する。
[0001] 1. Field of the Invention [0002] The present invention relates to a microprocessor and a debugging method for efficiently debugging a user program by executing a monitor program.

【0002】[0002]

【従来の技術】従来のデバッグ装置が、特開平8-255096
号公報に開示されている。
2. Description of the Related Art A conventional debugging device is disclosed in Japanese Patent Application Laid-Open No. Hei 8-255096.
No. 6,009,045.

【0003】図3に、従来のマイクロプロセッサを備え
る従来のデバッグ装置を示す。この従来例は一般にROM
モニタと呼ばれるデバッグシステムである。
FIG. 3 shows a conventional debugging device provided with a conventional microprocessor. This conventional example is generally ROM
This is a debugging system called a monitor.

【0004】図3において、1は、マイクロプロセッ
サ、2はシリアルインターフェース、4は、ホストコンピ
ュータ、6は、モニタプログラム、7は、メモリ、8は、I
/Oデバイス、100はユーザターゲットシステムをそれぞ
れ示す。
In FIG. 3, 1 is a microprocessor, 2 is a serial interface, 4 is a host computer, 6 is a monitor program, 7 is a memory, and 8 is an I / O
The / O device and 100 indicate a user target system, respectively.

【0005】この従来例は、ターゲットシステム100上
にホストコンピュータ4と接続するためのシリアルイン
ターフェース2を用意して、メモリ7中にモニタプログラ
ム6を格納しておく。マイクロプロセッサ1は、このモニ
タプログラム6を実行し、メモリ7などをアクセスする。
さらに、ソフトウェアブレイク命令などを使用して、ユ
ーザープログラムの実行制御を行なう。
In this conventional example, a serial interface 2 for connecting to a host computer 4 is prepared on a target system 100, and a monitor program 6 is stored in a memory 7. The microprocessor 1 executes the monitor program 6 and accesses the memory 7 and the like.
Further, the execution of the user program is controlled using a software break instruction or the like.

【0006】モニタプログラム6の格納方法には、ROMエ
ミュレータを使う方法や、マイクロプロセッサ1を停止
させ、シリアルインターフェース2とDMA機能によって、
ホストコンピュータからモニタプログラム6をメモリ7に
ダウンロードするなどの方法がある。
[0006] The monitor program 6 can be stored by using a ROM emulator or by stopping the microprocessor 1 and using the serial interface 2 and the DMA function.
There is a method such as downloading the monitor program 6 from the host computer to the memory 7.

【0007】この従来例のデバッグシステムの動作フロ
ーチャートを図5に示す。図5において、11は、初期化
ステップ、12は、デバッガ実行ステップ、13は、ユーザ
プログラムへの移行ステップ、14は、ユーザプログラム
実行状態をそれぞれ示す。
FIG. 5 shows an operation flowchart of the conventional debug system. In FIG. 5, 11 indicates an initialization step, 12 indicates a debugger execution step, 13 indicates a transition step to a user program, and 14 indicates a user program execution state.

【0008】(初期化ステップ11) モニタリセットに
よって、マイクロプロセッサ1は、モニタリセットハン
ドラのアドレスにジャンプする。ここでは、モニタリセ
ットハンドラのアドレスにはモニタプログラム6があ
り、そこにモニタリセットハンドラとして、システムの
初期化コードが存在する。したがって初期化ステップ11
が実行されることになる。
(Initialization Step 11) The monitor reset causes the microprocessor 1 to jump to the address of the monitor reset handler. Here, there is a monitor program 6 at the address of the monitor reset handler, and there is an initialization code of the system as the monitor reset handler. Therefore initialization step 11
Will be executed.

【0009】(デバッガ実行ステップ12) モニタプロ
グラム6は、デバッグのためのプログラムを実行する。
これは、例えば、ユーザプログラムの実行開始アドレス
の設定、ブレークポイントの設定、メモリおよびレジス
タの読み出しまたは設定である。また、ユーザからのデ
バッグコマンド待ちである。
(Debugger execution step 12) The monitor program 6 executes a program for debugging.
This is, for example, setting of an execution start address of a user program, setting of a breakpoint, reading or setting of a memory and a register. Also, it is waiting for a debug command from the user.

【0010】(ユーザプログラムへの移行ステップ13)
モニタプログラム6は、設定を終えると、ユーザプロ
グラムの実行開始アドレスにジャンプし、ユーザプログ
ラム実行状態になる。
(Step 13 for transition to user program)
After completing the setting, the monitor program 6 jumps to the execution start address of the user program, and enters the user program execution state.

【0011】ユーザプログラム実行状態で、例えばブレ
ークポイント命令の実行によるモニタ例外や、外部端子
入力によるモニタ割り込みが発生すると、デバッガ実行
ステップ12に戻る。このとき、マイクロプロセッサ1
は、モニタ割り込みまたは例外アドレスに対応した特定
のアドレスへジャンプする。そのアドレスには、モニタ
プログラム6が割り付けられていて、その特定アドレス
からプログラムを実行することによりデバッガ実行ステ
ップ12にふたたび入る。
In the user program execution state, for example, if a monitor exception occurs due to execution of a breakpoint instruction or a monitor interrupt occurs due to an external terminal input, the process returns to the debugger execution step 12. At this time, microprocessor 1
Jumps to a specific address corresponding to the monitor interrupt or exception address. The monitor program 6 is allocated to the address, and the program is executed from the specific address to reenter the debugger execution step 12.

【0012】このようなステップを実行することによっ
てデバッグシステムは、ユーザプログラムをデバッグす
ることができる。
By executing such steps, the debugging system can debug the user program.

【0013】しかし、従来例では、モニタプログラム6
をユーザが使用するメモリ7で実行するために、ユーザ
ターゲットシステム100のメモリ7の動作が完全でない場
合に、モニタプログラム6の実行自身が安定して動作し
ない場合がある。
However, in the conventional example, the monitor program 6
Is executed in the memory 7 used by the user, and when the operation of the memory 7 of the user target system 100 is not perfect, the execution of the monitor program 6 itself may not operate stably.

【0014】また、図4に、デバッグ装置の他の従来例
を示す。図4において、3はデバッグインターフェース
を示し、5は、デバッグモジュールを示す。他の構成要
素は図3の同符号のものと同一である。デバッグインタ
ーフェース3は、マイクロプロセッサ1と直接内蔵インタ
ーフェースで接続される。さらに、デバッグモジュール
5と接続される。モニタプログラム6は、デバッグモジュ
ール5の中に配置される。
FIG. 4 shows another conventional example of a debugging device. In FIG. 4, 3 indicates a debug interface, and 5 indicates a debug module. The other components are the same as those of FIG. The debug interface 3 is directly connected to the microprocessor 1 by a built-in interface. In addition, the debug module
Connected to 5. The monitor program 6 is arranged in the debug module 5.

【0015】マイクロプロセッサ1は、モニタプログラ
ム6を実行する要求を受けた時、つまりモニタ割り込み
や例外が発生した時に、デバッグインターフェース3に
アクセスし、デバッグインターフェース3が、そのアク
セスをデバッグモジュール5に対して行ない、モニタプ
ログラム6のフェッチや、ユーザターゲットシステム100
の資源のモニタ結果や設定値を受け渡しする。
The microprocessor 1 accesses the debug interface 3 when receiving a request to execute the monitor program 6, that is, when a monitor interrupt or exception occurs, and the debug interface 3 sends the access to the debug module 5. Fetching the monitor program 6 and the user target system 100
The monitoring result and setting value of the resource are passed.

【0016】この従来例では、モニタプログラム6をユ
ーザが使用するメモリ7ではなく、デバッグ専用のデバ
ッグモジュール5に置くことによって、図3で説明し
た、ユーザターゲットシステム100のメモリ7の動作が完
全でない場合でも、モニタプログラム6の実行を安定し
て行なうことができる。また、この従来例も図5に示し
た動作フローチャートで説明した動作と同様の動作を行
なう。
In this conventional example, the operation of the memory 7 of the user target system 100 described with reference to FIG. 3 is not complete by placing the monitor program 6 in the debug module 5 dedicated to debugging instead of the memory 7 used by the user. Even in this case, the execution of the monitor program 6 can be performed stably. Also, this conventional example performs the same operation as the operation described in the operation flowchart shown in FIG.

【0017】しかし、この従来例では、マイクロプロセ
ッサ1の中にデバッグインターフェース3を搭載し、直接
デバッグモジュール5と端子接続するために、接続する
端子数が多くなってコストが増加するか、少ない端子で
接続するために、モニタプログラム6の実行速度が遅く
なってしまう場合がある。
However, in this conventional example, since the debug interface 3 is mounted in the microprocessor 1 and the terminals are directly connected to the debug module 5, the number of connected terminals increases and the cost increases, or the number of terminals increases. , The execution speed of the monitor program 6 may be reduced.

【0018】[0018]

【発明が解決しようとする課題】以上説明したように、
モニタプログラムをユーザターゲットシステム上のメモ
リに配置することによって、デバッグを行なう従来のデ
バッグシステムでは、ユーザターゲットシステムの影響
によってデバッグシステム自身の動作が左右される問題
がある。
As described above,
In a conventional debugging system that performs debugging by arranging a monitor program in a memory on a user target system, there is a problem that the operation of the debugging system itself is affected by the influence of the user target system.

【0019】また、マイクロプロセッサがデバッグモジ
ュールと直接接続するデバッグインターフェースを持
ち、そのデバッグモジュール内に配置されるモニタプロ
グラムを実行するように構成されたデバッグシステムに
おいては、端子数の増加または、端子数の不足による接
続経路の細さによるモニタプログラム実行の遅さによ
り、デバッグシステムを用いたデバッグの効率に悪影響
を与えるという問題がある。
In a debug system in which a microprocessor has a debug interface directly connected to a debug module and is configured to execute a monitor program arranged in the debug module, the number of terminals is increased or the number of terminals is increased. There is a problem in that the efficiency of debugging using the debugging system is adversely affected by the delay in execution of the monitor program due to the thinness of the connection path due to the lack of memory.

【0020】[0020]

【課題を解決するための手段】この課題を解決するため
本発明のマイクロプロセッサは、デバッグのためにモニ
タプログラムを実行し、モニタリセット後に外部からモ
ニタプログラムを供給するインターフェース手段と、ユ
ーザープログラムの実行中にモニタプログラムへ移行す
るための割り込みまたは例外が発生したときにジャンプ
する割り込みベクタのベースアドレスを保持する手段を
備えたことを特徴とする。
SUMMARY OF THE INVENTION To solve this problem, a microprocessor of the present invention executes a monitor program for debugging, and supplies an external monitor program after monitor reset, and an interface for executing a user program. A means for holding a base address of an interrupt vector that jumps when an interrupt or an exception occurs for shifting to a monitor program.

【0021】また本発明のデバッグ方法は、上記のマイ
クロプロセッサを備え、少なくとも、モニタリセット後
に実行されるモニタプログラムによってシステム初期診
断を行なうステップと、初期診断が正常であれば、モニ
タプログラムをマイクロプロセッサが直接アクセス可能
なメモリにロードするステップと、モニタ割り込みのベ
ースアドレスを、前記メモリにロードしたモニタプログ
ラムの中のモニタ割り込みハンドラのベースアドレスに
設定するステップとを有することを特徴とする。
A debugging method according to the present invention includes the above-mentioned microprocessor, at least a step of performing a system initial diagnosis by a monitor program executed after a monitor reset, and if the initial diagnosis is normal, the monitor program is executed by the microprocessor. Load the memory into a directly accessible memory, and set the base address of the monitor interrupt to the base address of the monitor interrupt handler in the monitor program loaded into the memory.

【0022】[0022]

【発明の実施の形態】以下、本発明の実施の形態につい
て、図1から図2を用いて、説明する。
DESCRIPTION OF THE PREFERRED EMBODIMENTS Embodiments of the present invention will be described below with reference to FIGS.

【0023】図1は本発明の実施の形態におけるデバッ
グシステムのブロック図である。図1において、1は、
マイクロプロセッサ、3は、デバッグインターフェー
ス、5は、デバッグモジュール、6、6'は、モニタプログ
ラム、7は、メモリ、8は、I/Oデバイス、9は、モニタ割
り込みベースレジスタ、10は、デバッグインターフェー
ス3とデバッグモジュールの接続線をそれぞれ示してい
る。
FIG. 1 is a block diagram of a debug system according to an embodiment of the present invention. In FIG. 1, 1 is
Microprocessor, 3 is a debug interface, 5 is a debug module, 6, 6 'is a monitor program, 7 is a memory, 8 is an I / O device, 9 is a monitor interrupt base register, 10 is a debug interface 3 and the connection line of the debug module are shown.

【0024】ユーザターゲットシステム100は、主にマ
イクロプロセッサ1、メモリ7、I/O 8から構成され、メ
モリ7上のユーザプログラムをマイクロプロセッサ1が実
行して、メモリ7やI/O 8をアクセスすることによって機
能するシステムである。
The user target system 100 mainly includes a microprocessor 1, a memory 7, and an I / O 8. The microprocessor 1 executes a user program on the memory 7 to access the memory 7 and the I / O 8. It is a system that works by doing

【0025】また、マイクロプロセッサ1は、デバッグ
インターフェース3を内蔵し、特定のアドレス空間(例
えば、0xfffff000-0xffffffff。0xは16進数を表す。以
下同様。)がデバッグインターフェース3に割り付けら
れる。デバッグインターフェース3は外部のデバッグモ
ジュール5と接続され、マイクロプロセッサ1は、デバッ
グインターフェース3を介してデバッグモジュール5をア
クセスすることができる。
The microprocessor 1 has a built-in debug interface 3 and a specific address space (for example, 0xfffff000-0xffffffff. 0x represents a hexadecimal number; the same applies hereinafter) is allocated to the debug interface 3. The debug interface 3 is connected to an external debug module 5, and the microprocessor 1 can access the debug module 5 via the debug interface 3.

【0026】マイクロプロセッサ1は、2種類の割り込み
または例外を処理する。ひとつは、デバッグに必要なモ
ニタ割り込みまたはモニタ例外であり、もうひとつは、
ユーザプログラムが必要とするユーザ割り込みまたはユ
ーザ例外である。ここでは、例外または割り込みを区別
する必要がないので、これ以降、割り込みという場合
は、例外も含むことにする。モニタ割り込みの典型的な
例は、ブレークポイント命令の実行によって発生する割
り込みである。また、ユーザ割り込みの典型的な例は、
タイマなどのI/Oデバイスからの割り込みである。
The microprocessor 1 handles two types of interrupts or exceptions. One is the monitor interrupt or monitor exception required for debugging, and the other is
User interrupt or user exception required by the user program. Here, since it is not necessary to distinguish between an exception and an interrupt, hereinafter, the term “interrupt” includes the exception. A typical example of a monitor interrupt is an interrupt generated by execution of a breakpoint instruction. A typical example of a user interrupt is
This is an interrupt from an I / O device such as a timer.

【0027】モニタ割り込みが発生すると、プロセッサ
1は、モニタ割り込みベースレジスタ9の保持する、モニ
タ割り込みベクタのベースアドレスにジャンプする。そ
して、モニタプログラム6または6'を実行する。モニタ
プログラムは、デバッグに必要な動作、例えば、ユーザ
プログラムのスタートアドレスの設定、ユーザプログラ
ムのデータの設定/読み出し、ブレークポイントの設定
などを行ない、ユーザプログラムにジャンプする。これ
によって、ユーザプログラムのデバッグを行なうことが
可能になる。
When a monitor interrupt occurs, the processor
1 jumps to the base address of the monitor interrupt vector stored in the monitor interrupt base register 9. Then, the monitor program 6 or 6 'is executed. The monitor program jumps to the user program by performing operations required for debugging, for example, setting a start address of the user program, setting / reading data of the user program, setting a break point, and the like. This makes it possible to debug the user program.

【0028】このように構成されるデバッグシステムに
おいて、図2を用いて、その動作を説明する。図2は、デ
バッグシステムの動作フローチャートである。図2にお
いて、11は、初期化ステップ、12は、モニタプログラム
によるデバッガ実行ステップ、13は、ユーザプログラム
への移行ステップ、14は、ユーザプログラム実行状態、
15は、システム初期診断ステップ、16は、モニタプログ
ラム6のメモリ7へのロードステップ、17は、モニタ割り
込みのベースアドレスを変更するステップをそれぞれ示
す。
The operation of the debug system thus configured will be described with reference to FIG. FIG. 2 is an operation flowchart of the debug system. In FIG. 2, 11 is an initialization step, 12 is a debugger execution step by a monitor program, 13 is a transition step to a user program, 14 is a user program execution state,
Reference numeral 15 denotes a system initial diagnosis step, 16 denotes a step of loading the monitor program 6 into the memory 7, and 17 denotes a step of changing the base address of the monitor interrupt.

【0029】(初期化ステップ11)デバッグリセットに
よって、モニタ割り込みベースレジスタ9は、デバッグ
インターフェース3を介してデバッグモジュール5内のモ
ニタプログラム6のモニタ割り込みベクタのアドレスを
指すように、例えば0xfffff000 に初期化される。した
がって、マイクロプロセッサ1は、モニタ割り込みベー
スレジスタ9の指すデバッグリセットハンドラのアドレ
ス 0xfffff000 にジャンプする。ここでは、デバッグ
リセットハンドラのアドレス 0xfffff000 にはデバッ
グモジュール5内のモニタプログラム6があり、そこにデ
バッグリセットハンドラとして、システムの初期化コー
ドが存在する。したがって初期化ステップ11が実行され
る。
(Initialization Step 11) By the debug reset, the monitor interrupt base register 9 is initialized to, for example, 0xfffff000 to indicate the address of the monitor interrupt vector of the monitor program 6 in the debug module 5 via the debug interface 3. Is done. Therefore, the microprocessor 1 jumps to the address 0xfffff000 of the debug reset handler indicated by the monitor interrupt base register 9. Here, the monitor program 6 in the debug module 5 is located at the address 0xfffff000 of the debug reset handler, and the system initialization code exists as the debug reset handler there. Therefore, an initialization step 11 is performed.

【0030】(システム初期診断ステップ15)モニタプ
ログラム6は、ユーザターゲットシステム100の初期診断
を行なう。ここで、メモリ7へのアクセスを診断する。
もし、この初期診断ステップ15で、NGの場合、例えば、
ユーザターゲットシステム100の誤動作によって、例え
ばアクセスタイムアウトなどが検出された場合、モニタ
割り込みベースレジスタ9は、デバッグモジュール5を指
しているので、モニタプログラム6内のアクセスタイム
アウトの処理ハンドラが動作し、(図2のNG方向の)デ
バッガ実行ステップ12に移行する。
(System Initial Diagnosis Step 15) The monitor program 6 performs an initial diagnosis of the user target system 100. Here, the access to the memory 7 is diagnosed.
If the initial diagnosis step 15 is NG, for example,
When an access timeout or the like is detected due to a malfunction of the user target system 100, for example, the monitor interrupt base register 9 points to the debug module 5, so that the access timeout processing handler in the monitor program 6 operates, and FIG. Go to the debugger execution step 12 (in the NG direction of 2).

【0031】また、システム初期診断がOKの場合は、モ
ニタプログラム6のメモリ7へのロードステップに移行す
る。
If the system initial diagnosis is OK, the process proceeds to the step of loading the monitor program 6 into the memory 7.

【0032】(モニタプログラムのメモリへのロードス
テップ16)モニタプログラム6は、メモリ7上の特定のア
ドレス、例えば 0x8000f000 にモニタプログラム6と
同等の機能を持つモニタプログラム6'をダウンロードす
る。
(Step 16 for loading the monitor program into the memory) The monitor program 6 downloads a monitor program 6 'having a function equivalent to the monitor program 6 to a specific address on the memory 7, for example, 0x8000f000.

【0033】(モニタ割り込みのベースアドレスを変更
するステップ17)次に、モニタプログラム6は、ダウン
ロードしたモニタプログラム6'の中のモニタ割り込みハ
ンドラのベースアドレス 0x8000f000 を、モニタ割り
込みベースレジスタ9に設定し、デバッガ実行ステップ1
2へ移行する。
(Step 17 for Changing Base Address of Monitor Interrupt) Next, the monitor program 6 sets the base address 0x8000f000 of the monitor interrupt handler in the downloaded monitor program 6 'in the monitor interrupt base register 9, Debugger execution step 1
Move to 2.

【0034】(デバッガ実行ステップ12)モニタプログ
ラム6は、デバッグのためのプログラムを実行する。こ
れは、例えば、ユーザプログラムの実行開始アドレスの
設定、ブレークポイントの設定、メモリおよびレジスタ
の読み出しまたは設定である。また、ユーザからのデバ
ッグコマンド待ちである。
(Debugger execution step 12) The monitor program 6 executes a program for debugging. This is, for example, setting of an execution start address of a user program, setting of a breakpoint, reading or setting of a memory and a register. Also, it is waiting for a debug command from the user.

【0035】(ユーザプログラムへの移行ステップ13)
モニタプログラム6は、設定を終えると、ユーザプログ
ラムの実行開始アドレスにジャンプし、ユーザプログラ
ム実行状態になる。
(Step 13 for transition to user program)
After completing the setting, the monitor program 6 jumps to the execution start address of the user program, and enters the user program execution state.

【0036】ユーザプログラム実行状態で、例えばブレ
ークポイント命令の実行によるモニタ例外や、外部端子
入力によるモニタ割り込みが発生すると、デバッガ実行
ステップ12に戻る。このとき、マイクロプロセッサ1
は、モニタ割り込みベースアドレスレジスタ9に設定さ
れたアドレスをベースアドレスとしてモニタ割り込みに
対応した特定のアドレスへジャンプする。そのアドレス
には、モニタプログラム6'が割り付けられていて、その
特定アドレスからプログラムを実行することによりデバ
ッガ実行ステップに入る。
In the user program execution state, for example, when a monitor exception occurs due to execution of a breakpoint instruction or a monitor interrupt occurs due to an external terminal input, the process returns to the debugger execution step 12. At this time, microprocessor 1
Jumps to a specific address corresponding to the monitor interrupt using the address set in the monitor interrupt base address register 9 as the base address. The monitor program 6 'is allocated to the address, and the debugger execution step is started by executing the program from the specific address.

【0037】したがって、モニタプログラム6のメモリ7
へのロード後に、モニタ割り込みベースレジスタ9に、
設定されたアドレスにしたがって、モニタ割り込みが発
生した時に、実行されるモニタプログラムのフェッチす
る場所を変えることが可能になる。ここでは、モニタリ
セット後は、比較的低速ではあるがユーザターゲットシ
ステム100に左右されにくい接続線10を介してモニタプ
ログラム6を実行し、システム初期診断ステップ15によ
って、メモリ7のアクセスが確認された後に、接続線10
よりも高速なメモリバスを使用してモニタプログラム6'
を実行するようにすることができる。
Therefore, the memory 7 of the monitor program 6
After loading, the monitor interrupt base register 9 contains
According to the set address, it is possible to change a fetch location of a monitor program to be executed when a monitor interrupt occurs. Here, after the monitor reset, the monitor program 6 is executed via the connection line 10 which is relatively slow but hardly influenced by the user target system 100, and the access to the memory 7 is confirmed by the system initial diagnosis step 15. Later, connection line 10
Monitor program 6 'using a faster memory bus
Can be performed.

【0038】また、デバッグシステムの信頼性の観点か
ら、モニタ割り込みベースレジスタ9は、モニタプログ
ラムの実行状態でのみ設定を変更できるようにするべき
である。
From the viewpoint of the reliability of the debugging system, the setting of the monitor interrupt base register 9 should be changed only in the execution state of the monitor program.

【0039】また、モニタプログラムの実行において、
ユーザプログラムの動作の影響を排除するために、モニ
タ割り込みベースレジスタ9に設定される値から特定の
範囲をユーザプログラムからアクセス不可能にすると、
デバッグシステムの信頼性を向上させる。アクセス不可
能にする方法としては、例えばモニタ例外を発生させれ
ば良い。また、アクセス不可能にする範囲を設定するレ
ジスタがあっても良い。
In executing the monitor program,
In order to eliminate the influence of the operation of the user program, if a specific range from the value set in the monitor interrupt base register 9 is made inaccessible from the user program,
Improve the reliability of the debugging system. As a method of making access inaccessible, for example, a monitor exception may be generated. Further, there may be a register for setting a range in which access is disabled.

【0040】なお、本発明の説明においては、モニタプ
ログラム6'をユーザが使用するメモリ7にダウンロード
しているが、マイクロプロセッサからバスアクセス可能
なメモリであれば良く、本発明を限定するものではな
い。
In the description of the present invention, the monitor program 6 'is downloaded to the memory 7 used by the user. However, the memory may be any memory that can be accessed from the microprocessor and is not limited to the present invention. Absent.

【0041】以上のように、モニタリセット後は、信頼
性の高いデバッグインターフェースを介してデバッグモ
ジュール内のモニタプログラムを実行し、システム初期
診断ステップと、ユーザターゲットシステム内のメモリ
へ、モニタプログラムをダウンロードするステップと、
モニタ割り込みのベースアドレスを変更するステップを
実行することによって、それ以降のデバッガ実行は、ユ
ーザターゲットシステム内の診断済みのメモリからモニ
タプログラムをフェッチして行なうことによって、ユー
ザターゲットシステムのメモリシステムが不安定な場合
でも、デバッグでき、ユーザターゲットシステムのメモ
リシステムが安定した場合には、高速にモニタプログラ
ムを実行することが可能となるので、ユーザへの応答速
度を速くすることができるので、ユーザのデバッグ効率
を落さないことができる。
As described above, after the monitor is reset, the monitor program in the debug module is executed via the highly reliable debug interface, the system initial diagnosis step, and the monitor program is downloaded to the memory in the user target system. Steps to
By executing the step of changing the base address of the monitor interrupt, the subsequent debugger execution is performed by fetching the monitor program from the diagnosed memory in the user target system, thereby causing the memory system of the user target system to fail. Even if the system is stable, debugging can be performed. If the memory system of the user target system is stable, the monitor program can be executed at a high speed, and the response speed to the user can be increased. Debugging efficiency can be maintained.

【0042】[0042]

【発明の効果】モニタプログラム起動時には、安定して
いるインターフェース手段からモニタプログラムを供給
して動作させることによって、デバッグの信頼性を高
め、システム初期診断後には、モニタプログラムをメモ
リ上にロードして動作させることによって、モニタプロ
グラムの動作速度を向上することができ極めて有効であ
る。
When the monitor program is started, the monitor program is supplied from the stable interface means to operate the monitor program, thereby increasing the reliability of debugging. After the initial system diagnosis, the monitor program is loaded on the memory. By operating, the operation speed of the monitor program can be improved, which is extremely effective.

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

【図1】本発明の第一の実施の形態におけるデバッグシ
ステムのブロック図
FIG. 1 is a block diagram of a debugging system according to a first embodiment of the present invention;

【図2】図1に示す本発明の第一の実施の形態によるデ
バッグシステムの動作フローチャート
FIG. 2 is an operation flowchart of the debug system according to the first embodiment of the present invention shown in FIG. 1;

【図3】従来方式のデバッグシステムを構成する主要部
分の概略ブロック図
FIG. 3 is a schematic block diagram of main parts constituting a conventional debugging system.

【図4】従来方式のデバッグシステムを構成する主要部
分の概略ブロック図
FIG. 4 is a schematic block diagram of main parts constituting a conventional debugging system.

【図5】従来方式のデバッグシステムの動作フローチャ
ート
FIG. 5 is an operation flowchart of a conventional debugging system.

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

1 マイクロプロセッサ 3 デバッグインターフェース 9 モニタ割り込みベースレジスタ 1 Microprocessor 3 Debug interface 9 Monitor interrupt base register

Claims (3)

【特許請求の範囲】[Claims] 【請求項1】 デバッグのためにモニタプログラムを実
行し、モニタリセット後に外部からモニタプログラムを
供給するインターフェース手段と、ユーザープログラム
の実行中にモニタプログラムへ移行するための割り込み
または例外が発生したときにジャンプする割り込みベク
タのベースアドレスを保持する手段を備えたことを特徴
とするマイクロプロセッサ。
An interface means for executing a monitor program for debugging and supplying the monitor program from the outside after a monitor reset, and when an interrupt or an exception for shifting to the monitor program occurs during execution of a user program. A microprocessor comprising means for holding a base address of an interrupt vector to be jumped.
【請求項2】 請求項1記載のマイクロプロセッサを備
え、少なくとも、モニタリセット後に実行されるモニタ
プログラムによってシステム初期診断を行なうステップ
と、初期診断が正常であれば、モニタプログラムをマイ
クロプロセッサが直接アクセス可能なメモリにロードす
るステップと、モニタ割り込みのベースアドレスを、前
記メモリにロードしたモニタプログラムの中のモニタ割
り込みハンドラのベースアドレスに設定するステップと
を有することを特徴とするデバッグ方法。
2. The system according to claim 1, wherein at least a step of performing a system initial diagnosis by a monitor program executed after a monitor reset, and if the initial diagnosis is normal, the monitor program can be directly accessed by the microprocessor. A debugging method comprising the steps of: loading a memory into a memory; and setting a base address of a monitor interrupt to a base address of a monitor interrupt handler in a monitor program loaded into the memory.
【請求項3】 前記割り込みの処理開始アドレスをベー
スアドレスとして、特定されるメモリ領域に対するユー
ザのアクセスにより例外が発生することを特徴とする請
求項1記載のマイクロプロセッサ。
3. The microprocessor according to claim 1, wherein an exception occurs when a user accesses a specified memory area using the processing start address of the interrupt as a base address.
JP11101062A 1999-04-08 1999-04-08 Microprocessor and debugging method Pending JP2000293402A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP11101062A JP2000293402A (en) 1999-04-08 1999-04-08 Microprocessor and debugging method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP11101062A JP2000293402A (en) 1999-04-08 1999-04-08 Microprocessor and debugging method

Publications (1)

Publication Number Publication Date
JP2000293402A true JP2000293402A (en) 2000-10-20

Family

ID=14290637

Family Applications (1)

Application Number Title Priority Date Filing Date
JP11101062A Pending JP2000293402A (en) 1999-04-08 1999-04-08 Microprocessor and debugging method

Country Status (1)

Country Link
JP (1) JP2000293402A (en)

Similar Documents

Publication Publication Date Title
US5574892A (en) Use of between-instruction breaks to implement complex in-circuit emulation features
US20050216895A1 (en) Method and apparatus for remote debugging of kernel and application software
JP2002041326A (en) Central processing unit for easy program testing and debugging
JPH011039A (en) In-circuit emulator
US20100153786A1 (en) Processor, multiprocessor, and debugging method
US7100088B2 (en) Computer system equipped with a BIOS debugging card
EP0588473B1 (en) Method and apparatus for emulating the environment of a microprocessor
WO2009144892A1 (en) Device emulation support device, device emulation support method, device emulation support circuit, and information processor
JP2513417B2 (en) Information processing device
US7203819B2 (en) Program processing device
JPH07120338B2 (en) Method for a data processor to coordinate the execution of instructions by a coprocessor and the data processor
KR19980079596A (en) Method and apparatus for implementing processor quiescent state in multiprocessor system
JP2000293402A (en) Microprocessor and debugging method
JP2003122594A (en) Semiconductor device and evaluation device
US6098183A (en) Method of debugging in a computer system
KR100303307B1 (en) Downloading device and method for debugging operation in real-time operating system
JP2010015364A (en) Multiprocessor system and information processor
JPH06103109A (en) Data processor and debug device using the same
JP3449812B2 (en) Control electronics
JP2679591B2 (en) Emulation chip and in-circuit emulator
US7194401B2 (en) Configuration for in-circuit emulation of a program-controlled unit
JPS6152747A (en) Microprocessor
JPH02135545A (en) Execution control processing system for debugger
US9342359B2 (en) Information processing system and information processing method
JP3046492B2 (en) Computer system