Stephen's Website |
Eric Matson's Website |
Main Page |
BrickOS install guide (0.2.6.10)
RCX programming / robot design tips |
Robots I've designed |
(for version 0.2.6.10)
Table of contents:
Any of the steps you are SURE are already complete can be skipped.
- Before you begin...
- Install IR tower
- Install Cygwin
- Installing BrickOS
- Using BrickOS
This install guild is for PC, NOT MAC
This install was tested on Windows XP, but I assume it will work just as well on most any other version (after win95)
This guide assumes you are using a USB ir tower!
Parts of this document were copied from other install documents! if you feel slighted by this let me know.
If you have any trouble installing, let me know! email me
Before you begin...
Before starting make sure you have the necessary stuff! You'll need an IR tower, an RCX (though not until later, you can install the IR tower last if you want to.)
To install the IR tower you'll need the mindstorms software CD, so make sure you have that too.
The big thing here though is hard disk space. You'll need close to 800 megabytes of free space, unless you already have cygwin.
Install IR tower
Installing the IR tower isn't hard: first put in the mindstorms CD, but don't run it's install or anything.
Go to your CD drive using start -> run (type in the CD drive letter and a colon, for example 'e:')
go to the 'Install Support' folder, then the 'Tower' folder, and run the 'tower.exe' (icon looks like a tower on top of a CD)
After this completes, plug the tower into the USB port and windows should be able to detect the driver.
Start by going to www.cygwin.com
click on the link that says 'install now', and run it from it's current location (this is only 250k or so)
Once it pops up, hit 'next' until you get to 'Choose a download site'
Pick any site you like, .edu's are best from KSU campus usually, and hit next
(if it doesn't work, just pick another one and try again)
in the 'select packages' screen:
click the 'view' button until the text by it says 'full' (it might take a little bit to load... not long though)
here's an -almost minimum- list of packages that you NEED for this to work: (pulled from This page, which is an earler version than this one we're installing)
(go to each package name, and if it says 'skip' in the second column, click the 'skip'. That will install the latest version)
Hit next again, which will proceed to download and install the packages, this can take a long time.
Now cygwin is installed! (yay)
Part 1- building the cross compiler
Start off by browsing to your main cygwin directory (usually c:\cygwin)
make a new directory called 'build'
download the following files into that directory:
gcc 2.95.2 sources:
binutils 2.10.1 sources:
Next, download and unzip the folllowing file into the same directory:
Now, build the cross compiler:
First start a cygwin shell
Type the commands:
Part 2- Actually Installing BrickOS
go to BrickOS at Sourceforge
and download brickos-0.2.6.10 (this may work for later versions
download the file into c:\cygwin (or whereever your cygwin dir is)
after it's download, go to a cygwin shell and type:
tar xvfz brickos-0.2.6.10.tar.gz
(note if you have a different pachage name the paths will be different!)
Now the actual package files exist in the directory c:\cygwin\brickos-0.2.6.10 (or in cygwin /brickos-0.2.6.10)
Now we need to make the whole mess work, so type:
This will take a bit, and will build the legos kernel, as well as building the tools for uploading firmware, etc...
Woohoo- BrickOS is installed!
Ok, first thing we are going to want to do with brickos is install the firmware (note - this must be done every time the RCX loses power!)
To install firmware, open a cygwin shell and type:
This will take a few minutes....
After this completes, test brickos by typing the following:
hit run on the RCX and drool over the LCD...
Now set the environment path to add the utilities, and to set USB mode for brickos. To do this you'll need to change your profile, this file is in c:/cygwin/etc/, it's called 'profile'. Edit it and change the path line to include the bricoks/util path. Mine looks like this:
Also somewhere in the file (I did this by the other 'export' statements) add the line:
If you DON'T do this, you will have to execute the tools by typing the full/relative path, which gets old fast. Also you'll have to 'export RCXTTY=USB' everytime you start a shell.
Here's some more instructions on making your own project from the readme.use file:
For your own projects,
- Make a directory in a location of your choosing (you may wish to make
a ~/brickOS directory and place your projects below there).
- Copy 'Makefile' from the /usr/[local/]share/doc/brickos/examples directory
to this new directory.
- Put your main routine into myproject.c. (or myproject.C if using C++)
- If you need more source files, add them in the Makefile.
- type "make myproject.lx && dll myproject.lx" to build and then download
your new code. (Remember to use -pN to select specific program slot)
In case you are wondering, dll is short for dynamic linker and loader.
You can get good help at: http://lugnet.com/robotics/rcx/legos/ should
you need to.
About making your own projects:
It is as simple as is said in the readme.
I like a little more structure to keeping my programs, so I actually put my programs in maindir/myprog/programname. The only downside to this is I had to change all the '..'s in the makefile to '../..'s, which took all of a minute to do. It compiles and runs just fine though!
- Create a directory in the main brickos dir
- Copy the makefile from the maindir/demo directory
- Make your program in programname.c (or whatever name)
- Compile using 'make programname.lx'
- Upload using 'dll programname.lx'
Good luck and happy RCXing :)
Copyright 2003 Stephen Stair
Lego, RCX, Lego Mindstorms are trademarks/owned by Lego.