How to Build the FC Software 2005/07/08
Step 1: Get ready
- Get the
c
andjava
modules out of cvs (see ?AvionicsCVSAccess). - Or, do a
cvs update
Step 2: Build the rocket kernel, uncanny, the simulator, and other c bits
cd c/linux-2.4 |
|
make |
Make everything including the kernel and configure the kernel tree which includes the headers for uncanny |
make linux-2.4.27-adeos/.config |
To configure the kernel tree which includes the headers for uncanny only (may not work, may need to do make) |
sudo ln -s |
Make a sym link so that uncanny can find the kernel headers |
cd ../uncanny |
|
make |
Make uncanny |
cd .. |
|
make |
A top level make to get all the sequencer and whatnot bits |
Instructions for building and using the rocket simulator, RocketDes, are available in the source code at c/tools/cppsim/readme.txt
If at any point the compiler complains about not being able to find the shared library (libSomeFile.so), then see if it's installed on your system:
> find /usr -name 'libSomeFile.so'
If it's found, you need to add the absolute path to the directory that contains the libraries to /etc/ld.so.conf. Finally run 'ldconfig' to add the necessary links to the libraries. Now recompile.
If you don't have the library, then get a hold of it by installing the appropriate package or building and installing the appropriate software, and do the step above if necessary.
Step 3: Build the java bits
cd ../java |
|
ant jar |
Build the java stuff |
java -jar dist/rocketview.jar |
run rocketview just to make sure it works |
cp src/launchcontrol/main.conf . |
Copy over main.conf so changes you make aren't committed |
ln -s src/launchcontrol/sched.conf . |
Always look at the latest sched.conf which gets updated by CVS every once in a while |
java -jar dist/rocketview.jar lc |
Run launchcontrol |
Step 4: Connect to the rocket
- If you have the field server, then connect to the
psas
network and the field server will usenetforward
to get you to the rocket at 10.0.0.1. - If you don't have the field server, then you'll need an orinoco card:
cd c/tools |
|
=./wireless.sh eth |
where n is your orinoco card interface address (try running /sbin/ifconfig ) and where m is some arbitrary large number like 57 |
Step 5: Copy stuff to the rocket
- To connect to the rocket:
ssh root@10.0.0.1
. - Remount the compactflash disk as read-write:
mount -o remount,rw /
- On your computer, scp over the files:
scp uncanny/can.o fcfifo/run_threads root@10.0.0.1:/tmp
Step 6: Run stuff on the rocket.
- Edit
setbase.sh
to get you the right GPS base coordinagtes and then run it:. setbase.sh
- Add in the new uncanny can driver:
insmod /tmp/can.o
- And run run_threads IF AND ONLY IF YOU WANT THE ANTENNAS ON!
DEBUG=1 ANTENNA=1 /tmp/run_threads
Step 7: Put good code in a more permanent place
- In the
/root
directory, you'll notice direcotries with dates (e.g.,20050701
). Make one of these, and copy over all of the previous bits from the last directory. - Overwrite your new bits into that directory.
rm current
and thenln -s <yournewdirectory> current
in order to getcurrent
to point to your new bits.- Remount the compactflash disk as read-only:
mount -o remount,ro /
... and that's it. Whew!
logs are in /var/log/psas
-- ?TimWelch - 08 Jul 2005