-
Notifications
You must be signed in to change notification settings - Fork 2
Build System
The FRC plugin provides the athena build system. Athena is a script uses Apache ANT to compile and deploy code to a roboRio.
The build.xml
in each project serves as a pointer to the main build.xml
installed with wpilib.
Copy of build.xml.
Along with the build.xml
there is also a build.properties
file in the same directory.
This file defines team spesific and OS spesific properties to be accessed by the build script.
These properties are refferenced with a special syntax where ${prop-name}
will be replaced with the value of property defined as prop-name
.
ANT uses targets with branching dependencies to build the program.
There are 4-5 targets not mentioned here but they are not very important to the build process.
get-target-ip trys to get the IP of the roboRio. It uses multiple steps in failover mode to get the highest chance of a connection.
- Try to reach
roboRIO-${team-number}-FRC.local
- Try to reach
172.22.11.2
, static USB - Try to reach
10.${ip.upper}.${ip.lower}.2
Upon failure of all three opeion an assertion command fails an displays roboRIO not found message.
compile will compile the java source code and has no dependencies.
Files from ${src.dir}
will generate binary class files in ${build.dir}
.
The javac
command is used to compile Java.
jar depends on compile.
jar will create a Java runnable jar file from the compiled source code and the provided librarys.
The output will be the ${dist.jar}
.
deploy depends on clean,jar,get-target-ip.
- Use scp to transfer the
${dist.jar}
to the rio - Use ssh to run a
killall
command on processnetconsole-host
- Use scp to transfer
robotCommand
file to the rio (file sets up enviorment variables for java) - Use ssh to run the
${deploy.kill.command}
- Use ssh to run the
sync
command
The sync
command is a UNIX command that forces the OS to write all data to disk that is scheduled to be written.
After sync
returns it is garanteed that everything at that point has been written to storage.