YMMV

* your mileage may vary

Thursday, 22 January 2015

Compile Arduino IDE 1.6 on ARM Beaglebone Black (BBB)

Steps to compile Compile Arduino IDE 1.6 on Beaglebone Black largely from ShorTie (thanks) but with some mods.

http://www.raspberrypi.org/forums/viewtopic.php?f=66&t=92662

Go to this page if you just want the compiled .deb versions to install.
http://dumb-looks-free.blogspot.fr/2015/01/arduino-ide-16-on-arm-beaglebone-black.html


Works on:
Linux beaglebone 3.14.26-ti-r39 #1 SMP PREEMPT Mon Dec 8 01:52:29 UTC 2014 armv7l GNU/Linux
"Debian GNU/Linux 8 (jessie)"


Set date as needed (no RTC on BBB) and update:
date -s "21 JAN 2015 18:52:00"
apt-get update


install some tools
apt-get install zip quilt

Update quilt defaults
nano /root/.quiltrc

//
for where in ./ ../ ../../ ../../../ ../../../../ ../../../../../; do
    if [ -e ${where}debian/rules -a -d ${where}debian/patches ]; then
        export QUILT_PATCHES=debian/patches
        break
    fi
done

QUILT_PUSH_ARGS="--color=auto"
QUILT_DIFF_ARGS="--no-timestamps --no-index -p ab --color=auto"
QUILT_REFRESH_ARGS="--no-timestamps --no-index -p ab"
QUILT_DIFF_OPTS='-p'
//
 

Get the files
cd /usr/local/src

wget https://github.com/arduino/Arduino/archive/ide-1.5.x.zip
unzip ide-1.5.x.zip
cd Arduino-ide-1.5.x
wget http://ftp.de.debian.org/debian/pool/main/a/arduino/arduino_1.5.6.2+sdfsg2-3.debian.tar.xz
tar -xf arduino_1.5.6.2+sdfsg2-3.debian.tar.xz

Patch
cd debian
wget https://www.dropbox.com/s/0spmzub21rylgof/Raspbian.Arduino.arm.build.1.6.0.patch
patch -p1 < Raspbian.Arduino.arm.build.1.6.0.patch
quilt push -a
quilt refresh
cd ..


Install dependencies (this takes a while ...go watch a test match)

apt-get install -y debhelper javahelper default-jdk default-jre libastylej-jni libjssc-java libjna-java libjsch-java libjmdns-java libcommons-logging-java libcommons-httpclient-java libcommons-exec-java ant astyle extra-xdg-menus avr-libc avrdude gcc-avr bossa-cli gcc-arm-none-eabi


Build
dpkg-buildpackage -uc -b

Install

cd ..
dpkg -i arduino-core_1.6.0_all.deb arduino_1.6.0_all.deb



if you get an error loading sketches try:
mkdir /usr/share/arduino/hardware/tools/avr/etc/
ln -s /etc/avrdude.conf /usr/share/arduino/hardware/tools/avr/etc/avrdude.conf

2 comments:

  1. No go here. Quilt is choking on the build.xml file. Did the version of it change in the IDE archive since then?

    root@raspberrypi:/usr/local/src/Arduino-ide-1.5.x/debian# patch -p1 < Raspbian.Arduino.arm.build.1.6.0.patch
    patching file arduino-core.links
    patching file changelog
    patching file control
    patching file patches/adk2install_bssoc.patch
    patching file patches/arm_fix.patch
    patching file patches/install_jar_links.patch
    patching file patches/no_download_libastylej.patch
    patching file patches/no-macosx-windows-build.patch
    patching file patches/remove_copying_binaries.patch
    patching file patches/series
    patching file patches/system_libastylej.patch
    patching file rules
    root@raspberrypi:/usr/local/src/Arduino-ide-1.5.x/debian# quilt push -a
    Applying patch install_jar_links.patch
    patching file build/build.xml
    Hunk #1 succeeded at 48 (offset 10 lines).

    Applying patch wrapper_for_deb.patch
    patching file build/linux/dist/arduino

    Applying patch remove_copying_binaries.patch
    patching file build/build.xml
    Hunk #1 FAILED at 497.
    Hunk #2 succeeded at 653 with fuzz 1 (offset 105 lines).
    1 out of 2 hunks FAILED -- rejects in file build/build.xml
    Patch remove_copying_binaries.patch does not apply (enforce with -f)

    ReplyDelete
  2. Hello, - I am away from my BBB/ Pi right now. I'll take a look but I could be some time before I get a chance to look again.

    ReplyDelete