LoginSignup
0
2

More than 5 years have passed since last update.

H8 3069クロスコンパイル開発環境のセットアップ

Last updated at Posted at 2019-05-25

12ステップで作る組込みOS自作入門をやるために
H8 3069のクロスコンパイル環境を構築した際のメモ.

環境

  • OS Arch linux 64bit

試した手順

$ wget http://kozos.jp/books/makeos/download.sh
$ chmod +x download.sh
$ ./download.sh
$ chmod +x build-binutils.sh
$ chmod +x build-gcc.sh
$ ./build-binutils.sh
$ cd binutils-2.19.1
$ sudo make install
$ cd ..
$ ./build-gcc.sh
$ cd gcc-3.4.6
$ wget http://kozos.jp/books/makeos/patch-gcc-3.4.6-x64-h8300.txt
$ patch < patch-gcc-3.4.6-x64-h8300.txt
# パッチ対象が聞かれるので,"gcc/config/h8300/h8300.c"を¥入力
$ make
$ sudo make install

以下で記述しているエラーに対応済み.

引っかかったポイントと解決法

公式サポートページにあるように64bitOSでサポートページの手順をとると,

make install が以下のエラーで止まる.

./libgcc2.c: In function '__muldi3':
./libgcc2.c:542: error: unrecognizable insn:
(insn 234 233 235 2 ./libgcc2.c:533 (set (reg:HI 3 r3)
        (const_int 4294967214 [0xffffffae])) -1 (nil)
    (nil))
./libgcc2.c:542: internal compiler error: in extract_insn, at recog.c:2077
Please submit a full bug report,
with preprocessed source if appropriate.
See  for instructions.

そのため,以下の手順を追加した.

$ wget http://kozos.jp/books/makeos/patch-gcc-3.4.6-x64-h8300.txt
$ patch < patch-gcc-3.4.6-x64-h8300.txt
# パッチ対象が聞かれるので,"gcc/config/h8300/h8300.c"を入力.
$ make

参考サイト

 公式サポートページ

0
2
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
2