Is there a deploy-only utility to load roborio?

Hi folks:

Is there a deploy-only utility to load code into the roborio?

That is, can we generate a binary file using eclipse on the programming laptop, send this binary file to the folks using the driver station laptop, and they can use a simple utility to deploy it to the roborio? We are programming in java.

Or does the entire development environment need to be set up on the other laptop, the whole project zipped/sent/imported, etc?

This would be handy when the programmers are making changes off-site and want to easily send an update to the drive team doing testing elsewhere.

thx

ftp is all you need.

Ahh, well that is encouraging, but I am not quite sure how to ftp to the roborio.

I presume that the file to send is C:…\project-name\dist\FRCUserProgam.jar, and it is ftp’d over USB to 172.22.11.2:22, but that is about as far as I can get at the moment.

The output from the eclipse deploy is:

Buildfile: C:\Users\USER\Desktop\frc-code	est-bot-7\build.xml
Trying to override old definition of task classloader
clean:
   [delete] Deleting directory C:\Users\USER\Desktop\frc-code	est-bot-7\build
   [delete] Deleting directory C:\Users\USER\Desktop\frc-code	est-bot-7\dist
compile:
    [mkdir] Created dir: C:\Users\USER\Desktop\frc-code	est-bot-7\build
     [echo] [athena-compile] Compiling src with classpath=C:\Users\USER\wpilib\user\java\lib\CTRLib.jar;C:\Users\USER\wpilib\user\java\lib
avx_frc.jar;C:\Users\USER\wpilib\java\current\lib\WPILib.jar;C:\Users\USER\wpilib\java\current\lib\NetworkTables.jar;C:\Users\USER\wpilib\java\current\lib\opencv.jar;C:\Users\USER\wpilib\java\current\lib\cscore.jar to build
    [javac] Compiling 1 source file to C:\Users\USER\Desktop\frc-code	est-bot-7\build
jar:
     [echo] [athena-jar] Making jar dist/FRCUserProgram.jar.
    [mkdir] Created dir: C:\Users\USER\Desktop\frc-code	est-bot-7\dist
    [mkdir] Created dir: C:\Users\USER\Desktop\frc-code	est-bot-7\build\jars
     [echo] [athena-jar] Copying jars to build/jars.
     [copy] Copying 6 files to C:\Users\USER\Desktop\frc-code	est-bot-7\build\jars
      [jar] Building jar: C:\Users\USER\Desktop\frc-code	est-bot-7\dist\FRCUserProgram.jar
get-target-ip:
     [echo] Finding roboRIO, please ignore any [hostinfo] error messages
     [echo] Trying USB: 172.22.11.2
     [echo] Trying DNS: roboRIO-698-FRC.lan
     [echo] Trying mDNS: roboRIO-698-FRC.local
     [echo] roboRIO found at 172.22.11.2
dependencies:
     [echo] Trying Static Ethernet: 10.6.98.2
     [echo] roboRIO image version validated
     [echo] Checking for JRE. If this fails install the JRE using these instructions: https://wpilib.screenstepslive.com/s/4485/m/13503/l/288822-installing-java-8-on-the-roborio-using-the-frc-roborio-java-installer-java-only
  [sshexec] Connecting to 172.22.11.2:22
  [sshexec] cmd : test -d /usr/local/frc/JRE
deploy:
   [delete] Deleting: C:\Users\USER\wpilib\java\current\lib
ative\lib\WPI_Native_Libraries.properties
      [scp] Connecting to 172.22.11.2:22
      [scp] Receiving file: /usr/local/frc/lib/WPI_Native_Libraries.properties
      [scp] Receiving: WPI_Native_Libraries.properties : 2570
      [scp] File transfer time: 0.02 Average Rate: 151,176.47 B/s
      [scp] done
   [delete] Deleting: C:\Users\USER\wpilib\user\java\lib\User_Libraries.properties
      [scp] Connecting to 172.22.11.2:22
      [scp] Receiving file: /usr/local/frc/lib/User_Libraries.properties
      [scp] Receiving: User_Libraries.properties : 127
      [scp] File transfer time: 0.0 Average Rate: 127,000.0 B/s
      [scp] done
     [echo] [athena-deploy] Copying code over.
      [scp] Connecting to 172.22.11.2:22
      [scp] done.
  [sshexec] Connecting to 172.22.11.2:22
  [sshexec] cmd : ldconfig
  [sshexec] Connecting to 172.22.11.2:22
  [sshexec] cmd : killall -q netconsole-host || :
   [delete] Deleting: C:\Users\USER\wpilib\java\current\ant
etconsole-host.properties
      [scp] Connecting to 172.22.11.2:22
      [scp] Receiving file: /usr/local/frc/bin/netconsole-host.properties
      [scp] Receiving: netconsole-host.properties : 127
      [scp] File transfer time: 0.0 Average Rate: 127,000.0 B/s
      [scp] done
      [scp] Connecting to 172.22.11.2:22
      [scp] done.
     [echo] [athena-deploy] Starting program.
  [sshexec] Connecting to 172.22.11.2:22
  [sshexec] cmd : . /etc/profile.d/natinst-path.sh; /usr/local/frc/bin/frcKillRobot.sh -t -r;
  [sshexec] Connecting to 172.22.11.2:22
  [sshexec] cmd : sync
BUILD SUCCESSFUL
Total time: 10 seconds

But this is all a bit muddy to me. I am much more comfortable with gcc and using a jlink to deploy via jtag or swd into an arm cortex.

Can you tell me the appropriate ftp command I can use from the command prompt (and embed into a bat file)? The jar file and ftp address seem obvious, but where in the roborio file system is it placed?

thx, gil

Run as a WPILib Java Deploy, cancelling the build when it reaches “trying to find RoboRIO”

You should have FRCUserProgram.jar in the dist folder in your project root. You can copy this to your RoboRIO using scp (scp FRCUserProgram.jar lvuser@roborio-TEAM-frc.local:/home/lvuser). You will need SCP for this to work, which is not included with windows. If you have another FTP solution, use user lvuser, password blank, path /home/lvuser/FRCUserProgram.jar

You’re 100% better off using a proper build system, whether it be the eclipse plugins or something like gradlerio.

You could also tell the drivers to run a git pull and then deploy it from Eclipse.

Got it. Loaded filezilla on the driver station laptop (declined the extra program it tries to install).

In File/Site-Manager, added new site, called it roborio, Host 172.22.11.2, Port 22, Protocol SFTP, Login-Type Normal, User lvuser, Password (blank).

Upon Connect, it places you right into the /home/lvuser directory (right-side panel). Just need to navigate to the local directory where the new FRCUserProgram.jar file resides (left-side panel), and double-click it to upload to roborio.

Disconnect and press Reset on the roborio. Run Driver Station.

Easy-Peasy :slight_smile:

Thanks everybody.

gil