--------------------------- How to Install XS for Linux --------------------------- 1. Make sure you have the driver for the USB tower installed in your PC (RCX 2.0 only) If you are using RCX 2.0, the IR tower is to be connected to the USB port of your PC. In this case, you need the driver for the IR tower. Make sure the driver is installed in your PC. The device name of the driver is "/dev/lego*" or "/dev/usb/lego*" in many cases, where "*" stands for a sequence of zero or more characters. If you cannot find the driver, install one from the following URL: http://legousb.sourceforge.net/legousbtower/index.shtml If the Linux on your PC is too old, it may not be able to run the driver. In this case, give up using RCX 2.0 on your PC. The device name of the driver is denoted as below. If you are using RCX 1.0 or 1.5, the IR tower is to be connected to the serial port of your PC. In this case, you do not need to install a driver. 2. Create a new directory. The full path of the directory is denoted as below. 3. Move the zip file "xs.zip" to . 4. At the directory , extract the files. % unzip xs.zip 5. Create utilities. * Edit the line starting with "BRICKOS_ROOT" in file /Makefile.common and replace the path to the right of "=" with the full path of your . Do not end the path with a slash. For example, if your is "/home/yuasa/xs", the line should look "BRICKOS_ROOT=/home/yuasa/xs". * Go to /util. % cd util ; Now you are at /util. * Clean up the directory. % make realclean * Make the utilities. % make * Go back to . % cd .. ; Now you are at . 6. Create the XS front-end. * Go to /xs. % cd xs ; Now you are at /xs. * Edit the line starting with "XSROOT" in file /xs/Makefile and replace the path to the right of "=" with the full path of your . Do not forget the slash at the end of the path. For example, if your is "/home/yuasa/xs/", the line should look "XSROOT=/home/yuasa/xs/". * Delete the old front-end and one object file (sorry for the garbage). % rm xs ircom.o * Make a new front-end. % make xs * Go back to . % cd .. ; Now you are at . 7. Download the brickOS (a tiny OS for RCX) and the XS evaluator to your RCX. Once downloaded, these programs will be maintained in the RCX RAM as long as the batteries are alive. * Connect the IR tower to the serial port (for RCX 1.0 and 1.5) or to the USB port (for RCX 2.0) of your Linux PC. Place the IR tower so that its front side faces with the IR port of your RCX. The IR port of RCX looks like a black belt. * Turn on your RCX by pressing the On-Off button. Make sure you hear a beep and see "1" on the LCD display. If not, remove batteries, wait a while, put back batteries, and try again. * Make sure you are at . * Download the brickOS. % util/firmdl3 --tty= boot/brickOS.srec (If you are using RCX 1.0 or 1.5, you don't need "--tty=".) If succeeded, the following message will appear on your PC display. Transferring "Fast Download Image" to RCX... 100% Transferring "boot/brickOS.srec" to RCX... 100% (The first two lines may not appear actually.) If failed, possible reasons are: (a) [RCX 1.0 and 1.5 only] The serial port of your Linux PC may not be the default "/dev/ttyS0". In this case, specify the serial port device as follows. % util/firmdl3 --tty= boot/brickOS.srec (b) Your room light may cause jamming to IR communication. In this case, cover the area between the IR tower and the IR port of the RCX with something like a thick paper. (c) [RCX 1.0 and 1.5 only] The battery inside the IR tower may be dead. In this case, you receive an error message "tower not responding" on your PC display. Change the battery. * Download the XS evaluator. % util/dll --tty= xs/eval.lx (If you are using RCX 1.0 or 1.5, you don't need "--tty=".) If succeeded, you will see increasing numbers on the LCD display. If failed, see the remarks above for "Download the brickOS". 8. Turn off your RCX. As mentioned already, the brickOS and the evaluator you downloaded will be maintained in the RCX RAM as long as the batteries are alive. To save batteries, you are recommended to turn off your RCX while you are not using it. -------------------------- How to Start an XS Session -------------------------- 1. Make sure the IR tower is correctly connected and placed. 2. Turn on the RCX by pressing the On-Off button. Make sure you see a "-" on the LCD display. 3. Start the XS evaluator by pressing the Run button. Make sure you hear a beep. 4. Goto /xs and start the front-end. Make sure you see the banner and a prompt ">". % cd xs % ./xs --tty= (If you are using RCX 1.0 or 1.5, you don't need "--tty=".) Welcome to XS: Lisp on Lego MindStorms > 5. Type a Lisp expression following each prompt. >(cons 1 2) (1 . 2) > 6. To end the XS session, type "(bye)" or press Control-D. >(bye) sayonara % 7. Turn off your RCX. -------- Trouble? -------- If you have trouble, contact Taiichi at yuasa@kuis.kyoto-u.ac.jp. Good Luck. Copyright 2003, Taiichi Yuasa The project of XS was sponsored by the Information-technology Promotion Agency (IPA) of Japan as an Exploratory Software Project.