Lattice Mico32のクロス開発環境の構築方法について記録してきます。。
※ここではコンパイルの仕方のみで、生成されたクロス環境の動作確認はしていません。
まず、必要な環境
1) Vine Linux x86版(V4.2)
2) ソース一式(src_611.tar.bz2) LatticeMico32 GNU-Tools Source Code
ソースの修正
gcc-3.4.4\gcc\doc\contrib.texi
が壊れているみたい。
gcc3.4.4のオリジナルから上書きする。
作業用にPATHを設定
export PATH=/usr/local/lm32/bin:$PATH
binutilsの構築
../binutils/configure --target=lm32-elf --prefix=/usr/local/lm32 --disable-nls
最初のgccの構築
../gcc/configure --prefix=/usr/local/lm32/ --target=lm32-elf --enable-languages=c
--with-newlib --enable-sjlj-exceptions --disable-nls --disable-libstdcxx-pch
newlibの構築
../newlib/configure --prefix=/usr/local/lm32/ --target=lm32-elf
再度、gccの構築
../gcc/configure --prefix=/usr/local/lm32/ --target=lm32-elf --enable-languages=c,c++
--with-newlib --enable-sjlj-exceptions --disable-nls --disable-libstdcxx-pch
ついでに、gdbも構築
../gdb/configure --prefix=/usr/local/lm32/ --target=lm32-elf --disable-nls
make install-gdb install-sim