main page
legOS

legOS, the: [unauth, unoff] independent LEGO Mindstorms OS. Offers preemptive multitasking, energy saving, dynamic memory management, POSIX semaphores, native access to display, buttons, IR communication, motors and sensors.

 
 
  Mission

To unleash the RCX's full potential by providing a lightweight, comprehensive native mode kernel and standard library. Also known as replacement firmware, native mode busts the bytecode barrier and allows you to program in assembler, standard C and any other language for which appropriate cross-compilers are available.

 
  Status

Licensing policy changed to MPL.

New features include limited C++ support, a standard library concept and a still sub-optimal motor driver with 256 power settings. Integer math shortcomings have been fixed, as well as consistency and efficiency issues in the sensor routines. The API documentation should be reasonably complete now (PDF by Tom Emerson). The logbook is out of sync. This site needs revamping.

Snapshot news: Lou's priority chain mechanism, Lou's motor bugfix, egcs-1.1.2 bugfix for cputw (also better code, smaller), argc/argv for task execution, memcpy bugfix.

Current snapshot:  legOS-990330.tar.bz2
Last release:  legOS-0.1.7.tgz
legOS-0.1.7.tar.bz2
legOS-0.1.7.zip
Release history:logbook
 
 
  Web compilers

Installation problems? Or are you just curious to take a quick test drive? There's light around the corner with the availability of web-based legOS compilers. Simply paste your source code in the forms they provide, and you'll receive a compiled executable. Only the firmware downloader has to run on your host.

 
 
  Getting started
  • Buy a LEGO Mindstorms kit.

  • Set up the cross-compiler on your host platform:
  • Download the current legOS distribution and unpack it.

  • Edit Makefile.common and type make to make. Precompiled demos are availabe under demo/.

  • Use your favourite firmware downloader or the one provided in the utils/ directory to transfer them to your RCX.

 
  Available demos

After downloading a demo to your Mindstorms, press Run to run. Press Run again to stop execution.

When the program is stopped, use On-Off to switch the unit on and off. Pressing On-Off and Prgm simultaneously will erase legOS, preparing for a new download.

Multitasking and IR

Start up a terminal program for the port your IR tower is connected to and configure 2400 baud / 8N1. Try typing things and watch the LCD display. Now press View and look at your screen.

Rotation sensors

Connect a rotation sensor to port 3. The decoded position will be displayed on the LCD screen.

 
  Success stories
Intelligent robotic dog

Writing a joint masters thesis at the University of Aarhus, Claus, Jes and Michael are using neural networks evolved by genetic algorithms to turn the RCX into an intelligent companion.

Barcode reader

Using minimal parts, Alex turned his RCX into a portable barcode reader.

If you'd like to be mentioned here, please drop me a line.

 
  Author and contributors

The legOS project was started by Markus L. Noga in October 1998. Since then, various contributors have also brought their considerable expertise to bear. Some of them put up legOS web pages, too. If you feel inclined to follow suit, feel free to peruse this page design.

We are actively discussing legOS in a discussion group at lugnet. Feel free to join.

 
  Information sources
  • legOS discussion group at lugnet
  • Official Mindstorms site
  • Lego Mindstorms Internals
  • RCX Internals
  • H8/300L series programming manual
  • H8/3297 series hardware manual
  • gcc manual
  • Sensors for mobile robots (Book, 13.5 MB pdf)
  •  

    counter