Arduino for Arm faults on Odroid C2

Moderators: mdrjr, odroid

Arduino for Arm faults on Odroid C2

Unread postby KurtE » Sun May 15, 2016 9:58 pm

As was mentioned in the thread: viewtopic.php?f=52&t=13257 Arduino is now releasing builds of Arduino, targeted to run on Linux Arm processors. They have now done a release that now includes this: https://www.arduino.cc/en/Main/Software

It appears to work fine on my Odroid C1, but fails to run on my Odroid C2, which is running up to date (as of yesterday) Ubuntu 16.04. It appears to be a compatibility issue with Java JRE..

Code: Select all
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$
KurtE
 
Posts: 221
Joined: Wed Jun 19, 2013 9:39 am
languages_spoken: english

Re: Arduino for Arm faults on Odroid C2

Unread postby NickK-UK » Sun May 15, 2016 10:26 pm

Interesting I've been running Arduino IDE on C2 ubuntu in 64bit.. arduino/xenial,denial, now 2:1.0.5+dfsg2-4 all [installed] and the java that it installed.

If it's anything like the mac version there was a while when you had to downgrade Java in order to run it..

Java version:
~/Projects/3rdparty/indi-eqmod$ java -version
openjdk version "1.8.0_91"
OpenJDK Runtime Environment (build 1.8.0_91-8u91-b14-0ubuntu4~16.04.1-b14)
OpenJDK 64-Bit Server VM (build 25.91-b14, mixed mode)

I used "sudo apt-get install arduino" rather than install form their website directly.
NickK-UK
 
Posts: 59
Joined: Tue Apr 19, 2016 1:43 am
languages_spoken: english
ODROIDs: ODroid-C2, Show

Re: Arduino for Arm faults on Odroid C2

Unread postby KurtE » Sun May 15, 2016 11:27 pm

I am not an expert on all of this, but I believe the Arduino that you can download as part of a release is not an up to date version of Arduino so would be great to be able to run their current releases.

I also posted about this on Teensy (PJRC) forums as well, as part of this I am testing to see if the Teensyduino beta support for Linux is working on Odroids. Works on C1 and XU4. More details up on their forum: https://forum.pjrc.com/threads/34472-Te ... -Available

Also Paul of PJRC is very active on the Arduino mail lists plus does a lot of support for Arduino. Tried his suggestion of maybe removing the java that is part of the Arduino build and use one that is on my current machine... So I tried and error is different:

Code: Select all
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$


But the good news as I mentioned, it appears to be working on C1 and XU4 :D
KurtE
 
Posts: 221
Joined: Wed Jun 19, 2013 9:39 am
languages_spoken: english

Re: Arduino for Arm faults on Odroid C2

Unread postby NickK-UK » Sun May 15, 2016 11:44 pm

Ahh that looks like you have a 32bit shared library "libListSerialsj.so" installed and attempting to run the 64 bit java?

You will need to get the 64 bit version of the library installed.
NickK-UK
 
Posts: 59
Joined: Tue Apr 19, 2016 1:43 am
languages_spoken: english
ODROIDs: ODroid-C2, Show

Re: Arduino for Arm faults on Odroid C2

Unread postby KurtE » Mon May 16, 2016 1:37 am

Yep thanks, that was after I tried not using the Java that Arduino downloads, but instead use the Java on the machine which is 54 bits.
As for the 32 bit shared library, that comes with Arduino so not sure what to do about that.

Probably report back to Arduino group and/or see if someone knows how to build the Arduino from sources and maybe build a 64 bit version...
KurtE
 
Posts: 221
Joined: Wed Jun 19, 2013 9:39 am
languages_spoken: english

Re: Arduino for Arm faults on Odroid C2

Unread postby JackSilb » Mon Jun 27, 2016 12:30 pm

Hello,

Any progress on having Arduino IDE 1.6.9 work on Ubuntu 16.04 64 bits on the C2?

Thanks
-Jack
JackSilb
 
Posts: 1
Joined: Mon Jun 27, 2016 11:59 am
languages_spoken: english

