These steps assume you are on the most up to date Debian bookworm, however they can be adapted to most other distributions.
- Updating your system
- This can be done by running
sudo apt update && sudo apt upgrade
- This can be done by running
- Installing packages needed for development
sudo apt install git python3
- Installing bazel
- Follow the steps here
To run the code you'll need to download the repository from gerrit, make sure to select ssh and not http. Click on SSH, and clone with commit message hook. Copy the command, and run it locally on terminal.
To learn more about git, open a terminal and run man git, or see git(1) (especially the NOTES section).
Once the repositoy is selected you'll want to make sure to configure your name, email on git. This is required to ensure you're following the contributing guidelines above. You can do this by running these following commands:
cd aos
git config user.email "<YOUR_EMAIL_HERE>"
git config user.name "<YOUR_NAME>"We use Bazel to build the code. Bazel has extensive docs, including a nice build encyclopedia reference, and does a great job with fast, correct incremental rebuilds.
- Build and test everything (on the host system, for the roborio target-- note, this may take a while):
bazel test //...
bazel build --config=roborio -c opt //...
- Build the code for a specific robot:
# For the roborio:
bazel build --config=roborio -c opt //aos/...- Configuring a roborio: Freshly imaged roboRIOs need to be configured to run aos code at startup. This is done by using the setup_roborio.sh script.
bazel run -c opt //frc/config:setup_roborio -- roboRIO-XXX-frc.local- Download code to a robot:
# For the roborio
bazel run --config=roborio -c opt //y2020:download_stripped -- roboRIO-XXX-frc.localThis assumes the roborio is reachable at roboRIO-XXX-frc.local. If that does not work, you can try with a static IP address like 10.XX.YY.2 (see troubleshooting below)