6.095 Humanoid Robot Competition
How to make cross compiler for mips CPU on windows
1. Install cygwin
http://cygwin.com/
Make sure gcc and make are installed
2. Download all files in
http://www.mit.edu/~kene/robo-one/doc/tar
Makefile
binutils-2.16.1.tar.gz
gcc-core-3.4.6.tar.gz
newlib-1.9.0.tar.gz
lib.tgz
ttermp23.zip
locate all files in your home directry.
3. compile cross compiler for mips CPU
binutils ( version 2.16.1 )
$mkdir /usr/loca/src
$ cd /usr/local/src
$ tar xvfz ~/binutils-2.16.1.tar.gz
$ mkdir binutils_robin
$ cd binutils_robin
$ ../binutils-2.16.1/configure --target=mipsel-robin-elf --prefix=/usr/local
$ make
$ make install
gcc ( version 3.4.6 )
$ cd /usr/local/src
$ tar xvfz ~/gcc-core-3.4.6.tar.gz
$ mkdir gcc_robin
$ cd gcc_robin
$ ../gcc-3.4.6/configure --target=mipsel-robin-elf --prefix=/usr/local
--with-newlib --enable-languages=c --disable-threads --disable-shared
$ make
$ make install
newlib ( version 1.9.0)
$ cd /usr/local/src
$ tar xvfz ~/newlib-1.9.0.tar.gz
$ mkdir newlib_robin
$ cd newlib_robin
$ ../newlib-1.9.0/configure --target=mipsel-robin-elf --prefix=/usr/local
$ make
$ make install
4. revise /usr/local/lib/gcc/mipsel-robin-elf/3.4.6/specs
(Use a text editor to edit this file)
-------------------------------------------------
*lib:
-lsemb -lc -lnullmon -lc
*startfile:
crt0%O%s crti%O%s crtbegin%O%s
5. install semb1200a-rom.ld at /usr/local/mipsel-robin-elf/lib/
$cd ~
$cp semb1200a-rom.ld /usr/local/mipsel-robin-elf/lib/.
6. install lib, header files, and so on
$tar xfvz lib.tgz
$ cp –r semb1200a /usr/local/mipsel-robin-elf/include/.
$ cp libsemb.a /usr/local/mipsel-robin-elf/lib/.
$cp crt0.o /usr/local/mipsel-robin-elf/lib
7. install teraTerm?(optional: hyperterminal is also useful)
Just double-click setup.exe in ttermp23.zip, and follow its instruction.
Set up a serial port as follows.
Baud rate 115200
Data 8bit
Parity none
Stop 1bit
Flow control none
8. compile a test program
Download
http://www.mit.edu/~kene/robo-one/doc/src/test.tgz
$ tar xfvz test.tgz
$ cd test
$ make
test.bin is a binary file for main board.
Note
• You can also make cross compiler on linux or MacOSX. If you are using either of them, other terminal emulter like minicom is useful.
• The USB Serial Adapter which comes with KHR-2HV kit is not available on Linux MacOS. If you are using either of them, you should have other USB Serial Adapter such as USA-19HS.
http://www.keyspan.com/products/usb/usa19hs/