-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathREADME.Linux
68 lines (38 loc) · 2.1 KB
/
README.Linux
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
# lejos_rcx
Lejos RCX code with updates / fixes
I've forked this code to make it usable under a modern linx distribution.
In the following lines I decribe the steps to run the Lejos RCX code on newer Linux distributions. I've tried Ubuntu 12.04 LTS, Ubuntu 14.04 LTS and Linux Mint 17.3.
I've to point out that the communication betwen a VM under VirtualBox and the USB tower had failed. I think the problem was the "emulated" USB port.
## Requirements
sudo apt-get install gcc make ant openjdk-6-jdk openjdk-7-jdk git
## Build libraries
Define `RCX_HOME`
export RCX_HOME=/home/user/RCX
Getting sources from [https://github.com/hugheaves/lejos_rcx](https://github.com/hugheaves/lejos_rcx) or [https://github.com/hagbeck/lejos_rcx](https://github.com/hagbeck/lejos_rcx):
git clone https://github.com/hagbeck/lejos_rcx.git
Use JDK 1.6 for the build process because of some dependencies in some classes:
sudo update-alternatives --config java
sudo update-alternatives --config javac
Define `LEJOS_HOME`:
export LEJOS_HOME=$RCX_HOME/lejos_rcx/lejos
Build libraries using `ant`:
cd $LEJOS_HOME
ant
If it failes with the errors "fatal error: sys/types.h: No such file or directory" or "fatal error: stdlib.h: No such file or directory" then you are using a linux distribution without the build-essentials installed (i.e. newer Ubuntu versions or Linux Mint). Add these with
sudo apt-get install build-essential
## Add Lejos to RCX
Use JDK 1.7 (or 1.8? I will try ;-)):
sudo update-alternatives --config java
sudo update-alternatives --config javac
Configure the tower:
sudo chmod a+rw /dev/usb/legousbtower0
export RCX_PORT=/dev/usb/legousbtower0
Push to the RCX:
$LEJOS_HOME/bin/firmdl
**I've to point out that the communication betwen a VM under VirtualBox and the USB tower had failed. I think the problem was the "emulated" USB port.**
### Check
cd $LEJOS_HOME/release/check
$LEJOS_HOME/bin/lejosjc DistributionSmokeTest.java
$LEJOS_HOME/bin/lejos DistributionSmokeTest
#### Credits
Linux README copied from https://github.com/hagbeck/lejos_rcx/blob/4d25bdb9f0f0656f5418bedbbffc6b3151c43dfe/README.md