Skip to content

FRC-6390/FRC-Athena

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

357 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

FRC-Athena

Vendordep URLs

Athena vendordeps (install these from WPILib vendordep manager):

External vendordeps required by Athena modules:

First-Time Toolchain Setup (Docker + Rust)

This section is for Athena maintainers and contributors who build/publish ARCP JNI natives (athena-arcp-java).

If you only consume released Athena vendordeps in a robot project, you can skip this section.

1) Install Docker

Recommended path for cross-target JNI bundles is Dockerized cross-build.

Linux post-install (so docker runs without sudo):

sudo usermod -aG docker $USER
newgrp docker

Verify:

docker --version
docker run --rm hello-world
docker info

Windows troubleshooting:

  • If you see failed to connect to Docker API at npipe:////./pipe/..., Docker Desktop is installed but the engine is not running/reachable.
  • Start Docker Desktop and wait until it reports "Engine running", then retry.
  • ARCP host mode on supported Linux/Windows hosts now uses Docker by default.
  • If you need host-native ARCP JNI build, disable Docker cross-build:
    • ./gradlew :athena-arcp-java:prepareArcpNativeResources -ParcpNativeMode=host -ParcpUseDockerCross=false

2) Install Rust (rustup, cargo, rustc)

Install Rust via rustup:

  • macOS/Linux:
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
  • Windows (PowerShell):
winget install Rustlang.Rustup

Restart terminal, then verify:

rustup --version
rustc --version
cargo --version
rustup default stable

3) Install Required Rust Targets

ARCP vendor JNI matrix uses these targets:

  • armv7-unknown-linux-gnueabihf
  • x86_64-unknown-linux-gnu
  • aarch64-unknown-linux-gnu
  • x86_64-pc-windows-gnu

Install all required targets:

rustup target add \
  armv7-unknown-linux-gnueabihf \
  x86_64-unknown-linux-gnu \
  aarch64-unknown-linux-gnu \
  x86_64-pc-windows-gnu

Verify installed targets:

rustup target list --installed

4) Build Path You Should Use

Recommended (Docker cross-build):

./gradlew :athena-arcp-java:prepareArcpNativeResources -ParcpNativeMode=vendor -ParcpUseDockerCross=true

Native cross-build (without Docker) requires additional linker toolchains:

  • armv7-unknown-linux-gnueabihf -> arm-linux-gnueabihf-gcc
  • aarch64-unknown-linux-gnu -> aarch64-linux-gnu-gcc
  • x86_64-pc-windows-gnu -> x86_64-w64-mingw32-gcc (for direct GNU Windows target builds)

Windows host note: without Docker cross-build, the Windows JNI target falls back to x86_64-pc-windows-msvc and still stages to native/windows-x86_64/arcp_jni.dll.

Host-mode build (Docker by default on supported Linux/Windows hosts):

./gradlew :athena-arcp-java:prepareArcpNativeResources -ParcpNativeMode=host

Force host-native build (no Docker):

./gradlew :athena-arcp-java:prepareArcpNativeResources -ParcpNativeMode=host -ParcpUseDockerCross=false

Blank WPILib Project Setup (Required Gradle Changes)

Minimum required for most teams:

Full guide:

  • docs/core/wpilib-project-setup.md

  • Install Athena vendordep(s).

  • Keep WPILib executable/fat-jar wiring for rio deploy (especially if you edit jar):

def ROBOT_MAIN_CLASS = "frc.robot.Main"
def deployArtifact = deploy.targets.roborio.artifacts.frcJava

jar {
    from { configurations.runtimeClasspath.collect { it.isDirectory() ? it : zipTree(it) } }
    from sourceSets.main.allSource
    manifest edu.wpi.first.gradlerio.GradleRIOPlugin.javaManifest(ROBOT_MAIN_CLASS)
    duplicatesStrategy = DuplicatesStrategy.INCLUDE
}

deployArtifact.jarTask = jar
wpi.java.configureExecutableTasks(jar)

Only if using Athena State DSL/compiler-plugin features:

  • add Athena maven to pluginManagement.repositories in settings.gradle
  • add athena-plugin classpath + apply plugin: "ca.frc6390.athena.plugin" in build.gradle

Build Commands

Build changed Athena modules and downstream dependents (default build behavior):

./gradlew build

Run the changed-module task directly:

./gradlew buildChangedModules

Build changed modules from a specific git base:

./gradlew buildChangedModules -PchangedSince=origin/main

Force build all Athena modules:

./gradlew buildAllModules

Force all modules through root build:

./gradlew build -PbuildAllModules=true

Build each module directly (per dependency module):

./gradlew :athena-core:build
./gradlew :athena-ctre:build
./gradlew :athena-rev:build
./gradlew :athena-photonvision:build
./gradlew :athena-limelight:build
./gradlew :athena-helios:build
./gradlew :athena-pathplanner:build
./gradlew :athena-choreo:build
./gradlew :athena-studica:build

Publish all modules locally to WPILib:

./gradlew publish -PpublishMode=local

Publish all modules online:

./gradlew publish -PpublishMode=online

Publish a single module locally:

./gradlew :athena-core:publishToMavenLocal
./gradlew :athena-ctre:publishToMavenLocal
./gradlew :athena-rev:publishToMavenLocal
./gradlew :athena-photonvision:publishToMavenLocal
./gradlew :athena-limelight:publishToMavenLocal
./gradlew :athena-helios:publishToMavenLocal
./gradlew :athena-pathplanner:publishToMavenLocal
./gradlew :athena-choreo:publishToMavenLocal
./gradlew :athena-studica:publishToMavenLocal

Set explicit version/FRC year during build or publish:

./gradlew build -Pversion="2026.1.99" -PfrcYear="2026"
./gradlew publish -PpublishMode=local -Pversion="2026.1.99" -PfrcYear="2026"

Online publish credentials:

export MAVEN_USERNAME=<username>
export MAVEN_PASSWORD=<token-or-password>
./gradlew publish -PpublishMode=online

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors