Compiling binutils, gcc, and brickos HOWTO

- 2005-12-30 by Kyle Husmann

I have written this document as a record of my experiences compiling binutils, gcc, and brickos. These are just my notes on the process, and if they happen to help anyone, great. I used binutils-2.16, gcc-4.0.2, and brickos 0.9.0, but any versions should work.

Compiling binutils

cd binutils-2.16
./configure --target=h8300-hms --prefix=/usr/local/h8300-hms –disable-nls
make
make install

NOTES:

Compiling gcc

export PATH=$PATH:/usr/local/h8300-hms/bin
mkdir build-gcc
cd build-gcc
../gcc-4.0.2/configure --target=h8300-hms --prefix=/usr/local/h8300-hms --enable-languages=c,c++ --disable-nls –enable-target-optspace
make
make install

NOTES:

Compiling brickos

patch -p0 < brickos-gcc33.diff
./configure –prefix=/usr/local/h8300-hms
make
make install

NOTES:


Compiling brickos sources

I have used the Makefile in the demo directory to create a new Makefile, which I believe is simpler. To use it, put it in the same directory as your foo.c source, and type “make foo.c”. Don't forget to change the paths at the top of the Makefile, first.

Here is the makefile: http://home.comcast.net/~kyle-violin/linux/brickos/Makefile

Sources

These websites helped tremendously. Thanks to all their authors.

http://did.mat.uni-bayreuth.de/~matthias/veranstaltungen/ws2004/mindstorms/doc/brickos-howto.html

http://hoenicke.ath.cx/rcx/brickOS.html

http://blackfin.uclinux.org/forum/message.php?msg_id=1083

http://legos.sourceforge.net/HOWTO/x117.html