I now have started to use Raspberry Pi 2 with Raspbian Jessie as my desktop PC, and it does all the things I need it to do pretty well. Except… Well, Raspbian is stuck with Arduino IDE 1.0.5, even Jessie. Honestly, it sucks – the newest is 1.6.4 (arduino.cc, not arduino.org version. Screw arduino.org.) Did you know we’ve gotten a sketch autosave feature somewhere around 1.5? If I’d have known, I could have gotten some of my sketches saved when Arduino IDE crashed. Oh, BTW, 1.0.5 also crashes. Why are we stuck with it is incomprehensible.
Even more incomprehensible given that Arduino IDE happily compiles on Raspberry Pi 2 with just a build.xml file (ant build system file) slightly modified to add a new architecture, as well as some pre-compiled files replaced by the ones compiled for ARM. I won’t go into details much, since I hope that Arduino maintainers accept my build.xml modifications and do what’s necessary to support ARM architecture. If they won’t, I’ll post complete build instructions myself. I’ll describe what needs to be done though.
- First, dependencies. Honestly, I have installed a lot of packages while trying many different ways to run Arduino IDE (including getting Linux x32 tarball and trying to replace libs one by one, which was probably stupid), so I just don’t know which from what I’ve installed is necessary and which isn’t. If you absolutely need it before it’s supported, you can always use tools like apt-file to determine necessary packages by using their filenames. I guess that ‘apt-get build-dep arduino’ will bring most of them.
- Then, there’s libastylej.so . You’ll need to install libastylej-jni package – it’s something that Arduino IDE sources have to download from arduino.cc website. I have modified build.xml so that it’ll copy the installed libastylej.so instead of unzipping the bundled version. You’ll also have to install avr-gcc and avrdude, as well as libusb-dev.
- Now’s building. You can use the official tools and instructions for building Arduino IDE, except that, as for now, the working build.xml is in my Arduino repository copy. It’s forked from version 1.6.5, but I’m sure it’ll work with the next versions as well. As for now, you might just clone my repo instead of official:
git clone https://github.com/CRImier/Arduino.git
You should be able to just run ‘ant’ and relax while it compiles. Then use ‘ant run’ to run the thing, at least for the first time (haven’t researched if it does something first run-specific). After first run, at least, it should be perfectly safe to just run it as ‘linux/work/arduino‘ (from ‘build’ directory) or even move the ‘linux/work’ directory somewhere and name it ‘arduino-1.6.5’. - To have the “Compile” and “Upload” functions working, you need to replace all the files in ‘build/linux/work/hardware/tools/avr/bin‘ by their symlinks in /usr/bin. You’ll also want the ‘build/linux/work/hardware/tools/avr/etc/avrdude.conf‘ to point to ‘/etc/avrdude.conf‘. Here’s an one-liner that you have to execute in the bin directory to make symlinks:
for i in *; do echo $i; rm $i; ln -s /usr/bin/$i $i; done
If you try this approach and it doesn’t work, there’s a possibility I have forgotten something. Do post an error message in the comments – I’ll try to solve it =) There might be some problems because I’m using Raspbian Jessie, when most of you will use Raspbian Wheezy, so I figure some packages might need to be grabbed from testing repositories in case there’s a problem with them in Wheezy.
One more problem solved, and Raspberry Pi is one step closer to being a suitable work PC replacement for a guy like me. I’d say web browsers are still a major problem though. On Raspbian Jessie, as for now, both Epiphany, Iceweasel and Chromium crash randomly from time to time. A browser that crashes randomly isn’t a good browser for me. If you’re searching for a browser too, try Luakit. It’s Webkit-based, fast, never crashed since. You can see the latest HTML5 test of it here.
Pingback: Hackaday Links: June 14, 2015 | Hackaday
Pingback: Hackaday Links: June 14, 2015 | Ad Pub
Pingback: Hackaday Links: June 14, 2015 - zeax blog (ze-ax.com)
Pingback: Hackaday Links: June 14, 2015 | Hack The Planet
Hi, any new progress on this part, i like to upgrade to 1.65 or 1.66 asap. but i did not understand well enough what staps i should do from the above 😦
no other comments??? or are we the only three dorks who managed to disregard the official instructions and just went on add/remove platform and searched for it and when found happily installed… but theres a catch… i dont know how to uninstall the damn thing because if I install from the terminal it interferes with the existing one and everything ghoes to s…. I had a hp notebook with linux installed but forgot the password and couldnt use the imager to write the sd cards and my macs just ignore the sd’s u plug in to them like why the port then… U cant imagine the processes I went through to now have a 1.0.5 version on raspi4 but thought its ok i can use other laptops for more advanced stuff.. but for some reason it works best on raspi especially esp32 boards and all that s…. now Im out of ideas and cant understand why cant they just update the damn version in add/remove platform…. help me dude pls my mail is ziga dot anzur at gmail
tnx and great post btw 😀