JP2001147830A - Method for changing state of real time os - Google Patents

Method for changing state of real time os

Info

Publication number
JP2001147830A
JP2001147830A JP32932099A JP32932099A JP2001147830A JP 2001147830 A JP2001147830 A JP 2001147830A JP 32932099 A JP32932099 A JP 32932099A JP 32932099 A JP32932099 A JP 32932099A JP 2001147830 A JP2001147830 A JP 2001147830A
Authority
JP
Japan
Prior art keywords
real
time
change
state
system call
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
JP32932099A
Other languages
Japanese (ja)
Inventor
Koji Yamato
晃治 大和
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.)
NEC Microcomputer Technologies Ltd
Original Assignee
NEC Microcomputer Technologies 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 NEC Microcomputer Technologies Ltd filed Critical NEC Microcomputer Technologies Ltd
Priority to JP32932099A priority Critical patent/JP2001147830A/en
Publication of JP2001147830A publication Critical patent/JP2001147830A/en
Pending legal-status Critical Current

Links

Landscapes

  • Debugging And Monitoring (AREA)

Abstract

PROBLEM TO BE SOLVED: To provide a method for realizing the state change of a real time OS at the time of the debug of an application using the real time OS. SOLUTION: At the time of the debug of an application 104 operating on a real time OS 105 of a target system, when a state change request 102 of the real time OS 105 is issued, a debugger 103 allows a state change routine 106 placed on a monitor being one part of the debugger 103 on the target system to generate registered interruption. When the interruption is generated, the real time OS 105 executes the interruption pre-processing, and the state change routine 106 sets a system call parameter for changing the present value to a target value, and issues a system call, and the real time OS 105 processes the system call, and executes the state change processing.

Description

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

【0001】[0001]

【発明の属する技術分野】この発明は、リアルタイムO
Sの状態の変更を実現できるリアルタイムOSの状態変
更方法に関する。
BACKGROUND OF THE INVENTION 1. Field of the Invention
The present invention relates to a method for changing the state of a real-time OS that can change the state of S.

【0002】[0002]

【従来の技術】従来、デバッガには、アプリケーション
の変数値を変更する機能が備わっている。変数の値が期
待する値と異なる場合には、変数値変更機能を用いて変
数の値を変更することにより、アプリケーションの動き
をデバッグすることができる。
2. Description of the Related Art Conventionally, a debugger has a function of changing a variable value of an application. If the value of the variable is different from the expected value, the behavior of the application can be debugged by changing the value of the variable using the variable value change function.

【0003】[0003]

【発明が解決しようとする課題】しかし、この従来技術
には、次のような問題点があった。その問題点とは、リ
アルタイムOS上のアプリケーションで、リアルタイム
OSの状態変更ができないということである。
However, this prior art has the following problems. The problem is that an application on the real-time OS cannot change the state of the real-time OS.

【0004】リアルタイムOS上のアプリケーションで
は、処理をタスクという単位に切り分け、タスクという
処理単位を、セマフォやイベントフラグといった同期メ
カニズムを用いて実行制御している。リアルタイムOS
の状態変更とは、タスクの状態(実行、実行可能、待ち
等)、セマフォ、イベントフラグの値といったものの変
更である。これらは密接に関係し合っており、1つの値
の変更が他の値に影響を与える。通常のデバッガにはリ
アルタイムOSに関する知識が存在しないため、このよ
うな関連する値を把握することはできず、リアルタイム
OSの状態変更はできない。
[0004] In an application on a real-time OS, processing is divided into units called tasks, and the execution units of the tasks are controlled using a synchronization mechanism such as a semaphore or an event flag. Real-time OS
Is a change of a task state (executable, executable, waiting, etc.), a semaphore, an event flag value, and the like. These are closely related, and changing one value affects the other. Since the ordinary debugger has no knowledge about the real-time OS, such a related value cannot be grasped, and the state of the real-time OS cannot be changed.

