LegOS 0.2.4 - Instructions for installing on NT/Win9x with Cygwin


This document is an adaptation from the original version written by Peter Van der Beken for LegOS 0.2.2 that you can find here. Many thanks to Luis Villa for his HOW-TO for Linux and his effort in documenting LegOS.

If you have problems related to these instruction, you can write to me.

These instruction works for me (I had NT WS 4.0 SP6a, now I'm using Win2k but some friends of mine use Win9x), I can't be sure they'll do for you but I'm quite sure. They may get legOS working, but they should be used at your own risk as with any other program installation, you may crash your computer, lose files, and generally make a mess of things. So, neither he nor I are responsible for what happens.

These instruction give you a fully functional LegOS 0.2.4, able to recompile the entire kernel image, the tools (dll, firmdl3 & so on). You will have to download a lot of MB. If you do not like that, please use WinlegOS that is a good porting of the minimal requirement to compile and upload .lx files with Windows.


Step by step instructions:

1) Install Cygwin32, the Unix development environment for Windows

 If you don't have administrative access on an NT machine, you won't have to worry about the PATH thing until step 4.

2) Install the Hitachi-H8 cross-compiler

3) Install the LegOS 0.2.4 files

$ cd /
$ tar xvfz LegOS-0.2.4.tar.gz

Please, DO NOT USE any other program instead of tar (like WinZip or others) to decompress the original files: these program looses the symbolic links stored in the original tar file.

4) Edit Makefile.common

Remember, if you did not set your PATH in step 1, you'll have to set TOOLPREFIX to read "TOOLPREFIX=/cygnus/cygwin-b20/H-i586-cygwin32/bin/h8300-hms-". If you have set the path in step 1, you can skip to step 5.

  1. There are two lines that start with TOOLPREFIX. The second one (which is preceded by the line "#NT") should look like "TOOLPREFIX=/cygnus/cygwin-b20/H-i586-cygwin32/bin/h8300-hms-".

5) Install Perl

$ cd /
$ mkdir usr
$ cd usr
$ mkdir bin
$ cd bin
$ ln -s /Perl/bin/perl perl

You need ActivePerl only for few scripts, but it's needed to get the full compile.

6) TRY IT!!!

$ cd /legOS
$ make realclean
$ make depend
$ make
$ cd util
$ make strip
Now, Power on RCX.
Put IR tower on COM1
$ ./firmdl3 ../boot/legos.srec
$ ./dll ../demo/helloworld.lx

Press RUN on RCX and enjoy!

If you have IR tower connected to another com port you can change the default with the instruction: "SET DEFAULTTTY=COMx".


Final notes

If it doesn't work, consult lugnet.robotics.rcx.legos on lugnet.com.

Every command indicated are executed from Cygwin environment. In the examples, the "$" is the prompt cygnwin gives to you.

You can use Notetab Light to edit files instead of WordPad or VI. It's available from http://www.notetab.com/. It preserves the unix line-endings, and it can change between unix and dos line-endings.

Last update: Paolo Masetti 25/06/2000.