耐ノイズ性やEMI対策などを行っていない分安いので、この基板が向いている方面=安価なので学校などで使う学習用ボードに最適と思います。実際に販売する製品を作るのであればいろいろ考慮した基板を書き直す必要があると思います。
回路図を良く見てみたらDIOが232レベルシフタの空きチャンネルに接続されているじゃん。
http://mes.sourceforge.jp/mes2/sh3/sh3sch.jpg
この当時冗談だと思ってんだけどまじで「手クロック」をしろってことかぁ。
こういうジョークがあった。アメリカ国民は自ら銃をにぎり自衛する権利がある。誰から身を守るのか。騒がしい隣人ではない。合衆国憲法修正第2条が認めている権利とは、国民は合衆国政府から身を守る自衛権を認めているというのだ。従って"国家権力が"国民から銃を取り上げるという憲法修正は違法このうえない。もちろんこれは左派のジョークだが、力の無いものが力を手に入れようとするときには苦し紛れでも理屈を押し通す必要があろう。
ところで、今回の核実験で一番困ってるのは誰かと考えると、やっぱり中国なんだろう。中国にとって最悪のシナリオとは(ありえないが)米国による北制圧、金体制の崩壊。イラクのように体制崩壊後に無理やり親米政権を創設されたら国境を接している大国としていい状態ではないだろう。中国としては北朝鮮は現在の体勢のまま(利でも疫でもない状態で)維持してほしいのが本音なんだろう。朝鮮半島は53年以後も代理戦争のいけにえにされつづけているのだ。となると今回の有事の背後に中国はいない。中国が困ってうれしいのはだれか?ブッシュか?今回の有事の背後にはじつはブッシュの陰謀が隠されている。なんて考えるとスパイ小説の世界に引き込まれる。
スパイ小説ネタを押し通すと、ロシア陰謀説を仮説してみるのもありだ。実験にロシアが軍事協力をしていたならば。ロシアとしてもうるさいお隣さんには静かに暮らしてほしいところだ。そうなるとアメリカと利点が一致する。ブッシュからの要請でロシアの工作部隊が動き、北に言いよって実験の支援を行った。全ては茶番劇で現実の脅威は空虚のままだと(それでも得をする人間は数知れない)。
ネタはその程度にしておいて、現実のわが国をみると、依然として決定力を持っていない。だが国民感情としては「やっぱあの国やべーぜ」ということで全体が少し右に動いたと思う。仮想敵国を作るのは国民の意識を一方に向けるためにどの国の政権も行ってきた手法だが、はからずも与党にとってはうれしい材料になったかもしれない。
SH7760のデータシートSSI(シリアルサウンドインターフェース)の章とphilipsのオーディオコーデックICのデータシートをつき合わせて読んでみると3本を接続するだけで音が鳴らせるんじゃないかと思ってみた。無性に実験したくなった。今日はエンジニアモード。
高信頼性ソフトウェア 講演会 ----組み込みで主導する日本のソフトウェア技術 主催 名古屋市工業研究所 製造物に対する安全についての社会の注目が集まっています。日本の組み込み ソフトウェアは、品質が高いことが業界では国際的に認められています。しか し、その検証方法を定式化していない場合、または保守、点検を始めとする作 業標準が安全のため確立していない場合があります。製品については、ソフト ウェアの検証方法を体系的に構築することが求められています。TOPPERSプロ ジェクトでは、高信頼性ソフトウェアをめざした取り組みが行なわれておりま す。TOPPERSプロジェクトに参加している(株)エーアイコーポレーションは、 取り扱いツールであるPoly Space Verifierを中心に、この最先端の分野で活躍 されています。 組み込みソフトウェアの高信頼性のために、IEC61508に基づく機能安全と、そ の自動車向けのガイドであるISO26262の取り組みがあります。機能安全の規定 にもとづいたC言語のサブセット定義として、MISRA-Cがあります。このMISRA-C は、日本からの意見を中心に大幅に2004年に改訂し、自動車技術会が翻訳を発 行し、10月には日本規格協会より解説書を発行する予定です。さらに、ISO/IEC 15504に基づいたAutomotive SPICEモデルによる現場の作業診断に対する取り組 みを行っており、これらについてご報告いたします。 日 時: 平成18年10月24日(火曜) 13:30 —16:45 場 所: 名古屋市工業研究所 ホール参加してみる。↓関連書籍
マイコンピュータ→プロパティ→詳細設定タブ→環境変数→ Path に C:\cygwin\bin を追加 再起動inetdのインストール
インストールしておくもの Admin/cygrunsrv Net/xinetdサービスの起動設定
$ /usr/sbin/inetd.exe --install-as-service
インストールしておくもの Admin/cygrunsrv Net/nfs-servernfs-server-config を実行する
$ nfs-server-config This script sets up a default configuration for running an NFS server under Cygwin. As part of this setup, the script will do the following: 1) Create a user account to run the services under. [OPTIONAL] 2) Install portmap, mountd, and nfsd as Windows services. 3) Create a sample exports file. 4) Create a sample uid/gid mapping file. After installing, please read the nfs-server README for Cygwin: /usr/share/doc/Cygwin/nfs-server-2.3-*.README This document contains notes on installation and documents known problems and workarounds with the NFS server; ex: - ISSUE : Recommend using ntsec - ISSUE : Daemons are single-threaded - ISSUE : Daemons require 'impersonate logged on user' right. - ISSUE : Daemons cannot re-export mapped network drives - ISSUE : Daemons expect 'nobody' or 'Guest' as anonymous user - ISSUE : Portmap service fails to start - ISSUE : Cannot export Windows directories not under Cygwin root - ISSUE : Considerations when mapping UIDs/GIDs Do you want to continue? (yes/no)と聞いてくるので yes とタイプ
Checking for other Unix environments on this system ... Good! There doesn't seem to be any other Unix environments installed. You can choose to install the services so that they run under the local system account, or under a separate user account. Which option you should choose depends on which version of Windows you are running: Windows 2000 : You may run nfsd under either a local system account or a separate user account. You _probably_ want to run under the local system account. Windows XP : You _must_ run nfsd under a separate user account. If you choose to run nfsd under a separate user account, you will be prompted for a user name and password. If the user name you supply does not exist, it will be created. Do you want to run nfsd under a separate user account? (yes/no)「WindowsXPだと__必ず__別ユーザを作りなさいよ」といわれたので yes と答える。
User name : nfsd Password : nfsdとりあえず nfsd という名前でユーザを作った。
$ cygrunsrv.exe -S portmap $ cygrunsrv.exe -S nfsd $ cygrunsrv.exe -S mountd/etc/exports ファイル(C:\cygwin\etc\exports)の編集
/home (ro,no_root_squash)これで再起動。nfsが使えるようになっているはず。
> > make[2]: *** No rule to make target `../../intl/libintl.a', > > needed by `run'. > > Stop. > > ./configure --disable-nls usually fixes this kind of problem.http://www.sourceware.org/ml/insight/2004-q4/msg00109.html
../configure --prefix=/usr --disable-maintainer-mode \ --disable-gdbtk --disable-tui --disable-nls --target=sh4-linuxすると
gcc -c -g -O2 -I. -I../../gdb -I../../gdb/config -DLOCALEDIR="\"/usr/share/l ocale\"" -DHAVE_CONFIG_H -I../../gdb/../include/opcode -I../bfd -I../../gdb/../bfd -I../. ./gdb/../include -I../intl -I../../gdb/../intl -DMI_OUT=1 -DTUI=1 -Wimplicit -Wreturn-typ e -Wcomment -Wtrigraphs -Wformat -Wparentheses -Wpointer-arith -Wuninitialized -Wformat-no nliteral -Wunused-label -Wunused-function ../../gdb/sh-linux-tdep.c ../../gdb/sh-linux-tdep.c:40:24: sys/ptrace.h: No such file or directory ../../gdb/sh-linux-tdep.c:43:22: sys/user.h: No such file or directory ../../gdb/sh-linux-tdep.c:44:25: sys/syscall.h: No such file or directory ../../gdb/sh-linux-tdep.c:218: error: `__NR_sigreturn' undeclared here (not in a function) ../../gdb/sh-linux-tdep.c:218: error: initializer element is not constant ../../gdb/sh-linux-tdep.c:218: error: (near initialization for `linux_sigtramp_code[7]') ../../gdb/sh-linux-tdep.c:286: error: `__NR_rt_sigreturn' undeclared here (not in a function) ../../gdb/sh-linux-tdep.c:286: error: initializer element is not constant ../../gdb/sh-linux-tdep.c:286: error: (near initialization for `linux_rt_sigtramp_code[7]') ../../gdb/sh-linux-tdep.c:394: warning: 'sh_linux_write_pc' defined but not usedって止まってしまうので、/usr/sh4-linux/include をインクルードパスの頭に追加してこの行だけやりすごし、先に進む(強引)
bash-3.1$ cd gdb/ bash-3.1$ gcc -c -g -O2 -I/usr/sh4-linux/include/ -I. -I../../gdb \ -I../../gdb/config -DLOCALEDIR="\"/usr/share/locale\"" -DHAVE_CONFIG_H \ -I../../gdb/../include/opcode -I../bfd -I../../gdb/../bfd \ -I../../gdb/../include -I../intl -I../../gdb/../intl -DMI_OUT=1 -DTUI=1 \ -Wimplicit -Wreturn-type -Wcomment -Wtrigraphs -Wformat -Wparentheses \ -Wpointer-arith -Wuninitialized -Wformat-nonliteral -Wunused-label \ -Wunused-function ../../gdb/sh-linux-tdep.c ../../gdb/sh-linux-tdep.c:63:1: warning: "REG_FPREG0" redefined In file included from /usr/sh4-linux/include/asm/user.h:6, from /usr/sh4-linux/include/sys/user.h:24, from ../../gdb/sh-linux-tdep.c:43: /usr/sh4-linux/include/asm/ptrace.h:42:1: warning: this is the location of the previous definition ../../gdb/sh-linux-tdep.c:64:1: warning: "REG_FPREG15" redefined /usr/sh4-linux/include/asm/ptrace.h:43:1: warning: this is the location of the previous definition ../../gdb/sh-linux-tdep.c:68:1: warning: "REG_FPSCR" redefined /usr/sh4-linux/include/asm/ptrace.h:46:1: warning: this is the location of the previous definition ../../gdb/sh-linux-tdep.c:69:1: warning: "REG_FPUL" redefined /usr/sh4-linux/include/asm/ptrace.h:40:1: warning: this is the location of the previous definition ../../gdb/sh-linux-tdep.c:394: warning: 'sh_linux_write_pc' defined but not used bash-3.1$ cd .. bash-3.1$ makeワーニングは出るけどオブジェクトはできるようだ。んでmake続行
アナログオシロスコープで、単発波形をみる方法があるらしい。え?なにそれ?と詳しく聞いてみると
1) 測定する部屋を部屋を真っ暗にする
2) 暗闇に目を慣らす
3) 単発波形が入ってくる瞬間に目をみひらく
網膜ストレージと呼ぶらしい。なるほど。
30秒間に time() を何階呼び出せるか調べるプログラムを書いて実験してみた。1ループあたりの時間を調べてみる。gcc -O2 でコンパイル。
/* * i386 Linux の time() は遅いようだ * 30秒間で time() が何回 呼び出せるか実験するプログラム */ #include#include #include #define CALC_SEC 30 // 計算時間[単位=秒] int main(){ int count = 0; time_t end = time(NULL)+CALC_SEC; // 処理の終わり = 現在時刻+30秒 while(end>time(NULL)){ // グルグル回り count++; } printf("1loop = %lf micro sec\n",(double)(CALC_SEC*1000000/(double)count)); return 0; }
ホスト | time() |
---|---|
PC Linux (Pentium4, 2.80GHz) | 2.984769 |
Cygwin (Core solo, 1.06GHz) | 0.314861 |
CAT760 (SH4, 200MHz) | 2.077872 |
次に、同じ試験をclock(3)に書き換えて実験してみる。
int main(){ int count = 0; clock_t end = clock()+CALC_SEC*CLOCKS_PER_SEC; // 処理の終わり = 現在時刻+30秒 while(end>clock()){ // グルグル回り count++; } printf("1loop = %lf micro sec\n",(double)(CALC_SEC*1000000/(double)count)); return 0; }結果
ホスト | time() | clock() | |
---|---|---|---|
PC Linux (Pentium4, 2.80GHz) | 2.984769 | 0.672957 | |
Cygwin (Core solo, 1.06GHz) | 0.314861 | 1.439811 | |
CAT760 (SH4, 200MHz) | 2.077872 | 3.981758 |
$ cd /usr/src/gdb-20060706-2/ $ mkdir build $ cd build $ ../configure --prefix=/usr --disable-maintainer-mode \ > --disable-gdbtk --disable-tui --disable-nls $ makeやっぱしmake一発ってわけにいかないか。
make[4]: Entering directory `/usr/src/gdb-20060706-2/build/libgui/src' gcc -DHAVE_CONFIG_H -I. -I../../../libgui/src -I.. -DWIN32 -mwin32 -I/usr/include -I/usr/include -DHAVE_NO_SEH=1 -DEXCEPTION_DISPOSITION=int -I/usr/include/../unix -I/usr/include/../win -DTBL_VERSION=\"2.7\" -DTBL_COMMAND=\"table\" -DTBL_RUNTIME=\"tkTable.tcl\" -DTBL_RUNTIME_DIR=\"/usr/share/redhat/gui\" -DSTATIC_BUILD -g -O2 -c ../../../libgui/src/tclwinprint.c ../../../libgui/src/tclwinprint.c:26:22: tkWinInt.h: No such file or directorytkWinInt.h が無いって。 --disable-gdbtk で tcl/tk は無効にできるはずなんだけどconfigureが効いていないみたい。cygwinの過去ログを見ても同じような症状が書いてあった。
cygwinのsetupからtcltkのソースパッケージをインストールして
$ cd libgui/src $ gcc -DHAVE_CONFIG_H -I. -I../../../libgui/src -I.. -DWIN32 -mwin32 -I/usr/include -I/us r/include -DHAVE_NO_SEH=1 -DEXCEPTION_DISPOSITION=int -I/usr/include/../unix -I/usr/inc lude/../win -DTBL_VERSION=\"2.7\" -DTBL_COMMAND=\"table\" -DTBL_RUNTIME=\"tkTable.tcl\" -D TBL_RUNTIME_DIR=\"/usr/share/redhat/gui\" -DSTATIC_BUILD -g -O2 -c ../../../libgui/src/ tclwinprint.c -I/usr/src/tcltk-20060202-1/tk/generic/ -I/usr/src/tcltk-20060202-1/tk/win/ -I/usr/src/tcltk-20060202-1/tcl/generic/ $ cd ../../ ↑ -Iパスを後ろに3つ(-I/usr/src/tcltk-20060202-1/tk/generic/ -I/usr/src/tcltk-20060202-1/tk/win/ -I/usr/src/tcltk-20060202-1/tcl/generic/)追加 $ make