【0005】この発明の目的は、リアルタイムOSを用
いたアプリケーションのデバッグにおいて、リアルタイ
ムOSの状態の変更を実現できるリアルタイムOSの状
態変更方法を提供することにある。
An object of the present invention is to provide a method for changing the state of a real-time OS that can change the state of the real-time OS when debugging an application using the real-time OS.

【0006】[0006]

【課題を解決するための手段】この発明のリアルタイム
OSの状態変更方法は、ターゲットシステムのリアルタ
イムOS上で動作するアプリケーションをデバッグする
場合に、割り込み処理としてデバッガ内にリアルタイム
OSの状態を変更する状態変更ルーチンを置き、状態変
更ルーチンが、リアルタイムOSのシステムコールを利
用してリアルタイムOSの状態を変更することを特徴と
する。
According to the present invention, there is provided a method for changing the state of a real-time OS, the method comprising the steps of, when debugging an application operating on the real-time OS of a target system, changing the state of the real-time OS in a debugger as interrupt processing. A change routine is provided, and the state change routine changes the state of the real-time OS using a system call of the real-time OS.

【0007】[0007]

【発明の実施の形態】次に、この発明の実施の形態につ
いて図面を参照して説明する。
Next, an embodiment of the present invention will be described with reference to the drawings.

【0008】図1は、この発明のリアルタイムOSの状
態変更方法についての第1の実施の形態を説明する構成
図である。図1を参照すると、この発明のリアルタイム
OSの状態変更方法の実施の形態は、リアルタイムOS
上で動作するアプリケーションのデバッグを行うアプリ
ケーション開発者101と、ホストコンピュータ上で動
作するデバッガ103と、ターゲットシステム上にあ
り、デバッガの一部であるモニタ109と、モニタ10
上に置かれた、リアルタイムOSの状態を変更する状態
変更ルーチン106と、ターゲットシステム上にあるリ
アルタイムOS105と、リアルタイムOS105上で
動作するアプリケーション104から構成される。
FIG. 1 is a block diagram for explaining a first embodiment of a method for changing the state of a real-time OS according to the present invention. Referring to FIG. 1, an embodiment of a real-time OS state changing method according to the present invention is a real-time OS.
An application developer 101 for debugging an application operating on the host computer; a debugger 103 for operating on the host computer; a monitor 109 on the target system, which is a part of the debugger;
It comprises a state change routine 106 for changing the state of the real-time OS, a real-time OS 105 on the target system, and an application 104 running on the real-time OS 105.

【0009】ここで、状態変更ルーチンとは、リアルタ
イムOSの状態を変更処理するプログラムルーチンであ
り、状態変更ルーチンは、ターゲットシステムの割り込
み処理として登録する。
Here, the state change routine is a program routine for changing the state of the real-time OS, and the state change routine is registered as interrupt processing of the target system.

【0010】次に、図1および図2を参照して第1の実
施の形態の動作について詳細に説明する。図2は、第1
の実施の形態の動作を説明するフローチャートである。
Next, the operation of the first embodiment will be described in detail with reference to FIGS. FIG. 2 shows the first
5 is a flowchart illustrating the operation of the embodiment.

【0011】まず、アプリケーション開発者101が、
デバッガ103に状態変更要求102を発行する。次
に、デバッガ103は、状態変更ルーチン103が登録
された割り込みを発生させる(ステップ204)。割り
込みが発生すると、リアルタイムOS105によって、
実行タスクのコンテキストへのセーブ等の割り込み前処
理が行われ(ステップ205)、その後、処理が状態変
更ルーチン106に移る。そして、状態変更ルーチン1
06では、目的の値に変更するためのシステムコールパ
ラメータを設定し(ステップ206)、システムコール
を発行する(ステップ207)。
First, the application developer 101
Issues a status change request 102 to the debugger 103. Next, the debugger 103 generates an interrupt in which the state change routine 103 is registered (step 204). When an interrupt occurs, the real-time OS 105
Pre-interruption processing such as saving the execution task in the context is performed (step 205), and then the processing moves to the state change routine 106. Then, the state change routine 1
At 06, a system call parameter for changing to a target value is set (step 206), and a system call is issued (step 207).

