Setting up the environment and loading the firmware

Use this link as reference for this section.

Setting up the environment

I have created a directory c:\Lejos\Project.

I have a batch file setenv.bat with th following content in it

#beginning of file
set LEJOS_HOME=C:\Lejos\lejos

set CLASSPATH=%CLASSPATH%;C:\Lejos\lejos\lib\rcxport.jar;
set CLASSPATH=%CLASSPATH%;C:\Lejos\lejos\lib\BlackBox.jar;
set CLASSPATH=%CLASSPATH%;C:\Lejos\lejos\lib\rcx.jar;
set CLASSPATH=%CLASSPATH%;C:\Lejos\lejos\lib\classes.jar;
set CLASSPATH=%CLASSPATH%;C:\Lejos\lejos\lib\comm.jar;
set CLASSPATH=%CLASSPATH%;C:\Lejos\lejos\lib\jtools.jar;
set CLASSPATH=%CLASSPATH%;C:\Lejos\lejos\lib\pcrcxcomm.jar;
set CLASSPATH=%CLASSPATH%;C:\Lejos\lejos\lib\rcxrcxcomm.jar;
set CLASSPATH=%CLASSPATH%;C:\Lejos\lejos\lib\vision.jar;
#end of file

This sets up my environment.

Loading the Firmware

1. Create a file, LoadFirmware.bat in c:\Lejos\Project with the following line.
2. Plug in the USB IR tower.
3. Turn on RCX and place it near the tower.
4. Open up a command prompt,type in the commands

cd c:\Lejos\Project

The output will look like this:

Segment 0 length = 13686
Segment 1 length = 2938
Deleting firmware
Firmware deleted
Downloading firmware
Total image size = 16624(17k)
Firmware downloaded
Unlocking firmware
Firmware unlocked

blog comments powered by Disqus