(toppers-users 3038) Re: H8/3069F 割り込みハンドラについて

Takayasu Nakane nakane @ next-dimension.co.jp
2009年 9月 26日 (土) 14:41:38 JST


systask\timer.c に相当するソース(pulse.c かな)は作ってあるでしょうか?

systask\timer.c に timer_initialise, timer_handler, timer_terminate が
あります。

なかね

>大澤と申します.
>
>いつも皆さんにご迷惑をおかけしております。
>
>H8/3069Fでパルス入力のカウントをしたいと思いまして割り込みハンドラの登録を
>したいと思っております。
>
>H8.txt(Release 1.4.3対応,最終更新: 08-Mar-2007)を見ながら検討していますが
>なかなかうまくいきません。
>
>マニュアルどおり実施してみましたが、理解不足のせいかマイコンが停止してしまい
>ます。
>
>それで、
>Systaskに登録してある「timer.cfg」を参考に同じように「pulse.cfg」を作りmake
>してみました。
>そうしましたら、以下のエラーが出て、失敗します。
>
>kernel_cfg.o:kernel_cfg.c:(.text+0x4a): undefined reference to
>`_pulse_handler'
>kernel_cfg.o: In function `__kernel_call_inirtn':
>kernel_cfg.c:245: undefined reference to `_pulse_initialize'
>kernel_cfg.o: In function `__kernel_call_terrtn':
>kernel_cfg.c:251: undefined reference to `_pulse_terminate'
>collect2: ld returned 1 exit status
>make: *** [jsp.exe] Error 1
>
>kernel_cfg.cを見てみますと以下のようになっています。
>
>void
>_kernel_call_inirtn(void)
>{
>         init_cup_timer( (VP_INT)(0) );
>         timer_initialize( (VP_INT)(0) );
>         serial_initialize( (VP_INT)(0) );
>         pulse_initialize( (VP_INT)(0) );
>}
>void
>_kernel_call_terrtn(void)
>{
>         pulse_terminate( (VP_INT)(0) );
>         timer_terminate( (VP_INT)(0) );
>}
>
>1.何処かに、「handler」の「initialize」や「terminate」を定義しているところ
>があるのでしょうか。
>
>なお、「jsp/config/h8/hw_timer.h」を参考に同じように
>「jsp/config/h8/hw_pulse.h」として登録しています。
>
>さらに、カーネルも一括してメークする必要があるのかと思い、メークファイルの以
>下を変更しmakeしてみました。
>
>#  カーネルライブラリ(libkernel.a)のディレクトリ名
>#  (カーネルライブラリも make 対象にする時は,空に定義する)
>#
>KERNEL_LIB =
>#KERNEL_LIB = ../../kernel_lib
>
>すると以下のエラーが出ました。
>h8300-hms-ranlib libkernel.a
>h8300-hms-gcc -D__udp_can_snd -o udp_can_snd.o -c  -mh -mint32 -mrelax -O2
>-g  -
>DCPU_CLOCK=20000000 -DLABEL_ASM -DVECTOR_SIZE=64  -DSUPPORT_INET4
>-DSUPPORT_ETHE
>R -DSUPPORT_UDP -DTCP_CFG_LIBRARY -DUDP_CFG_LIBRARY -DTNCT_MONITOR -I.
>-I../../i
>nclude  -I../../config/h8/akih8_3069f -I../../config/h8
>-I../../tinet/netdev/if_
>ed -I../../tinet   ../../tinet/netinet/udp_var.h
>../../tinet/netinet/udp_var.h:110: error: parse error before "UH"
>../../tinet/netinet/udp_var.h:110: warning: no semicolon at end of struct or
>uni
>on
>../../tinet/netinet/udp_var.h:115: warning: data definition has no type or
>stora
>ge class
>../../tinet/netinet/udp_var.h:116: error: parse error before "myaddr"
>../../tinet/netinet/udp_var.h:116: warning: data definition has no type or
>stora
>ge class
>../../tinet/netinet/udp_var.h:117: error: parse error before "callback"
>../../tinet/netinet/udp_var.h:117: warning: data definition has no type or
>stora
>ge class
>../../tinet/netinet/udp_var.h:122: error: parse error before "semid_lock"
>../../tinet/netinet/udp_var.h:122: warning: data definition has no type or
>stora
>ge class
>../../tinet/netinet/udp_var.h:123: error: parse error before "snd_tskid"
>../../tinet/netinet/udp_var.h:123: warning: data definition has no type or
>stora
>ge class
>../../tinet/netinet/udp_var.h:124: error: parse error before "rcv_tskid"
>../../tinet/netinet/udp_var.h:124: warning: data definition has no type or
>stora
>ge class
>../../tinet/netinet/udp_var.h:125: error: parse error before "rcvqid"
>../../tinet/netinet/udp_var.h:125: warning: data definition has no type or
>stora
>ge class
>../../tinet/netinet/udp_var.h:126: error: parse error before '*' token
>../../tinet/netinet/udp_var.h:126: warning: data definition has no type or
>stora
>ge class
>../../tinet/netinet/udp_var.h:145: error: parse error before '}' token
>../../tinet/netinet/udp_var.h:145: warning: data definition has no type or
>stora
>ge class
>../../tinet/netinet/udp_var.h:247: error: parse error before "udp_cep"
>../../tinet/netinet/udp_var.h:247: warning: data definition has no type or
>stora
>ge class
>../../tinet/netinet/udp_var.h:248: error: parse error before
>"tmax_udp_cepid"
>../../tinet/netinet/udp_var.h:248: warning: data definition has no type or
>stora
>ge class
>../../tinet/netinet/udp_var.h:267: error: parse error before "udp_input"
>../../tinet/netinet/udp_var.h:267: error: parse error before '*' token
>../../tinet/netinet/udp_var.h:267: warning: data definition has no type or
>stora
>ge class
>../../tinet/netinet/udp_var.h:268: error: parse error before "udp_send_data"
>../../tinet/netinet/udp_var.h:268: error: parse error before '*' token
>../../tinet/netinet/udp_var.h:269: warning: data definition has no type or
>stora
>ge class
>../../tinet/netinet/udp_var.h:270: error: parse error before "udp_can_snd"
>../../tinet/netinet/udp_var.h:270: error: parse error before '*' token
>../../tinet/netinet/udp_var.h:270: warning: data definition has no type or
>stora
>ge class
>../../tinet/netinet/udp_var.h:271: error: parse error before "udp_can_rcv"
>../../tinet/netinet/udp_var.h:271: error: parse error before '*' token
>../../tinet/netinet/udp_var.h:271: warning: data definition has no type or
>stora
>ge class
>../../tinet/netinet/udp_var.h:272: error: parse error before
>"udp_alloc_auto_por
>t"
>../../tinet/netinet/udp_var.h:272: error: parse error before '*' token
>../../tinet/netinet/udp_var.h:272: warning: data definition has no type or
>stora
>ge class
>../../tinet/netinet/udp_var.h:273: error: parse error before
>"udp_alloc_port"
>../../tinet/netinet/udp_var.h:273: error: parse error before '*' token
>../../tinet/netinet/udp_var.h:273: warning: data definition has no type or
>stora
>ge class
>../../tinet/netinet/udp_var.h:277: error: parse error before "exinf"
>../../tinet/netinet/udp_var.h:247: warning: array 'udp_cep' assumed to have
>one
>element
>make: *** [udp_can_snd.o] Error 1
>
>メークファイルは、以下のように「UDP」のみを使うようにしています。
>カーネルを分割してメークすると1.で記載したエラーのみでUDP関係のエラーは出
>ません。
>
>#  ネットワーク層の選択、何れか一つ選択する。
>#SUPPORT_INET4 = true
>#SUPPORT_INET6 = true
>#  トランスポート層の選択
>#SUPPORT_TCP = true
>SUPPORT_UDP = true
>
>2.このエラーの原因はどこにあるのでしょうか。
>
>以上 H8/3069Fの割り込みハンドラの登録に関してです。
>
>
>TOPPERS/JSPカーネル(1.4.3)TCP/IP プロトコルスタック(TINET)(1.4.1)を使
>用しています。
>
>
>
>どなたかご指導宜しくお願いいたします。
>
>
>
>大澤 国
>