2010年5月3日月曜日

gcc4.4.3 for avr-gcc インストール

** gcc-4.4.3 (avr-gcc) インストールメモ **

atmega32u4とat90usb1286を使いたいので、これらのデバイスに対応しているgcc4.4.3をインストールした。
gcc4以降、gmpとmpfrがgccコンパイル時に必要となっているのでそれらも同時にインストールした。


gmp
gmp-4.2.4
./configure


mpfr
mpfr-2.4.2
./configure --with-gmp-lib=/usr/local/lib --build=i686
configオプションに--with-gmp-libを追加。このオプションがないとgmpが見付からずにconfig時にエラーで落ちる。


binutils
binutils-2.20
../binutils-2.20/configure --target=avr --prefix=/usr/local/avr-gcc4


gcc
gcc-core-4.4.3
../gcc-4.4.3/configure --target=avr --prefix=/usr/local/avr-gcc4 \
--enable-languages=c --with-dwarf2 --disable-nls \
--with-mpfr-include=/usr/local/include --with-mpfr-lib=/usr/local/lib
configオプションに--with-mpfr-includeと--with-mpfr-libを追加。このオプションがないとmpfrが見付からずに
config時にエラーで落ちる。


avr-libc
avr-libc-1.6.2
../avr-libc-1.6.2/configure --build=i686-pc-linux-gnu --host=avr --prefix=/usr/local/avr-gcc4
avr-libc-1.6.8を試したが、どうしてもコンパイルが通らず断念。


atmega32u4もat90usb1286もソースをコンパイルが出来ることを確認した。

++ Myself ++

普通(?)のサラリーマン -- 生活のすきま時間にキーボードとはんだごてを持ち替えてプログラミングと電子工作してます