Re: Arduino for Arm faults on Odroid C2

Unread postby KurtE » Fri Jul 01, 2016 10:47 pm

I thought I would mention that I have had some luck getting Arduino for Arm (nightly build) to run on Odroid C2.
I have had a few postings up on Arduino forum: http://forum.arduino.cc/index.php?topic=400808

But a couple of days ago, I updated my C2, (sudo apt-get update/upgrade/dist-upgrade ...) and tried running the released Arduino for Arm and it still failed, but have had better luck with the nightly build. From posting on Arduino forum

---------------------

Warning: as I mentioned, 1.6.9 did not work for me. Instead I tried the nightly build.

In particular: I used firefox and browsed to: https://www.arduino.cc/en/Main/Software
I clicked on the hourly build for Linux Arm: which has the link: https://www.arduino.cc/download.php?f=/ ... arm.tar.xz

When the download completed, I clicked on the downloaded item, which brought up a linux gui app, I then told it to extract, which it created a new directory in my Downloads folder.

I opened up a command prompt (CTRL+ALT+T), and CDed into this new folder and first tried running it with
./arduino... which worked. I then tried the ./install.sh which created the desktop icon, which when double clicked also appeared to work.

Note: this is not a virgin install. Earlier I was experimenting with trying to uninstall java, reinstall java 32 bits...

So I maybe did something that helped make it work.

I believe the Arduino downloads are supposed to be self contained, that is they include their own copy of the Java system.

Note: Another user (from arduino forum) tried my steps and I am not sure if it worked for him. But would be good to see if someone else has any luck, to know if maybe I did something to my image that made it work or hopefully it works with a clean install...
KurtE
 
Posts: 221
Joined: Wed Jun 19, 2013 9:39 am
languages_spoken: english

Re: Arduino for Arm faults on Odroid C2

Unread postby KurtE » Wed Aug 03, 2016 11:39 am

Thought I would try again, so I did a fresh install of Ubuntu on the C2, did the normal stuff to make sure up to date:
sudo apt-get update... upgrade .. dist-upgrade

Went up to arduino.cc (after fixing firefox)

Downloaded current Arduino 1.6.10, extracted it and tried an Install. Double clicking on Icon and the spash screen came up and then nothing. So ran ./arduino from the command prompt.

It failed
Code: Select all
odroid@odroid64:~/Desktop/arduino-1.6.10$ ./arduino
Picked up JAVA_TOOL_OPTIONS:
Exception in thread "main" java.lang.UnsatisfiedLinkError: /home/odroid/Desktop/arduino-1.6.10/java/lib/arm/libawt_xawt.so: libXtst.so.6: cannot open shared object file: No such file or directory
    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 java.lang.ClassLoader$NativeLibrary.load(Native Method)
    at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1941)
    at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1845)
    at java.lang.Runtime.loadLibrary0(Runtime.java:870)
    at java.lang.System.loadLibrary(System.java:1122)
    at java.awt.Toolkit$3.run(Toolkit.java:1636)
    at java.awt.Toolkit$3.run(Toolkit.java:1634)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.awt.Toolkit.loadLibraries(Toolkit.java:1633)
    at java.awt.Toolkit.<clinit>(Toolkit.java:1668)
    at cc.arduino.view.SplashScreenHelper.<init>(SplashScreenHelper.java:54)
    at processing.app.Base.<clinit>(Base.java:92)

Posted info up on Arduino Developers... Got a response about the library libxtst... I figured it was probably a 32/64 bit issue so I did:
Code: Select all
    sudo apt-get install libxtst6:armhf

Then I tried running Arduino again. It comes up! I am seeing a bunch of messages in the command prompt window like:
Code: Select all
odroid@odroid64:~/Desktop/arduino-1.6.10$ ./arduino
Picked up JAVA_TOOL_OPTIONS:

(java:10014): Gtk-WARNING **: Unable to locate theme engine in module_path: "murrine",

(java:10014): Gtk-WARNING **: Unable to locate theme engine in module_path: "murrine",