【0012】その後、リアルタイムOS105によりシ
ステムコールが処理され(ステップ208)、状態の変
更108が行われる。最後に、システムコール処理終了
後、リアルタイムOSの割り込み終了処理部に処理を移
し(ステップ209)、ディスパッチ処理が必要な場合
はここでディスパッチが行われる。以上の動作によりリ
アルタイムOS105上のアプリケーション104の状
態変更を実行する。
Thereafter, the system call is processed by the real-time OS 105 (step 208), and the state is changed 108. Finally, after the end of the system call processing, the processing is shifted to an interrupt end processing unit of the real-time OS (step 209), and if dispatch processing is required, the dispatch is performed here. With the above operation, the state of the application 104 on the real-time OS 105 is changed.

【0013】次に、この発明の第2の実施の形態につい
て説明する。図3は、この発明のリアルタイムOSの状
態変更方法についての第2の実施の形態を説明する構成
図である。
Next, a second embodiment of the present invention will be described. FIG. 3 is a configuration diagram illustrating a second embodiment of the method for changing the state of the real-time OS according to the present invention.

【0014】図1に示す実施の形態では、状態変更ルー
チン106をターゲット上に置いたため、割り込み処理
として動作させることができた。しかしながら、組み込
み分野においては、ターゲットに十分な空きメモリがあ
る場合というのは少ない。そこで状態変更ルーチンをタ
ーゲット上に置かず、ホスト側に置いた場合の実施の形
態を説明する。
In the embodiment shown in FIG. 1, since the state change routine 106 is placed on the target, it can be operated as an interrupt process. However, in the embedded field, it is rare that the target has sufficient free memory. Therefore, an embodiment in which the state change routine is not placed on the target but placed on the host will be described.

【0015】図3を参照すると、この発明のリアルタイ
ムOSの状態変更方法の実施の形態は、リアルタイムO
S305上で動作するアプリケーション304のデバッ
グを行うアプリケーション開発者301と、ホストコン
ピュータ上で動作するデバッガ303と、デバッガ30
3上に置かれた状態変更ルーチン306と、ターゲット
システム上にあるリアルタイムOS305と、リアルタ
イムOS305上で動作するアプリケーション304か
ら構成される。
Referring to FIG. 3, an embodiment of a method for changing the state of a real-time OS according to the present invention is a real-time OS.
An application developer 301 that debugs an application 304 that runs on S305, a debugger 303 that runs on a host computer,
3, a status change routine 306, a real-time OS 305 on the target system, and an application 304 running on the real-time OS 305.

【0016】次に、図3および図4を参照して第2の実
施の形態の動作について詳細に説明する。図4は、第2
の実施の形態の動作を説明するフローチャートである。
Next, the operation of the second embodiment will be described in detail with reference to FIGS. FIG.
5 is a flowchart illustrating the operation of the embodiment.

【0017】まず、アプリケーション開発者301がデ
バッガ303に状態変更要求302を発行する。デバッ
ガ303内の状態変更ルーチン306は、システムを一
時的に停止し(ステップ404)、実行中のタスクに対
するコンテキストのセーブ等の割り込みの前処理をシミ
ュレートする(ステップ405)。次に、目的の値に変
更するためのシステムコールパラメータの設定、プログ
ラムカウンタ(PC)をシステムコールの先頭アドレス
に変更し(ステップ406)、およびシステムコールの
戻りアドレスを割り込み終了部の先頭アドレスに設定す
る(ステップ407)。
First, an application developer 301 issues a status change request 302 to a debugger 303. The state change routine 306 in the debugger 303 temporarily stops the system (step 404), and simulates pre-processing of an interrupt such as saving a context for the task being executed (step 405). Next, a system call parameter for changing to a target value is set, a program counter (PC) is changed to a head address of a system call (step 406), and a return address of the system call is set to a head address of an interrupt end part. It is set (step 407).

