| $ vi .bashrc |
| export LEGOS_ROOT=/build/brickos-0.9.0/ |
| export RCXTTY=USB |
| export PATH="/build/brickos-0.9.0/util:$PATH" |
次のコマンドをタイプする。
|
$ firmdl3 /build/brickos-0.9.0/boot/brickOS.srec Transferring "brickOS.srec" to RCX... 100% |
Windows での brickOS プログラミング用に、Linux 上のディレクトリと別に、 ディレクトリを作成する。以下ではそのディレクトリを brickOS として 解説する。
| $ mkdir brickOS |
| cd brickOS |
| cp /build/brickos-0.9.0/demo/Makefile ./ |
| cp /build/brickos-0.9.0/Makefile.common ./ |
| $ vi Makefile |
| 変更前 | 変更後 |
|---|---|
| -- | prefix=/build/brickos-0.9.0 |
| KERNEL=../boot/legOS | KERNEL=$(prefix)/boot/brickOS |
| PROGRAMS=helloworld.lx rover.lx linetrack.lx robots.lx c++.lx | PROGRAMS=helloworld.lx |
|
include ../Makefile.common include ../Makefile.user |
include Makefile.common include $(prefix)/Makefile.user |
|
all clean realclean depend:: $(MAKE) -C c++ $@ |
#all clean realclean depend:: # $(MAKE) -C c++ $@ |
| $ chmod u+w Makefile.common |
| $ vi Makefile.common |
| 変更前 | 変更後 |
|---|---|
| prefix=/usr/local | prefix=/build/brickos-0.9.0 |
| $ cp /build/brickos-0.9.0/demo/helloworld.c ./ |
| $ make |
ls して見て、helloworld.lx が出来ていれば成功です。
| $ dll helloworld.lx |