Code Sourcery ARM toolchain 2009q1-203
About Mentor Embedded / Code Sourcery
From codesourcery.com: CodeSourcery builds software tools that enable its customers to get the most out of hardware platforms ranging from embedded devices to supercomputers. CodeSourcery's products and services deliver on the promise of open-source software and open standards. Founded in 1997.
From mentor.com: Mentor acquired from Code Sourcery in November 2010.
The following binary installer is recommended for adding the toolchain to your host computer.
Creating directory to hold toolchain
Run the following commands to create the directory to hold the toolchain and allow anyone to write to that directory.
sudo mkdir -p /opt/codesourcery sudo chmod ugo+wrx /opt/codesourcery
After you install the toolchain, you can make the directory non-writable if you so desire.
Using bash instead of dash
By default on Ubuntu systems, /bin/sh is linked to /bin/dash and that causes problems with certain versions of the toolchain and some SDK build scripts. Run the following commands to switch to using bash:
sudo rm /bin/sh sudo ln -s /bin/bash /bin/sh
Ubuntu 12.04 and later
In order to run the toolchain installer you need to install the 32-bits libs, since this versions removed ia32-libs ia32-libs-gtk packages from the repository you need to run
apt-get install libgtk2.0-0:i386 libxtst6:i386 gtk2-engines-murrine:i386 lib32stdc++6 libxt6:i386 libdbus-glib-1-2:i386 libasound2:i386
more info here
After downloading the toolchain, set the execution permission and run the installer
chmod ugo+x arm-2009q1-203-arm-none-linux-gnueabi.bin ./arm-2009q1-203-arm-none-linux-gnueabi.bin
You will see a welcome screen:
Accept the license, and press Next.
Review the components that are included with the toolchain and press Next.
Select Typical install and press Next.
Change the install location to
and press Next.
Change option to Do not modify PATH. and press Next.
Select Don't create links and press Next.
Review summary information and press Install.
Press Done when the installation is complete.
Configuring SDK to use toolchain
The RidgeRun SDK configuration tool allows you to set the toolchain directory path. The default location is /opt/codesourcery/arm-2009q1, so if the recommended location was used above, you do not need to configure your SDK. If you used a different location, then you will need to run the SDK configuration tool once you have the SDK installed in order to change the toolchain directory path.
The menu tree is
RidgeRun SDK Configuration -> Toolchain configurations -> Toolchain binaries path
Errors and how to fix them
/lib/libc.so.6: No such file
On Ubuntui 12.04, you might see this error when installing the toolchain (which is harmless and can be ignored):
Preparing to install... Extracting the JRE from the installer archive... Unpacking the JRE... Extracting the installation resources from the installer archive... Configuring the installer for this system's environment... strings: '/lib/libc.so.6': No such file Launching installer...
You can use the locate command to find the library:
locate libc.so.6 /lib/i386-linux-gnu/libc.so.6
so the library is on the system, just not at the hard coded path the toolchain installer was expecting.
You can see that the installer has the path hard coded using the strings command:
strings arm-2009q1-203-arm-none-linux-gnueabi.bin | fgrep libc.so.6 nptl="`strings /lib/libc.so.6 | grep -i nptl`"
You can create a symbolic link to the path expected by the toolchain, something like
sudo ln -s /lib/x86_64-linux-gnu/libc.so.6 /lib/libc.so.6