![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() |
Setting up legOSI have an RCX 1.0 and use Linux RedHat 7.3 on a PC. LegOS or BrickOS can be used to compile C/C++ programs and to upload them onto the RCX brick. First, I installed as root the RPMs for the hitachi 8300 gcc compiler: rpm -i rcx-binutils-2.9.5.0.22-1.i386.rpm rcx-egcs-1.1.2-1.i386.rpm rcx-egcs-c++-1.1.2-1.i386.rpm These RPMs can be downloaded from www.rpmfind.net. The rpm command will put the compiler binary into /usr/bin. Afterward, legOS can be installed. First, the tar-ball needs to be unpacked: tar -xzvf legos-0.2.6.tar.gz This will create the directory legos-0.2.6. In this directory, I needed to adjust the `Makefile.common', otherwise the hitachi compiler cannot be found. # Hitachi H8 tool prefix # Linux / Solaris HMSTOOLDIR=/usr/bin # NOTE: for Debian GNU/Linux this allows: # export HMSTOOLDIR=/usr; make -e TOOLPREFIX=$(HMSTOOLDIR)/h8300-hitachi-hms- SED_SFLAG= Here, I changed the strings HMSTOOLDIR and TOOLPREFIX. Now, everything can be compiled by starting `make' in the legos-0.2.6 directory: make The legOS binaries are in legos-0.2.6/util. Thus, I adjusted the 'path' variable in ~/.tcshrc: set path=($HOME/legos-0.2.6/util $path) To communicate with the RCX brick, LEGO uses an infrared (IR) tower. My IR tower is connected to the serial port COM1, which is /dev/ttyS0 under Linux. To communicate with the RCX, legOS needs to read from and write onto /dev/ttyS0. Therefore, the access rights need to be set accordingly (only root can do that): chmod a+w+r /dev/ttyS0 Before any program can be uploaded onto the brick, the firmware needs to be installed (included in legOS): firmdl3 legos-0.2.6/boot/legOS.srec The IR-tower switch was set to short range, and the distance between the RCX and the tower was about 12cm (5 in). Finally, a program can be uploaded using the dll command: dll legos-0.2.6/demo/helloworld.lx Remark: I also tried to use the newer versions brickos-0.2.6.10.6 and brickos-0.9.0. However, I was not able to upload any program. In any trial, dll produced the error message: `error deleting program'. Possibly, there is a conflict with the rcx-egcs hitachi compiler. 25 Mar 2005 |