検索
ホーム プロダクツ ダウンロード 販売(注文はココ) サポート
H8MAX
  screen shot
  download
  販売
  セット内容
  H8MAXの概要
  スペック
  組み立て

使用編
  ジャンパー設定
  redboot
  CFのマウント
  DHCPサーバからのブート

開発編
  開発環境
  カーネル構築
  elf2flt
  redboot
  ユーザプログラムの作成
  ファームの書き換え
  よくある質問(FAQ)
  掲示板

資料・その他

  メモリマップ
  ピン配置
  組立マニュアル
  リンク

mailto:h8max@ip-sol.jp



 elf2flt / flthdr

■elf2flt / flthdrの構築
elfからfltにファイルを変換するツールの作成方法です。gccなどのクロスツールはあらかじめインストールしておいてください。

ダウンロードセンターからelf2elf-20030816.tar.gzを拾って解凍します。
$ wget http://ip-sol.jp/h8max/down/elf2flt-20030816.tar.gz
$ tar zxvf elf2flt-20030816.tar.gz
$ cd elf2elt
$ ./configure --target=h8300-elf \
 --with-libbfd=/usr/local/lib/libbfd.a \
 --with-libiberty=/usr/local/lib/libiberty.a \
 --with-bfd-include-dir=/usr/local/include \
 --with-binutils-include-dir=/home/ochiai/h8elf/binutils-2.13.2/include

...省略...

$ make
gcc -g -O2 -DPACKAGE_NAME=\"\" -DPACKAGE_TARNAME=\"\" -DPACKAGE_VERSION=\"\" -DPACKAGE_STRING=\"\" -DPACKAGE_BUGR
EPORT=\"\" -DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_M
EMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DHAVE_FCNTL_H=1 -DHAVE_UNIS
TD_H=1 -DHAVE_BFD_H=1 -DHAVE_VPRINTF=1  -DTARGET_h8300 -I/usr/local/include -I/home/ochiai/h8elf/binutils-2.13.2/
include -static -o elf2flt ./elf2flt.c /usr/local/lib/libbfd.a /usr/local/lib/libiberty.a
gcc -g -O2 -DPACKAGE_NAME=\"\" -DPACKAGE_TARNAME=\"\" -DPACKAGE_VERSION=\"\" -DPACKAGE_STRING=\"\" -DPACKAGE_BUGR
EPORT=\"\" -DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_M
EMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DHAVE_FCNTL_H=1 -DHAVE_UNIS
TD_H=1 -DHAVE_BFD_H=1 -DHAVE_VPRINTF=1  -DTARGET_h8300 -I/usr/local/include -I/home/ochiai/h8elf/binutils-2.13.2/
include -static -o flthdr ./flthdr.c /usr/local/lib/libbfd.a /usr/local/lib/libiberty.a
$ su
# make install
/usr/bin/install -c -s -m 755 flthdr /usr/local/bin/h8300-elf-flthdr
/usr/bin/install -c -s -m 755 flthdr /usr/local/h8300-elf/bin/flthdr
/usr/bin/install -c -s -m 755 elf2flt /usr/local/bin/h8300-elf-elf2flt
/usr/bin/install -c -s -m 755 elf2flt /usr/local/h8300-elf/bin/elf2flt
[ -f /usr/local/bin/h8300-elf-ld.real ] || \
        mv /usr/local/bin/h8300-elf-ld /usr/local/bin/h8300-elf-ld.real
[ -f /usr/local/h8300-elf/bin/ld.real ] || \
        mv /usr/local/h8300-elf/bin/ld /usr/local/h8300-elf/bin/ld.real
/usr/bin/install -c -m 755 ./ld-elf2flt /usr/local/bin/h8300-elf-ld
/usr/bin/install -c -m 755 ./ld-elf2flt /usr/local/h8300-elf/bin/ld
/usr/bin/install -c -m 644 ./elf2flt.ld /usr/local/h8300-elf/lib
# 
青字の部分は自分の解凍したbinutilsのディレクトリに置き換えてください。binutilsは2.13.2を指定します。