RL78マイコン基板(RL78/G13)|Internet Explorerからrl78flashを起動して通信(シリアルモニタ)する
前のエントリでInternet Explorerからrl78flash(オープンソースソフトウェアのRL78内蔵フラッシュメモリ書き
換えツール)を起動してみたのですが、rl78flashには書き込み機能の他にシリアルポートと通信(シリアルモニタ)
する機能もありますので、それを試してみました。ちょっと残念だったのは、rl78flashのキー入力送信機能を
無効化(nulからの入力にリダイレクト)してやらないとrl78flashが起動して直ぐ終了してしまうのと、rl78flashの
プロセスを終了させる為にWindowsの強制終了コマンド(taskkill)を実行しなければならなかったことでした。
(あと、今さらですが、StdOut.ReadLine()がブロッキングリードであることも。)
スクリプト: Script4.html
内容:
<script type="text/javascript">
var WshShell = new ActiveXObject('WScript.Shell');
document.open();
document.write('rl78flash -m 2 -rt 9600 COM14' + '<br>');
document.close();
var oExec = WshShell.Exec('cmd /c title=running rl78flash & "E:\\tools\\micom\\Renesas\\Programming Tools\\JScript\\rl78flash.exe" -m 2 -rt 9600 COM14 < nul 2>&1');
document.open();
for (i = 0; i < 10; i++)
{
document.write(oExec.StdOut.ReadLine() + '<br>');
}
document.close();
var oKill = WshShell.Exec('cmd /c title=terminating rl78flash & taskkill /f /im rl78flash.exe');
while (oExec.Status == 0) {}
</script>
実行方法と実行結果は以下の通りです。
start "" /wait "c:\Program Files\Internet Explorer\iexplore.exe" -nohangrecovery -noframemerging -nosessionmerging "E:\tools\micom\Renesas\Programming Tools\JScript\Script4.html"




今回も前のエントリと同様にコマンドプロンプトが表示されてしまうのですが、今回はタイトルバーを変更する
ようにしてみました。


追記 : 補足
なお、rl78flashのキー入力送信機能を無効化(nulからの入力にリダイレクト)しなかった場合には、以下のように
エラーになります。
スクリプト: Script4b.html
内容: 赤字の箇所を削除
<script type="text/javascript">
var WshShell = new ActiveXObject('WScript.Shell');
document.open();
document.write('rl78flash -m 2 -rt 9600 COM14' + '<br>');
document.close();
var oExec = WshShell.Exec('cmd /c title=running rl78flash & "E:\\tools\\micom\\Renesas\\Programming Tools\\JScript\\rl78flash.exe" -m 2 -rt 9600 COM14 < nul 2>&1');
document.open();
for (i = 0; i < 10; i++)
{
document.write(oExec.StdOut.ReadLine() + '<br>');
}
document.close();
var oKill = WshShell.Exec('cmd /c title=terminating rl78flash & taskkill /f /im rl78flash.exe');
while (oExec.Status == 0) {}
</script>

追記 : メモ
エディタを使わずブラウザだけでGoogle Appの開発が可能に - マイナビニュース
http://news.mynavi.jp/news/2016/10/22/107/
追記 : メモ
Google AppとChrome App(ゆくゆくは廃止予定らしい)は別物なのかな?
換えツール)を起動してみたのですが、rl78flashには書き込み機能の他にシリアルポートと通信(シリアルモニタ)
する機能もありますので、それを試してみました。ちょっと残念だったのは、rl78flashのキー入力送信機能を
無効化(nulからの入力にリダイレクト)してやらないとrl78flashが起動して直ぐ終了してしまうのと、rl78flashの
プロセスを終了させる為にWindowsの強制終了コマンド(taskkill)を実行しなければならなかったことでした。
(あと、今さらですが、StdOut.ReadLine()がブロッキングリードであることも。)
スクリプト: Script4.html
内容:
<script type="text/javascript">
var WshShell = new ActiveXObject('WScript.Shell');
document.open();
document.write('rl78flash -m 2 -rt 9600 COM14' + '<br>');
document.close();
var oExec = WshShell.Exec('cmd /c title=running rl78flash & "E:\\tools\\micom\\Renesas\\Programming Tools\\JScript\\rl78flash.exe" -m 2 -rt 9600 COM14 < nul 2>&1');
document.open();
for (i = 0; i < 10; i++)
{
document.write(oExec.StdOut.ReadLine() + '<br>');
}
document.close();
var oKill = WshShell.Exec('cmd /c title=terminating rl78flash & taskkill /f /im rl78flash.exe');
while (oExec.Status == 0) {}
</script>
実行方法と実行結果は以下の通りです。
start "" /wait "c:\Program Files\Internet Explorer\iexplore.exe" -nohangrecovery -noframemerging -nosessionmerging "E:\tools\micom\Renesas\Programming Tools\JScript\Script4.html"