【0018】ここでシステムを実行させる(ステップ4
08)ことにより、リアルタイムOSによりシステムコ
ールが処理され(ステップ409)、状態の変更が行わ
れる。システムコールの処理終了後、リアルタイムOS
305の割り込み終了処理部に処理が移り(ステップ4
10)、ディスパッチ処理が必要な場合はここでディス
パッチが行われ、状態変更処理が終了する。
Here, the system is executed (step 4).
08), the system call is processed by the real-time OS (step 409), and the state is changed. After processing the system call, the real-time OS
The processing shifts to an interrupt end processing unit 305 (step 4).
10) If dispatch processing is required, dispatch is performed here and the state change processing ends.

【0019】また、図3において、モニタ309は状態
変更処理に関係しない。これにより、ターゲット上にモ
ニタ309が存在しない場合でも状態変更を行うことが
可能となる。これは、ターゲットに十分な空きメモリが
得られない組み込み分野のアプリケーション開発、例え
ば、ICEを使った場合においても、リアルタイムOS
の状態変更機能を実現できることを表す。
In FIG. 3, the monitor 309 is not involved in the state change processing. As a result, the state can be changed even when the monitor 309 does not exist on the target. This is because even in the case of application development in the embedded field where sufficient free memory cannot be obtained in the target, for example, when using ICE, the real-time OS
Means that the status change function can be realized.

【0020】[0020]

【発明の効果】以上説明したように、この発明は、リア
ルタイムOS上のアプリケーションで、リアルタイムO
Sの状態を変更することができる。
As described above, the present invention is an application on a real-time OS, and
The state of S can be changed.

【0021】また、この発明は、リアルタイムOSの状
態の変更によって、不具合修正、再構築、再実行といっ
た作業をすることなく、デバッグを続けることができる
ため、リアルタイムOS上で動作するアプリケーション
のデバッグに費やす時間を大幅に短縮することができ
る。
Further, according to the present invention, by changing the state of the real-time OS, debugging can be continued without performing operations such as defect correction, reconstruction, and re-execution. The time spent can be greatly reduced.

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

【図1】この発明のリアルタイムOSの状態変更方法に
ついての第1の実施の形態を説明する構成図である。
FIG. 1 is a configuration diagram illustrating a first embodiment of a real-time OS state changing method according to the present invention;

【図2】第1の実施の形態の動作を説明するフローチャ
ートである。
FIG. 2 is a flowchart illustrating the operation of the first embodiment.

【図3】この発明のリアルタイムOSの状態変更方法に
ついての第2の実施の形態を説明する構成図である。
FIG. 3 is a configuration diagram illustrating a second embodiment of the method for changing the state of the real-time OS according to the present invention;

【図4】第2の実施の形態の動作を説明するフローチャ
ートである。
FIG. 4 is a flowchart illustrating the operation of the second embodiment.

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

101,301 アプリケーション開発者 102,302 状態変更要求 103,303 デバッガ 104,304 アプリケーション 105,305 リアルタイムOS 106,306 状態変更ルーチン 107,307 システムコール発行 108,308 状態変更操作 109,309 モニタ 101, 301 Application developer 102, 302 State change request 103, 303 Debugger 104, 304 Application 105, 305 Real-time OS 106, 306 State change routine 107, 307 System call issuance 108, 308 State change operation 109, 309 Monitor

Claims (7)

