Since Arduino and Teensyduino(PJRC) now has a release of Arduino for Arm processors, I thought I would try it out on my different ODroid processors. It works fine on my Odroid C1+ as well as Xu4.
However it does not run on my Odroid C2 which is a 64 bit Arm processor currently running Ubuntu 16.04 (64 bit)
It downloads, but when I try to launch it, Java fails.
odroid@odroid64:~/arduino-1.6.9$ ./arduino
Picked up JAVA_TOOL_OPTIONS:
=============== DEBUG MESSAGE: Atomic load(jlong) unsupported on this platform ================
#
# A fatal error has been detected by the Java Runtime Environment:
#
# SIGILL (0x4) at pc=0x00000006, pid=2359, tid=3795117168
#
# JRE version: Java(TM) SE Runtime Environment (8.0-b132) (build 1.8.0-b132)
# Java VM: Java HotSpot(TM) Client VM (25.0-b70 mixed mode linux-arm )
# Problematic frame:
# C 0x00000006
#
# Failed to write core dump. Core dumps have been disabled. To enable core dumping, try "ulimit -c unlimited" before starting Java again
#
# An error report file with more information is saved as:
# /home/odroid/arduino-1.6.9/hs_err_pid2359.log
./arduino: line 34: 2359 Segmentation fault "$JAVA" "${JAVA_OPTIONS[@]}" processing.app.Base "$@"
odroid@odroid64:~/arduino-1.6.9$ ^C
odroid@odroid64:~/arduino-1.6.9$
I tried a suggestion from Paul of PJRC to remove the downloaded Java and run it with Java installed on Odroid and it also fails:
odroid@odroid64:~/arduino-1.6.9$ ./arduino
Picked up JAVA_TOOL_OPTIONS:
=============== DEBUG MESSAGE: Atomic load(jlong) unsupported on this platform ================
#
# A fatal error has been detected by the Java Runtime Environment:
#
# SIGILL (0x4) at pc=0x00000006, pid=4268, tid=3788280944
#
# JRE version: Java(TM) SE Runtime Environment (8.0-b132) (build 1.8.0-b132)
# Java VM: Java HotSpot(TM) Client VM (25.0-b70 mixed mode linux-arm )
# Problematic frame:
# C 0x00000006
#
# Failed to write core dump. Core dumps have been disabled. To enable core dumping, try "ulimit -c unlimited" before starting Java again
#
# An error report file with more information is saved as:
# /home/odroid/arduino-1.6.9/hs_err_pid4268.log
./arduino: line 34: 4268 Segmentation fault "$JAVA" "${JAVA_OPTIONS[@]}" processing.app.Base "$@"
odroid@odroid64:~/arduino-1.6.9$ mv java/ java_save
odroid@odroid64:~/arduino-1.6.9$ ./arduino
Picked up JAVA_TOOL_OPTIONS:
java.lang.UnsatisfiedLinkError: /home/odroid/arduino-1.6.9/lib/liblistSerialsj.so: /home/odroid/arduino-1.6.9/lib/liblistSerialsj.so: wrong ELF class: ELFCLASS32 (Possible cause: architecture word width mismatch)
at java.lang.ClassLoader$NativeLibrary.load(Native Method)
at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1941)
at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1824)
at java.lang.Runtime.load0(Runtime.java:809)
at java.lang.System.load(System.java:1086)
at processing.app.Platform.loadLib(Platform.java:155)
at processing.app.Platform.<clinit>(Platform.java:150)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:264)
at processing.app.BaseNoGui.initPlatform(BaseNoGui.java:677)
at processing.app.Base.guardedMain(Base.java:151)
at processing.app.Base.main(Base.java:135)
/home/odroid/arduino-1.6.9/lib/liblistSerialsj.so: /home/odroid/arduino-1.6.9/lib/liblistSerialsj.so: wrong ELF class: ELFCLASS32 (Possible cause: architecture word width mismatch)
Cannot load native library /home/odroid/arduino-1.6.9/lib/liblistSerialsj.so
The program has terminated!
odroid@odroid64:~/arduino-1.6.9$
For the fun of it, I have now downloaded the sources onto my C2 and tried doing a build. Unless I tell it it's platform it fails. ( ant clean dist -Dplatform=linuxarm )
Run also fails not finding platform.
Wonder if I should try hacking the build.xml file and maybe try to find everywhere that talks about linuxarm and add something like linuxarm64, which does the same, except set arch-bits to 64...
Other suggestions?