brians | a39ed32 | 2013-02-14 23:00:51 +0000 | [diff] [blame] | 1 | This file contains instructions on how to set up a computer to build the code. |
| 2 | |
jerrym | 1e9e180 | 2013-03-11 08:00:20 +0000 | [diff] [blame^] | 3 | [OS] |
| 4 | Most of these instructions assume 64 bit Debian Squeeze. |
| 5 | |
brians | a39ed32 | 2013-02-14 23:00:51 +0000 | [diff] [blame] | 6 | [Install Packages] |
| 7 | First, you have to download and follow the directions in |
| 8 | <http://robotics.mvla.net/files/frc971/packages/frc971.list>. |
| 9 | You also have to follow the directions at |
| 10 | <http://backports-master.debian.org/Instructions/>. |
| 11 | Then, run `apt-get install subversion git g++-multilib gcc-multilib ruby patch \ |
| 12 | make openjdk-6-jdk lib32event-dev` |
| 13 | and `apt-get install -t squeeze-backports swig` (package lists correct for |
| 14 | amd64 Squeeze; you might be able to get it to build on other |
| 15 | versions/platforms/distributions (Ubuntu, Mint, ...) if you can find the |
| 16 | right packages. |
| 17 | You will have to accept the |
| 18 | "WARNING: The following packages cannot be authenticated!" warning for the |
| 19 | "libevent-2.0-5 lib32event-2.0-5 libevent-core-2.0-5 lib32event-core-2.0-5 \ |
| 20 | libevent-extra-2.0-5 libevent-pthreads-2.0-5 libevent-openssl-2.0-5 \ |
| 21 | libevent-dev lib32event-extra-2.0-5 lib32event-pthreads-2.0-5 \ |
| 22 | lib32event-openssl-2.0-5 lib32event-dev" packages. |
jerrym | 1e9e180 | 2013-03-11 08:00:20 +0000 | [diff] [blame^] | 23 | |
| 24 | (On 64-bit Ubuntu Precise Pangolin: |
| 25 | `apt-get install subversion git g++-multilib gcc-multilib ruby patch \ |
| 26 | make openjdk-6-jdk default-jdk libevent-dev:i386 libevent-2.0-5:i386`) |
| 27 | |
brians | a39ed32 | 2013-02-14 23:00:51 +0000 | [diff] [blame] | 28 | Also run `apt-get install powerpc-wrs-vxworks` if you want to be able to build |
| 29 | the cRIO code too. |
jerrym | 1e9e180 | 2013-03-11 08:00:20 +0000 | [diff] [blame^] | 30 | NOTE: This is in *addition* to the above commands. |
brians | a39ed32 | 2013-02-14 23:00:51 +0000 | [diff] [blame] | 31 | You will have to accept the |
| 32 | "WARNING: The following packages cannot be authenticated!" warning for the |
| 33 | "powerpc-wrs-vxworks" package. |
| 34 | If you want to actually download code to a robot (it will only work on amd64 |
michael | a91ebd9 | 2013-02-23 06:01:00 +0000 | [diff] [blame] | 35 | Squeeze), then |
| 36 | (1) do `apt-get install ncftp rsync socat`. |
| 37 | socat is used for the netconsole.sh tool that is used to talk to the cRIO. |
brians | 261847b | 2013-02-26 01:56:51 +0000 | [diff] [blame] | 38 | (2) Set the IP address of the downloading machine to be on the same subnet. |
michael | a91ebd9 | 2013-02-23 06:01:00 +0000 | [diff] [blame] | 39 | ifconfig eth0 10.9.71.22 |
| 40 | This will need to be redone when the computer Ethernet connection is |
| 41 | reset. For example, it is reset by disconnecting and reconnecting |
| 42 | the Ethernet cable or power cycling the robot. Check it with |
| 43 | ifconfig eth0 |
brians | a39ed32 | 2013-02-14 23:00:51 +0000 | [diff] [blame] | 44 | |
| 45 | [Running Locally] |
| 46 | If you want to be able to run the realtime code on your development machine |
| 47 | without just disabling the realtime part (set the AOS_NO_REALTIME environment |
| 48 | variable), follow the directions in /src/aos/config/aos.conf. |
michael | a91ebd9 | 2013-02-23 06:01:00 +0000 | [diff] [blame] | 49 | |
| 50 | [Compiling and Downloading] |
| 51 | Run `./build.sh` from src/frc971/atom_code/ and src/frc971/crio/. |
| 52 | Use `./build.sh deploy` to download to a robot. |
| 53 | |
| 54 | [Communicating with the cRIO] |
| 55 | Use netconsole.sh to communicate directly with the cRIO. |
| 56 | frc971/2013/trunk/src/aos/crio/bin/netconsole.sh |
| 57 | Use "reboot" from within netconsole.sh will reboot the cRIO. ^C will |
| 58 | stop it the netconsole.sh command. "version" will tell you the the |
| 59 | VxWorks and WIND versions and "help" will give you a list of VxWorks |
| 60 | commands that you can use. |