今回も前のエントリと同様にコマンドプロンプトが表示されてしまうのですが、今回はタイトルバーを変更する
ようにしてみました。


追記 : 補足
なお、rl78flashのキー入力送信機能を無効化(nulからの入力にリダイレクト)しなかった場合には、以下のように
エラーになります。
スクリプト: Script4b.html
内容: 赤字の箇所を削除
<script type="text/javascript">
var WshShell = new ActiveXObject('WScript.Shell');
document.open();
document.write('rl78flash -m 2 -rt 9600 COM14' + '<br>');
document.close();
var oExec = WshShell.Exec('cmd /c title=running rl78flash & "E:\\tools\\micom\\Renesas\\Programming Tools\\JScript\\rl78flash.exe" -m 2 -rt 9600 COM14
document.open();
for (i = 0; i < 10; i++)
{
document.write(oExec.StdOut.ReadLine() + '<br>');
}
document.close();
var oKill = WshShell.Exec('cmd /c title=terminating rl78flash & taskkill /f /im rl78flash.exe');
while (oExec.Status == 0) {}
</script>

追記 : メモ
エディタを使わずブラウザだけでGoogle Appの開発が可能に - マイナビニュース
http://news.mynavi.jp/news/2016/10/22/107/
追記 : メモ
Google AppとChrome App(ゆくゆくは廃止予定らしい)は別物なのかな?
- 関連記事
-
- RL78マイコン基板(RL78/G13)|Internet Explorerからrl78flashを起動して通信(シリアルモニタ)する
- RL78マイコン基板(RL78/G13)|Internet Explorerからrl78flashを起動してフラッシュ書き込みする
- RL78マイコン基板(RL78/G13)|Internet ExplorerからOCXを使わずにCOMポートを読み書きする
- RL78マイコン基板(RL78/G13)|KurumiWriter(改)で書き込んで自作utf8to932コマンドで日本語表示
- RL78マイコン基板(RL78/G13)|KurumiWriter(改)で書き込んでmoreコマンドでシリアル通信する設定
- RL78マイコン基板(RL78/G13)|KurumiWriter V1.00(ソース公開版)のフラッシュ書き込み時間の改善
- RL78マイコン基板(RL78/G13)|KurumiWriter V2.10とrl78flashの書き込み時間の比較 (CP2102編)
- RL78マイコン基板(RL78/G13)|CP2102+rl78flashで秋月のRL78搭載変換モジュールに書き込み
- RL78マイコン基板(RL78/G13)|CP2102+KurumiWriterで秋月のRL78搭載変換モジュールに書き込み
- RL78マイコン基板(RL78/G13)|rl78flashで書き込んでPython+pySerialでシリアル通信する設定
- RL78マイコン基板(RL78/G13)|TeraTermでログにタイムスタンプを付けて自動保存してくれる機能
- RL78マイコン基板(RL78/G13)|WebコンパイラのSerial.printに日本語出力させてTeraTermで表示
- RL78マイコン|日立/RSDの人のCC-RLの論文が情報処理学会の優秀論文(全54編)の1つに選ばれていた
- RL78マイコン基板(RL78/G13)|rl78flashで書き込んでTeraTermでシリアル通信する設定
- RL78マイコン基板(RL78/G13)|KurumiWriter V1.00(ソース公開版)とrl78flashの書き込み時間の比較
2016/10/06 blog-entry-825 category: RL78 /* 16bit,8bit CISC */
| h o m e |