brickOS Instructions for installing on Win9x/NT/2000/XP

Paolo Masetti

Version 1.3, 01 March, 2003
Revision History
Revision 1.301 Mar 2003Revised by: smm
Update for brickOS
Revision 1.219 Sep 2002Revised by: smm
Update for brickOS, formerly legOS
Revision 1.119 Apr 2002Revised by: smm
Update for legOS 0.2.6
Revision 1.013 May 2001Revised by: pm
Initial Release after legOS 0.2.5

This document is an adaptation of the original version written by Peter Van der Beken . Many thanks to Luis Villa for his HOW-TO for Linux and his effort in documenting brickOS. Many thanks to Markus L. Noga for conceiving and creating legOS.

If you have opinions and corrections related to these instruction, you can write to Paolo Masetti for every problems, use brickOS site reporting tools and forums or lugnet.robotics.rcx.legos on .


These instruction work for me (I'm using NT Win2k Pro SP3). I can't be sure they'll do for you but I'm quite sure. They should get brickOS working on your own PC, 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 am responsible for what happens. :-)

These instructions give you a fully functional brickOS (probably a newer version too). You will be 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 Cygwin

  • Install Cygwin 1.3.x or newer version (1.3.20 as of this writing) from Cygwin Site: .

  • You can install it on-line running the setup program directly from this url: Install Cygwin now . Save the file in a temporary directory and run it.

  • You can download all the files for a later install, or install directly from Internet. Choice the best for you:

  • Install in the directory that you prefer. Do not worry about it, this version of cygwin will mount directories as *nix later. I use these choices:

  • Last setup I've tried let you choose which modules you need to download and setup. Here is a minimal list (but probably some modules could be removed too) that was tested and works:

2. Build the Hitachi-H8 cross-compiler

  • Open a cygwin bash shell window (you can open it using Start->Programs->Cygnus Solution->Cygwin Bash Shell)

  • Make a new directory:
    $ mkdir /build
    where you will download the next files: c:\cygwin\build

  • Download gcc 2.95.2 sources using this link -> gcc-2.95.2.tar.gz and save in c:\cygwin\build

  • Download binutils 2.10.1 sources using this link -> binutils-2.10.1.tar.gz and save in c:\cygwin\build

  • Download the building scripts from here ( and put it in the same directory as above. Unzip them to produce a shell script ( and two diff files.

  • Build the cross compiler:
    $ cd /build
    $ ./

  • Ignore the warnings in compile process. It should work.

3. Install the brickOS files

  • Get brickos- from the "Latest Test Releases" section of our project web: . Drag a copy to C:\cygwin.

  • Type:
    $ cd /
    $ tar xvfz brickos-

  • Lots of files will stream by as they install into their directories. This will create a brickos- directory.

4. TRY IT!!!

  • Type:
    $ ln -s brickOS- brickOS
    $ cd /brickOS
    $ ./configure; make
    $ cd util
    $ make strip

    Now, Power on RCX.

    Put IR tower on COM1

    $ ./firmdl3 ../boot/brickOS.srec
    $ ./dll ../demo/helloworld.lx
    Press RUN on RCX and enjoy!

If you have the IR tower connected to a different com port you can change the default port with variable RCXTTY. This is the command: "export RCXTTY=COMx". NOTE: if you have a USB tower, please use "export RCXTTY=USB". More help with "./firmdl3 --help" and "./dll --help"

usage: firmdl3 [options] filename
      --debug      show debug output, mostly raw bytes
  -f, --fast       use fast 4x downloading (default)
  -s, --slow       use slow 1x downloading
      --tty=TTY    assume tower connected to TTY
      --tty=usb    assume tower connected to USB
  -h, --help       display this help and exit
dll: unknown option -- help
usage: dll [options] [command | file.lx]
  -p  , --program=   set destination program to   -r  , --rcxaddr=   send to RCX host address   -s  , --srcport=   send to RCX source port   -t  , --tty=       set IR Tower com port   -t      , --tty=           set IR Tower USB mode
  -i<0/1>      , --irmode=<0/1>        set IR mode near(0)/far(1) on RCX
  -e           , --execute             execute program after download
  -v           , --verbose             verbose mode

  -d  , --delete=    delete program  from memory
  -n , --node=     set LNP host address in brick

Default COM port or USB support can be set using environment variable RCXTTY.
Eg:     set RCXTTY=COM2
        set RCXTTY=USB

Final Notes

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

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

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

Latest update: Paolo Masetti 01/03/2003.

Update/generate/post as web content Stephen Moraco 01/05/2002.

Initial Release: Paolo Masetti 13/05/2001.

SGML Source for document created for Paolo by Stephen Moraco 19/07/2001.