【特許請求の範囲】[Claims] 【請求項1】ターゲットシステムのリアルタイムOS上
で動作するアプリケーションをデバッグする場合に、割
り込み処理としてデバッガ上にリアルタイムOSの状態
を変更する状態変更ルーチンを置き、状態変更ルーチン
が、リアルタイムOSのシステムコールを利用してリア
ルタイムOSの状態を変更することを特徴とするリアル
タイムOSの状態変更方法。
When debugging an application running on a real-time OS of a target system, a status change routine for changing the state of the real-time OS is provided on the debugger as an interrupt process, and the status change routine performs a system call of the real-time OS. A method of changing the state of a real-time OS, wherein the method changes the state of the real-time OS by using the method.
【請求項2】前記状態変更ルーチンは、ターゲットシス
テム上にありデバッガの一部であるモニタ上に置かれる
ことを特徴とする請求項1に記載のリアルタイムOSの
状態変更方法。
2. The method according to claim 1, wherein the state change routine is placed on a monitor which is on a target system and is a part of a debugger.
【請求項3】前記状態変更ルーチンは、ホストコンピュ
ータのデバッガ上に置かれることを特徴とする請求項1
に記載のリアルタイムOSの状態変更方法。。
3. The system according to claim 1, wherein said state change routine is located on a debugger of a host computer.
3. The method for changing the state of the real-time OS described in 1. above. .
【請求項4】ターゲットシステムのリアルタイムOS上
で動作するアプリケーションのデバッグにおいて、リア
ルタイムOSの状態変更要求があると、デバッガは、タ
ーゲットシステム上にありデバッガの一部であるモニタ
上に置かれた状態変更ルーチンが登録された割り込みを
発生させ、 割り込みが発生すると、リアルタイムOSが割り込み前
処理を行い、 状態変更ルーチンが、目的の値に変更するためのシステ
ムコールパラメータを設定すると共にシステムコールを
発行し、 リアルタイムOSがシステムコールを処理して状態の変
更を行うことを特徴とするリアルタイムOSの状態変更
方法。
4. In debugging an application running on a real-time OS of a target system, if a request to change the state of the real-time OS is made, the debugger is placed on a monitor that is on the target system and is a part of the debugger. The change routine generates a registered interrupt. When an interrupt occurs, the real-time OS performs pre-interrupt processing, and the state change routine sets a system call parameter for changing to a target value and issues a system call. A method for changing the state of a real-time OS, wherein the real-time OS processes a system call to change the state.
【請求項5】ターゲットシステムのリアルタイムOS上
で動作するアプリケーションのデバッグにおいて、リア
ルタイムOSの状態変更要求があると、ホストコンピュ
ータ側のデバッガ上に置かれた状態変更ルーチンが、シ
ステムを一時的に停止し、 割り込みの前処理をシミュレートし、 目的の値に変更するためのシステムコールパラメータを
設定し、 プログラムカウンタをシステムコールの先頭アドレスに
変更し、 システムコールの戻りアドレスを割り込み終了部の先頭
アドレスに設定し、 システムを実行し、 リアルタイムOSがシステムコールを処理して状態の変
更を行うことを特徴とするリアルタイムOSの状態変更
方法。
5. In debugging an application running on a real-time OS of a target system, if there is a request to change the status of the real-time OS, a status change routine placed on a debugger on the host computer temporarily stops the system. Simulate interrupt preprocessing, set system call parameters to change to the desired value, change the program counter to the start address of the system call, and change the return address of the system call to the start address of the interrupt end. A real-time OS that executes a system call and changes a status by processing a system call.
【請求項6】ターゲットシステムのリアルタイムOS上
で動作するアプリケーションのデバッグにおいて、リア
ルタイムOSの状態変更要求があると、デバッガが、タ
ーゲットシステム上にありデバッガの一部であるモニタ
上に置かれた状態変更ルーチンが登録された割り込みを
発生させる手順と、 割り込みが発生すると、リアルタイムOSが割り込み前
処理を行う手順と、 状態変更ルーチンが、目的の値に変更するためのシステ
ムコールパラメータを設定すると共にシステムコールを
発行する手順と、 リアルタイムOSがシステムコールを処理して状態の変
更を行う手順とを実行させるためのプログラムを記録し
たコンピュータ読み取り可能な記録媒体。
6. In debugging an application running on a real-time OS of a target system, when a request to change the state of the real-time OS is made, the debugger is placed on a monitor that is on the target system and is a part of the debugger. A procedure for generating an interrupt in which the change routine is registered; a procedure for the real-time OS to perform pre-interruption processing when an interrupt occurs; and a state change routine for setting a system call parameter for changing to a target value and setting the system call parameter. A computer-readable recording medium recording a program for executing a procedure for issuing a call and a procedure for a real-time OS to process a system call and change a state.
【請求項7】ターゲットシステムのリアルタイムOS上
で動作するアプリケーションのデバッグにおいて、リア
ルタイムOSの状態変更要求があると、ホストコンピュ
ータ側のデバッガ上に置かれた状態変更ルーチンが、シ
ステムを一時的に停止する手順と、 割り込みの前処理をシミュレートする手順と、 目的の値に変更するためのシステムコールパラメータを
設定する手順と、 プログラムカウンタをシステムコールの先頭アドレスに
変更する手順と、 システムコールの戻りアドレスを割り込み終了部の先頭
アドレスに設定する手順と、 システムを実行する手順と、 リアルタイムOSがシステムコールを処理して状態の変
更を行う手順とを実行させるためのプログラムを記録し
たコンピュータ読み取り可能な記録媒体。
7. In debugging an application running on a real-time OS of a target system, when there is a request to change the status of the real-time OS, a status change routine placed on a debugger on the host computer temporarily stops the system. To simulate interrupt preprocessing, to set system call parameters to change to the desired value, to change the program counter to the start address of the system call, and to return from the system call. A computer-readable program recording a program for executing a procedure for setting an address to a start address of an interrupt end unit, a procedure for executing a system, and a procedure for a real-time OS to process a system call and change a state. recoding media.
JP32932099A 1999-11-19 1999-11-19 Method for changing state of real time os Pending JP2001147830A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP32932099A JP2001147830A (en) 1999-11-19 1999-11-19 Method for changing state of real time os

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP32932099A JP2001147830A (en) 1999-11-19 1999-11-19 Method for changing state of real time os

