Search This Blog

Thursday, 21 August 2014

Running Kinetis Design Studio (32bit Eclipse) on 64bit Ubuntu

YAY!!!!  I got it working!  

Back in the end of May, I enrolled in the beta for Kinetis Design Studio installer for Linux to allow me to develop on my Teensy 3.1 bare-metal,
only to find that it would not run on my Ubuntu 14.04 64bit.  I'm running Oracle Java 7

Kinetis Design Studio installed properly from DEB, but when I launched it, it immediately complained that it could not load the SWT library for Eclipse.  It turns out that they built the Debian (Ubuntu) base on 32bit Eclipse.  

After some futzing around, I opened a case with Freescale Support: (putting the details here for search engine assistance)
SR Number: 1-2152355207Date Opened: 07/28/2014 05:28:35 PHX timeSubject: kinetis-design-studio will not load in Ubuntu 14.04Description: Fresh install of Ubuntu 14.04uname -aLinux ballmik-Satellite-L305 3.13.0-32-generic #57-Ubuntu SMP Tue Jul 15 03:51:08 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux

Running Oracle Java java version "1.7.0_65"Java(TM) SE Runtime Environment (build 1.7.0_65-b17)Java HotSpot(TM) 64-Bit Server VM (build 24.65-b04, mixed mode)

Eclipse appears to be built for 32bit platform. is the a 64bit version ?attaching eclipse log.
Thank you.
!ENTRY org.eclipse.osgi 4 0 2014-07-28 08:06:23.472!MESSAGE Application error!STACK 1java.lang.UnsatisfiedLinkError: Could not load SWT library. Reasons: /home/ballmik/.eclipse/org.eclipse.platform_4.3.2_870091379_linux_gtk_x86/configuration/org.eclipse.osgi/bundles/430/1/.cp/ cannot open shared object file: No such file or directoryno swt-pi-gtk in java.library.path/home/ballmik/.swt/lib/linux/x86/ cannot open shared object file: No such file or directoryCan't load library: /home/ballmik/.swt/lib/linux/x86/

Their quick response was that the DEB was built on/for Ubuntu 12.04LTS 32bit.... 

Not helpful...  So...  life got in the way, and I finally returned to this last night.  With fresh eyes, I simply searched G00gle for "running 32 bit eclipse on 64 bit Ubuntu 14.04"  and came up with a bunch of different solutions. 

The issue is that in 64bit Ubuntu base install, the 32bit libraries are not installed.  period.

Prior to Ubuntu 14.04, you used to be able to "sudu apt-get install ia32-libs", but they removed this ability recently because dpkg now has multi-arch enabled by default. MEANING, that if you actually knew what libraries were failing, you could reinstall them with a :i386 at the end of the package name.  Seemed like a lot of work to find the specific libraries... 

Here's what worked for me.
(from Stackoverflow: How to install ia32-libs in ubuntu 14.04 LTS)

sudo -i
cd /etc/apt/sources.list.d
echo "deb raring main restricted universe multiverse" >ia32-libs-raring.list
apt-get update
apt-get install ia32-libs

Reboot, and voila! Kinetis Design Studio is now working!

Now, on to figuring out how to code for the Teensy 3.1...


Freescale: Kinetis Design Studio Multiarch
Stackoverflow: How to install ia32-libs in ubuntu 14.04 LTS
Teensy 3.1 Bare-Metal