Video showing how to use Eclipse for FRC 2013 development without plugins

All,

Night before kickoff, I thought it would be a good idea to post a video showing you how to set up the Eclipse IDE for FRC Java development, building, and deploying to a CRIO, without an official 2013 Java plugin.

http://youtu.be/onGfI0zO4Oo

Please let me know if you have any question and if the video was helpful.

-Kev

Great video, thanks for taking the time to put it together. My team has been wanting to move to Eclipse for some time now, this is really going to help us get there.

What would be really interesting to see is how to use the Java ME SDK and not the full SE SDK. What do you think about setting the Execution Environment to CDC 1.1? Have you tried this approach yet? I am going to play with it on my end, but I don’t have a cRIO to test a full deployment at the moment. I’d be interested to hear your thoughts.

Keep up the good work!

Sorry to steal your thunder, but there’s been some information released on Eclipse support with the WPILibJ plugin. Take a look at the two links below for more information (and a link to the update site). This is an experimental plugin though, so take heed.

http://firstforge.wpi.edu/sf/wiki/do/viewPage/projects.wpilib/wiki/FAQ#section-FAQ-EclipseForJavaProgramming

http://firstforge.wpi.edu/sf/docman/do/downloadDocument/projects.wpilib/docman.root.c_and_java_documentation/doc1303

Yeah, we have looked at the eclipse plugin before… but it was the “experimental” aspect of it that drove our decision to not fully depend on it. Knowing how to build and deploy the code without an IDE (via Ant) or a supporting plugin is gold in my opinion. Though I do hope that the plugin will mature soon for convenience.

Not stealing my thunder. I believe those links have always been there, and the Eclipse plugin, even the one for 2012 was always experimental (Although I used it all of 2012 without any problems).

As far as I know, there are no 2013 eclipse plugins experimental or otherwise.

The difference here, is that if you install the plugins from the link you posted you will be installing the 2012 plugin, not the 2013. And because First decides to place the new SunSpotSDK in the plugin, you will be installing the 2012, SDK, with the 2012 templates.

The 2013 classes are a little different, they include the new network tables implementations, the Taylon motor controller classes, as well as other updates. There are also 3 Jar files to incorporate in your class as opposed to 2 in 2012.

So you can install the 2012 plugins if you like, but all it will be good for is getting the build and deploy links (which cant be modified). Be sure to replace the sunspotfrcsdk folder with the 2013 version, and use the 2013 templates because they call new classes.

The Squawk Virtual Machine running on the cRIO is a Micro Edition Java Runtime Environment. So you are only limited to J2ME classes anyway.

If you changed your environment to CDC 1.1, everything would work the same as far as development is concerned, because your JRE setting really doesn’t matter, you are not running the code on your machine so the JRE is never used. You are downloading the Java SE JDK to basically use the compiler and other tools that comes with it for development. The Java Runtime Environment doesn’t include those items.

Which is why we usually set our Alternate Runtime Environment to just a JDK, because that’s all we need.

So as far as code on the robot, you are limited to whats in the SunSpotFRCSDK which is a java micro variant plus some stuff that Squawk and WPILib throws in, and whatever classes you write yourself. You do not have access to the full SE resources because they simply wont run on the Squawk VM.

Hope this helps.

-Kev

Hi -

Thanks for the video, we even managed to get this working for a couple of Macs that students are using for development. However, the problem is that it doesn’t cover getting the “deploy” then “run” Ant targets working, only “build”. Deploy seems to work - as it just builds the jars to deploy, but run fails because it is missing a setting for a property that has the IP address of the robot (and there may be other things once you get past this). I am guessing it’s because we haven’t ‘configured’ the plugin by adding the team number.

Has anyone figured out the last step in this process? Can you re-install last year’s plug-in, and then just update to the new Java classes for this year? Or is there something simpler …

Next year all us Eclipse users need to get together, and get at least one team on the Beta test - so that we can have an Eclipse plugin for doing development without having to resort to NetBeans. I don’t care about all the new features of WPILib and any fancy wizards for coding … I just want to be able to extend the SimpleRobot and deploy it via Eclipse.

Thanks in advance if you figured this out.

In my ‘user’ folder on my Mac is an ‘invisible’ file named “.sunspotfrc.properties”. (Yes, it starts with a dot)

Inside this file are defined these properties:

sunspot.home=/Users/mark/sunspotfrcsdk
remoteaddress=10.43.22.2
wpilibj.home=/Users/mark/sunspotfrcsdk/lib/WPILibJ

The user folder name should be your user name. The ‘remoteaddress’ property will be your robot CRIO IP address, based on your team number.

I hope this helps.

So I am not sure why I didn’t see any CD notifications for additional posts to this thread. I apologize for the delay in response, I believe you have overcome your problems, but I am going to answer your questions just in case anyone else stumbles upon this thread.

In the video around the 20:00 min mark, I show how to set up a deploy ant configuration to deploying code to the cRIO (not just building), and also show how to set up the debug configuration as well. The difference between these configurations and the build configuration is that you enter the IP address as an argument to the script -Dremoteaddress=10.xx.xx.xx (what ever IP your cRIO is).

Now this will work for you as long as you are updating a system that had previous FRC plugins (because you have a .sunspot.properties file in your home directory). One of the items I forgot to show in the video was updating the .sunspot.properties file.

This file lives in your home directory and was installed by the 2012 FRC Java plugins or the 2013 Netbeans plugins. So if you never installed the plugins (which you don’t have too) you wont have this file, however this file tells the Build script where to find all the target files. So if you don’t have a .sunspot.properties file in your home directory, create one. If you do, you can modify it. (note the period “.” before the file name. ) You will need to show hidden files in order to see it. If you don’t know what your home path is, type %HOMEPATH% in the run command on windows, or just open terminal on a mac. The properties file MUST BE saved in the home path or the build script in eclipse wont be able to find it, and then you won’t have any ant target scripts.

The file defines the sunspot.home variable and the cRIO IP address. So it
should look something like this:

sunspot.home=C:/Documents and Settings/user/sunspotfrcsdk
remoteaddress=10.21.68.2

That’s all the file needs to contain. So in this case, that path is the location of my 2013 sunspotfrcsdk folder and the remote address is the IP of my cRIO. If you have it set in the file, you do not need to set it in the arguments of the ant script like in the video. If you enter an IP address in the ant script argument, while having an IP in the properties file, the argument in the ant takes precedence over the text file.

I have been meaning to make this annotation in the video,
I just haven’t had the time cause of the build season. :confused:

So sorry for any confusion,

Hope this helps,

-Kev