It’s now been a bit over a year since a wrote about running Eclipse RCP projects on a Raspberry Pi. Since then something really exiting has taken place. Tim Webb and Jed Anderson of Genuitec has published PiPlug; a runtime and deployment tool for hosting SWT applications on Raspberry Pi. As you might have guessed PiPlug uses a small subset of the Eclipse platform, about 5.2MiB. This includes the Equinox launcher compiled for ARM. Incidentally that is the same binary I created when writing my blog post. Anyway, the reason I’m exited is that this is a really neat way of running Java UI code on the Raspberry Pi. It is very simple: Start the PiPlug agent on the target, write your code in Eclipse and use the deployment view to push your stuff. It does not get easier than that!
However, not everything is straight out of the box. I have a tiny resistive touch LCD screen that I want to use. And I want PiPlug to adapt to the small resolution (320×240 pixels). Currently it is mostly suited to much larger resulutions. So I need to amend the PiPlug code to support this screen, then rebuild it. In order to do that I must have an Eclipse target platform with all the bits in place so that I can build my forked version of PiPlug. This gave me a reason to revisit my previous work. The instructions I wrote last year no longer works due to changes in the base repositories and the build process. So I’ve done a recap and simplified everything. The source code has been updated to the latest from Eclipse 4.4 (aka Luna) and the changes I’ve done have been squashed to exactly one commit for each repository, making it easier to follow. I’ve also created patches for these repositories. So when you run the script it will clone Eclipse from the source proper, then apply the patches before building – very straightforward. Note that the script is written for Bash.
Running the script will as before create a target platform with the ARMv6 little endian binaries to use for PiPlug or another Eclipse RCP application on the Raspberry Pi. The git repo with all the code is at https://github.com/turesheim/eclipse-rpi. But in order to save you the time it takes to build, I’ve already created the repository which you can use. You’ll find it in the release section of the above mentioned project page. Simply download and set as target platform.
The SWT and Equinox binary bundles you want all contain the segment “armv6l”. So you should add these to the feature or product definition. Note that the export product command in Eclipse PDE is a bit limited and will not work. You should probably set up a Tycho build for you project in order to create a Raspberry Pi distribution of it.
That’s it. Now I’m off to play around with PiPlug and the Sensiron SHT15 I have attached to my RPi 🙂