(java:10014): Gtk-WARNING **: Unable to locate theme engine in module_path: "murrine",

(java:10014): Gtk-WARNING **: Unable to locate theme engine in module_path: "murrine",

(java:10014): Gtk-WARNING **: Unable to locate theme engine in module_path: "murrine",

But it looks like it is at least limping along!
KurtE
 
Posts: 221
Joined: Wed Jun 19, 2013 9:39 am
languages_spoken: english

Re: Arduino for Arm faults on Odroid C2

Unread postby KurtE » Wed Aug 03, 2016 11:27 pm

Follow up:
For the fun of it I tried installing Arduino 1.6.10 on an Odroid C2 which I installed a fresh copy of Ubuntu 16.04 (ARM 64 bit), to see if the 32 bit arm version would run on it, as I was earlier able to get the daily Arduino to run on the board, but I had played around a lot so was not sure what was needed...

The problem is their ARM version is setup to run 32 bit java and other stuff, so it needs the 32 bit versions of the libraries it uses...
I was able to get the basic Arduino to run by adding:
Code: Select all
 sudo apt-get install libxtst6:armhf


Next up Teensyduino 1.30 beta 2... I downloaded it and it would not run. Was able to get it to run by
adding:
Code: Select all
sudo apt-get install libxft2:armhf


EDIT
: Note: I installed the 32 bit version of Firefox, which also installed several other 32 bit libraries. Another user on the Arduino forum found that this was required for them to get the Arduino working on their C2 as well. The command they used was:
Code: Select all
sudo apt-get remove firefox && sudo apt-get install firefox:armhf


Started up Arduino, loaded blink, plugged T3.2 into C2 and clicked upload. The program compiled, but the Teensy loader failed to load. Tried in command line and the reboot also failed to load. Fixed by
adding:
Code: Select all
sudo apt-get install libusb-0.1-4:armhf

Still failed until I added the udev rules. But now my Teensy is blinking

Note: it sometimes fails to program and I need to hit program button...

Also information I received on the Arduino Developers mail list:
if your kernel has been compiled with

Userspace binary formats ---> Kernel support for 32-bit EL0

it should be able to run both ARM64 and ARM32 binaries. The problem here is that any library linked by those binaries must be 32bit (as it already happens with x86_64 and i686 compatibility libc and runtimes).

The IDE package is self contained only for ARM32 at the moment.

Best,
Martino

And
Well, I suspect that the 64bit part is the main issue you'll encounter, as 64 bit ARM is still a bit on the green side (read "nearly nonexistent" in some instances"..

You may find this thread on the Pine64 forum of some interest, as some guys there have been working on how to get the latest Arduino IDE working on the Pine64, which is another 64bit ARM SoC board.

http://forum.pine64.org/showthread.php?tid=1753

Pete
Last edited by KurtE on Wed Mar 08, 2017 2:21 am, edited 1 time in total.
KurtE
 
Posts: 221
Joined: Wed Jun 19, 2013 9:39 am
languages_spoken: english

Re: Arduino for Arm faults on Odroid C2

Unread postby fab » Thu Dec 15, 2016 12:31 am

Hi,

Is there any one who succeed to have the Arduino IDE 1.6.9 running on the C2?

On my side, I am able to to compile and load the blink example under this new IDE, but as soon as I add a serial monitor I got a library link error related to this:
libjSSC-2.8_armsf.so
(located under /home/odroid/.jssc/)
fab
 
Posts: 212
Joined: Mon Apr 28, 2014 3:51 pm
Location: France Orleans
languages_spoken: english French
ODROIDs: Odroid W + Odroid C0 + Odroid C1 + Odroid C2

Re: Arduino for Arm faults on Odroid C2

Unread postby KurtE » Thu Dec 15, 2016 11:52 pm

sorry I have not touched my C2 in several months. Been busy with Teensy 3.5/3.6 stuff, plus playing with an UP board. I may try it again soon. But Will probably try with the current stuff 1.6.13. My guess still has the same issues.

