TinyVM
TinyVM is an open source Java based replacement firmware for the LEGO MindStorms RCX microcontroller.TinyVM's footprint is about 10 Kb in the RCX. A small Java user-program can access around 16 Kb of RAM. The overhead for each object in the TinyVM is 4 bytes, and there is no alignment of fields. This means that an object with four byte-fields takes up 8 bytes in memory.
leJOS
Like its predecessor (TinyVM), leJOS is a tiny Java VM. The focus in leJOS is completeness and performance. The current footprint of leJOS in the RCX is 17 Kb, which gives around 9 Kb for user-programs.
"tar -xvzf
[file]"
. This will create a directory called
"tinyvm_0_2_6"
. Change to this directory and type
"make"
. Now setup your IR-tower with the environment
variable RCXTTY
( e.g. for SunOS: setenv RCXTTY
/dev/term/a ). To
download the Java VM, type tvmfirmdl
. This will take
about a minute. To get more information access the
README
file.
An example Java user-program is a program for a small LEGO car:
The Java source SmallCar.java and a compiled version SmallCar.tvm ready to be downloaded and run on TinyVM.
The C source SmallCar.c and a compiled version SmallCar.srec ready to be downloaded and run on the native build-in processor of the RCX.