Log in

View Full Version : Deploy to a legacy cRIO from our new IDEs (Eclipse/IDEA)?


Roth So
30-10-2016, 22:00
Hi! Our team today successfully resurrected the ole' 2014 robot. The cRIO fortunately still had code in it, so we didn't have to deploy it again.

However, we likely will need to modify the code soon (to practice), which means we will have to find a way to deploy it. After some researching, my understanding is that the only way to deploy Java code to the cRIO is through the Netbeans plugins.

I would ideally like to keep both our current IDEs and the cRIO. But if I understand correctly, this means we now face a conundrum:

If we want to keep the cRIO, we must use Netbeans
If we want to keep our IDE, we must use the roboRIO


Seems odd. Am missing something here? Is it true there is no good way to deploy Java code to the old cRIO from Eclipse or IntelliJ? If so, would we also face compatibility issues in using the latest WPILib?

At this point, I'm considering we instead snag a roboRIO from another robot and then use GradleRIO to deploy from IntelliJ for a truly "fresh" start that better mimics our environment this upcoming season. We would also be able to use the new latest WPILib. However, I can't justify this action; it feels wrong to suggest this is the only course of action when I'm not entirely sure it is.

Thanks in advance for any help here!

Mark McLeod
31-10-2016, 08:46
The older cRIO used a different Java implementation (utilizing Squawk VM (https://en.wikipedia.org/wiki/Squawk_virtual_machine)) so you have to use the older matching Java and WPILib versions: http://wpilib.screenstepslive.com/s/3120/m/7885/l/79405-installing-the-java-development-tools
If you want to closely emulate the current control system, especially the current capabilities, a roboRIO is a better bet.

Roth So
31-10-2016, 19:40
Oh, okay. That all makes sense, thank you for the insight! We'll get going with our migration to the roboRIO then.

krieck
31-10-2016, 20:29
We were able to deploy from Eclipse to the cRIO last year (http://tinyurl.com/cRioEclipse). The wpilib build tool is based on ant (http://ant.apache.org/), so it runs directly inside eclipse, no problems. You will need the cRIO version of wpilib, however.

You'll need to tweak your .sunspotfrc.properties file to have the path of the old wpilib directory, as well as the remote address of your robot. When building from ant, you'll need to specify the remote address as a system property: e.g. -Dremoteaddress=10.te.am.2

When deploying, the ant build script will FTP your code onto the remote address.

AllenGregoryIV
31-10-2016, 21:30
We were able to deploy from Eclipse to the cRIO last year (http://tinyurl.com/cRioEclipse). The wpilib build tool is based on ant (http://ant.apache.org/), so it runs directly inside eclipse, no problems. You will need the cRIO version of wpilib, however.

You'll need to tweak your .sunspotfrc.properties file to have the path of the old wpilib directory, as well as the remote address of your robot. When building from ant, you'll need to specify the remote address as a system property: e.g. -Dremoteaddress=10.te.am.2

When deploying, the ant build script will FTP your code onto the remote address.

This is cool, if you wrote up a guide for this, I think a lot of teams would be thankful.