As for Terminal monitor, you probably can simply use a terminal window for most of that. For Teensy development on my PC, I quite often use TyQt to do the terminal stuff. Wonder if it would build/run for C2?
KurtE
 
Posts: 221
Joined: Wed Jun 19, 2013 9:39 am
languages_spoken: english

Re: Arduino for Arm faults on Odroid C2

Unread postby fab » Thu Dec 29, 2016 5:29 pm

Thx KurtE for your help.
Yes it works well with minicom or other serial tool, but as it is used inside a classroom, I would prefer to have it from the IDE.....
fab
 
Posts: 212
Joined: Mon Apr 28, 2014 3:51 pm
Location: France Orleans
languages_spoken: english French
ODROIDs: Odroid W + Odroid C0 + Odroid C1 + Odroid C2

Re: Arduino for Arm faults on Odroid C2

Unread postby tdg_Engimusing » Sun Feb 12, 2017 3:30 am

I had some success getting the serial port to work on 64-bit Ubuntu on the C2. See my post here:

http://forum.arduino.cc/index.php?topic=400808.msg3119974#msg3119974
tdg_Engimusing
 
Posts: 1
Joined: Sun Feb 12, 2017 3:28 am
languages_spoken: english
ODROIDs: C1+
C2

Re: Arduino for Arm faults on Odroid C2

Unread postby fab » Tue Feb 21, 2017 7:30 pm

I had some success getting the serial port to work on 64-bit Ubuntu on the C2. See my post here:

http://forum.arduino.cc/index.php?topic ... msg3119974


Many thx @tdg_Engimusing. I followed your steps, and now my Arduino IDE serial monitor is now working well.

(I downloaded the latest nighty build for the Arduino IDE, 1.8.2 dated of Feb,20, and it works out of the box, without installing anything else, except the trick to do, regarding the serial monitor)
fab
 
Posts: 212
Joined: Mon Apr 28, 2014 3:51 pm
Location: France Orleans
languages_spoken: english French
ODROIDs: Odroid W + Odroid C0 + Odroid C1 + Odroid C2

Re: Arduino for Arm faults on Odroid C2

Unread postby KurtE » Tue Feb 21, 2017 11:38 pm

Hi fab, when you said it worked out of the box, was this done on a C2 with a new clean install of Linux, or did it still have all of the other things installed on it like the 16 bit firefox and the other 16 bit libraries that were mentioned earlier?
KurtE
 
Posts: 221
Joined: Wed Jun 19, 2013 9:39 am
languages_spoken: english

Re: Arduino for Arm faults on Odroid C2

Unread postby fab » Wed Feb 22, 2017 5:24 am

Hi fab, when you said it worked out of the box, was this done on a C2 with a new clean install of Linux, or did it still have all of the other things installed on it like the 16 bit firefox and the other 16 bit libraries that were mentioned earlier?


Hi Kurt, Oups! You are right. I did not remember what I installed for having the Arduino IDE running 2 months ago, but for sure, the version I installed today was NOT from a C2 fresh image installation.

Fab
fab
 
Posts: 212
Joined: Mon Apr 28, 2014 3:51 pm
Location: France Orleans
languages_spoken: english French
ODROIDs: Odroid W + Odroid C0 + Odroid C1 + Odroid C2

Re: Arduino for Arm faults on Odroid C2

Unread postby KurtE » Thu Jun 14, 2018 11:26 pm

Thought I would mention, that it looks like Arduino is working on an ARM 64 version of Arduino.

Paul of PJRC (Teensy) has made at least one version of the Teensyduino code that works with this.

There are more details on how to do this on the PJRC forum: https://forum.pjrc.com/threads/52649-Te ... post180923
This includes a download of the Arduino beta/daily builds as well as Teensyduino... Plus there are instructions, like you currently need to delete the Java that came with Arduino...

I did a quick test and so far it appears to work with the instructions...
KurtE
 
Posts: 221
Joined: Wed Jun 19, 2013 9:39 am
languages_spoken: english


Return to Ubuntu

Who is online

Users browsing this forum: No registered users and 4 guests