Publications (1)

Publication Number Publication Date
JP2001147830A true JP2001147830A (en) 2001-05-29

Family

ID=18220149

Family Applications (1)

Application Number Title Priority Date Filing Date
JP32932099A Pending JP2001147830A (en) 1999-11-19 1999-11-19 Method for changing state of real time os

Country Status (1)

Country Link
JP (1) JP2001147830A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2006500695A (en) * 2002-09-23 2006-01-05 テレフオンアクチーボラゲット エル エム エリクソン(パブル) Interactive software probing
JP2007510992A (en) * 2003-11-10 2007-04-26 ローベルト ボッシュ ゲゼルシャフト ミット ベシュレンクテル ハフツング Simulation system and computer-implemented method for simulating and verifying a control system

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2006500695A (en) * 2002-09-23 2006-01-05 テレフオンアクチーボラゲット エル エム エリクソン(パブル) Interactive software probing
JP2007510992A (en) * 2003-11-10 2007-04-26 ローベルト ボッシュ ゲゼルシャフト ミット ベシュレンクテル ハフツング Simulation system and computer-implemented method for simulating and verifying a control system

Similar Documents

Publication Publication Date Title
JP3571976B2 (en) Debugging apparatus and method, and program recording medium
JP2001147830A (en) Method for changing state of real time os
JPH0581070A (en) Programmable controller and user program execution method in programmable controller
JP2007004516A (en) Program debugging method of built-in system
JPH02231634A (en) Method for maintaining interchangeability of software
JPS60124746A (en) Data processing unit
JP2653411B2 (en) How to set breakpoints
JP3029355B2 (en) Single-step instruction execution method
JP3102381B2 (en) Task debugging device, task debugging method, and recording medium therefor
JP2000181746A (en) Processor with debug support and debug function execution control method
JPH1040131A (en) Program debug method
JPS61210439A (en) Tracing control system for task
JP3099810B2 (en) Logic simulation apparatus, logic verification speedup method used therefor, and recording medium storing control program for the method
JPS5835648A (en) Program execution controlling system
JPH04287231A (en) Microprocessor
JPH0324637A (en) Method for managing resource for program debagging
JPH07110773A (en) Task switching device
JPS62194549A (en) Cpu-io parallel working simulation system
JPH07105045A (en) Debugging system for information processor function test program
JPS63217431A (en) Monitor system for analysis of program execution
JPH0239332A (en) Software break system
JPS61235955A (en) Program debugging system
JPH0362228A (en) Pseudo instruction generation system for virtual machine system
JPS63300330A (en) Debugging method for firmware
JPH0863371A (en) Programming method of event driven type simulator