A Microcontroller Discussion Board
September 03, 2010, 05:12:33 PM *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
News: Don't know how to start, visit our Tutorials section
 
   Home   Help Search Login Register  
Pages: [1] 2 3
  Print  
Author Topic: GNU ARM Toolchain Installer  (Read 19692 times)
0 Members and 1 Guest are viewing this topic.
waipot
Moderator
Freshy
*****
Posts: 10



View Profile
« on: September 29, 2008, 11:18:26 AM »

GNUARM is a set of open source GNU compiler for ARM microcontroller. The toolchain consists of the GNU binutils, GCC compiler set, Newlib and Insight, the graphical user interface to GNU debugger. However, building the compiler is not an easy task since you have the dependencies. Fortunately, I found a magic script from this developers group. They have created a script to compile GNU ARM toolchain automatically but their target is for Lego Mindstorms NXT platform. By a little modifying, I created a GNU ARM toolchain installer for general purpose.

Features

    * Automatically compile GNU ARM toolchain with one command by implementing of the process as suggested on http://www.gnuarm.org/support.html
    * The toolchain includes GNU C/C++, Binutils, Newlib and Insight GUI debugger
    * Tested on Ubuntu 8.04 and 8.10
    * Compatible with 32 and 64 bit

Obtaining the latest version
You can get the installer in either ways

* Check out from SVN

Code:
svn checkout http://hobbycode.googlecode.com/svn/trunk/gnu-arm-installer\\
 gnu-arm-installer

* Download the Tarball: gnu-arm-installer-v0.2.tar.gz

Installations
1. Download the latest installer gnu-arm-installer-v0.2.tar.gz and then extract the archive by typing:

Code:
tar xzf gnu-arm-installer-v0.2.tar.gz

2. Download the following source files to gnu-arm-installer/src
* binutils-2.19.tar.bz2
* gcc-4.3.2.tar.bz2
* newlib-1.16.0.tar.gz
* insight-6.8.tar.bz2

and then type these commands:

Code:
cd gnu-arm-installer
./gnu-arm-installer.sh
The installer will extract and compile all of the source files automatically. If it is successful, you will get the toolchain in install/ directory.

Known issues
* insight-6.8 source code has a little problem with missing termcap library on Ubuntu. You have to install libncurses5-dev to solve the problems.
* to work with Ubuntu 8.10 need to add --disable-werror in configure option
* usual compiling failure is due to lack of dependencies i.e, patch, texinfo, gmp-dev gmfr-dev and etc...

Maintained by: Waipot Ngamsaad
License: GPL version 3 or newer
Disclaimer: You use this software with your own responsibilities. I do not guarantee anything.

PS: If you get any troubles, please feel free to report the Bugs here.

---
« Last Edit: April 13, 2009, 01:58:09 AM by Doug » Logged
A Microcontroller Discussion Board
« on: September 29, 2008, 11:18:26 AM »

 Logged
henko
Newbie
*
Posts: 1



View Profile Email
« Reply #1 on: October 21, 2008, 02:36:04 PM »

Thanks first!

But I seem to get stuck in an installation loop....
The same installation messages keep comming up over and over again, the installation process just keeps on going...
For how long should I wait?
I installed libnc... also but without result.
Any ideas?

And second what environment do you use and what programmer?
I bought the openocd small usb jtag frpm olimex and a arm7 p64 board aswell.
Many people recommend Eclipse but the all use windows...and I prefer Linux (Ubuntu).
« Last Edit: October 21, 2008, 02:39:04 PM by henko » Logged
waipot
Moderator
Freshy
*****
Posts: 10



View Profile
« Reply #2 on: October 21, 2008, 07:28:44 PM »

For the first question, I think the problem comes from the script fails to download source. So, you need to download the following files manually, put it in src/ and run the script again.

 * binutils-2.18.tar.bz2
 * gcc-4.2.2.tar.bz2
 * newlib-1.15.0.tar.gz
 * insight-6.8.tar.bz2

For the second questions, actually, I'm working for Mindstorms NXT robot. They come with USB flash programmer.  I can program it using the tools from libnxt on Ubuntu.

Logged
Omar
Newbie
*
Posts: 3



View Profile Email
« Reply #3 on: October 31, 2008, 10:11:00 AM »

I am having problems running the script, after uncompressing the files it stops with an error:   ./gnu-arm-installer.sh: 115: patch: not found
I don't know what I am missing.
Logged
Doug
Administrator
Jr. Member
*****
Posts: 92



View Profile WWW
« Reply #4 on: October 31, 2008, 11:06:17 AM »

I am having problems running the script, after uncompressing the files it stops with an error:   ./gnu-arm-installer.sh: 115: patch: not found
I don't know what I am missing.



Please check patch command in your system. I guess you did not install patch in your computer.

Another, please make sure you have these following files in gnu-arm-installer/src/. If not, please it to gnu-arm-installersrc/ directory.

 * binutils-2.18.tar.bz2
 * gcc-4.2.2.tar.bz2
 * newlib-1.15.0.tar.gz
 * insight-6.8.tar.bz2

Good luck!
« Last Edit: October 31, 2008, 11:10:26 AM by Doug » Logged

Microcontroller Programming Blog
http://www.mcuprogramming.com/blog
Omar
Newbie
*
Posts: 3



View Profile Email
« Reply #5 on: October 31, 2008, 11:59:52 AM »

Thank you Doug, I have missed the patch in my Ubuntu system. Now it moved past that point but is still having some problems. The following is a cut and paste of the terminal screen:

config.status: creating po/Makefile.in
config.status: executing depfiles commands
config.status: executing libtool commands
config.status: executing default-1 commands
config.status: executing bfd_stdint.h commands
config.status: executing default commands
make[3]: Leaving directory `/home/omar/gnu-arm-installer/build/binutils-2.18/bfd/po'
make[3]: Entering directory `/home/omar/gnu-arm-installer/build/binutils-2.18/bfd/po'
make[3]: Nothing to be done for `info'.
make[3]: Leaving directory `/home/omar/gnu-arm-installer/build/binutils-2.18/bfd/po'
make[3]: Entering directory `/home/omar/gnu-arm-installer/build/binutils-2.18/bfd'
make[3]: Nothing to be done for `info-am'.
make[3]: Leaving directory `/home/omar/gnu-arm-installer/build/binutils-2.18/bfd'
make[2]: *** [info-recursive] Error 1
make[2]: Leaving directory `/home/omar/gnu-arm-installer/build/binutils-2.18/bfd'
make[1]: *** [all-bfd] Error 2
make[1]: Leaving directory `/home/omar/gnu-arm-installer/build/binutils-2.18'
make: *** [all] Error 2
Logged
Doug
Administrator
Jr. Member
*****
Posts: 92



View Profile WWW
« Reply #6 on: October 31, 2008, 12:28:06 PM »

That is not the exactly errors log. You need to provide full errors log.

By the way, I guess you are missing texinfo package. Please check about this.
If still problems, please feel free to post.  Grin
Logged

Microcontroller Programming Blog
http://www.mcuprogramming.com/blog
Omar
Newbie
*
Posts: 3



View Profile Email
« Reply #7 on: October 31, 2008, 12:59:13 PM »

Thanks again, that solved the issue. I will be posting a lot since as you may have already notice I am new to both Linux and ARM.
Logged
Doug
Administrator
Jr. Member
*****
Posts: 92



View Profile WWW
« Reply #8 on: October 31, 2008, 10:00:45 PM »

You're welcome, Omar.
Please come anytime if you get any troubles.   Wink
Logged

Microcontroller Programming Blog
http://www.mcuprogramming.com/blog
splitarm
Newbie
*
Posts: 4



View Profile
« Reply #9 on: November 08, 2008, 01:28:49 PM »

Hi,

Trying the script under Ubuntu 8.10 binutils fails compiling with following error:

Code:
libtool: compile:  gcc -DHAVE_CONFIG_H -I. -I/home/tobias/Desktop/gnu-arm-installer/src/binutils-2.18/bfd -I. -I. -I/home/tobias/Desktop/gnu-arm-installer/src/binutils-2.18/bfd -I/home/tobias/Desktop/gnu-arm-installer/src/binutils-2.18/bfd/../include -W -Wall -Wstrict-prototypes -Wmissing-prototypes -Werror -g -O2 -c /home/tobias/Desktop/gnu-arm-installer/src/binutils-2.18/bfd/elf32-arm.c -o elf32-arm.o
cc1: warnings being treated as errors
/home/tobias/Desktop/gnu-arm-installer/src/binutils-2.18/bfd/elf32-arm.c: In function 'find_thumb_glue':
/home/tobias/Desktop/gnu-arm-installer/src/binutils-2.18/bfd/elf32-arm.c:2524: error: ignoring return value of 'asprintf', declared with attribute warn_unused_result
/home/tobias/Desktop/gnu-arm-installer/src/binutils-2.18/bfd/elf32-arm.c: In function 'find_arm_glue':
/home/tobias/Desktop/gnu-arm-installer/src/binutils-2.18/bfd/elf32-arm.c:2557: error: ignoring return value of 'asprintf', declared with attribute warn_unused_result
make[4]: *** [elf32-arm.lo] Fehler 1
make[4]: Verlasse Verzeichnis '/home/tobias/Desktop/gnu-arm-installer/build/binutils-2.18/bfd'
make[3]: *** [all-recursive] Fehler 1
make[3]: Verlasse Verzeichnis '/home/tobias/Desktop/gnu-arm-installer/build/binutils-2.18/bfd'
make[2]: *** [all] Fehler 2
make[2]: Verlasse Verzeichnis '/home/tobias/Desktop/gnu-arm-installer/build/binutils-2.18/bfd'
make[1]: *** [all-bfd] Fehler 2
make[1]: Verlasse Verzeichnis '/home/tobias/Desktop/gnu-arm-installer/build/binutils-2.18'
make: *** [all] Fehler 2

Any idea how to fix this?
Logged
Doug
Administrator
Jr. Member
*****
Posts: 92



View Profile WWW
« Reply #10 on: November 08, 2008, 08:24:50 PM »

I've never try to compile on Ubuntu 8.10 but I presume no differences.
By the way, please check your packages in your system carefully i.e,  libgmp3-dev, libmpfr-dev, texinfo, patch.


Logged

Microcontroller Programming Blog
http://www.mcuprogramming.com/blog
splitarm
Newbie
*
Posts: 4



View Profile
« Reply #11 on: November 09, 2008, 04:03:25 PM »

I got it  Grin

The toolchain compiled successfully with latest sources from gnuarm.org:

http://gnuarm.org/binutils-2.19.tar.bz2
http://gnuarm.org/gcc-4.3.2.tar.bz2
http://gnuarm.org/newlib-1.16.0.tar.gz
http://gnuarm.org/insight-6.8.tar.bz2

I also had to set --disable-werror in the configure options because Intrepid got the gcc flag Wformat set to 2 to prevent format string attacks.

Logged
waipot
Moderator
Freshy
*****
Posts: 10



View Profile
« Reply #12 on: November 10, 2008, 12:04:46 AM »

Thanks Doug and Good job SplitArm!

I will test my script.

It will be great if we upgrade it to work with gcc 4.3.x toolchain.

If you guys have any progress please feel free to report here.
Logged
spye
Newbie
*
Posts: 4



View Profile
« Reply #13 on: November 11, 2008, 08:25:33 PM »

I get the following error regarding libmpfr.so.1:

make[8]: Entering directory `/home/steve/armelfgcc/gnu-arm-installer/build/newlib-1.16.0/arm-elf/thumb/newlib/libc/argz'
arm-elf-gcc -B/home/steve/armelfgcc/gnu-arm-installer/build/newlib-1.16.0/arm-elf/thumb/newlib/ -isystem /home/steve/armelfgcc/gnu-arm-installer/build/newlib-1.16.0/arm-elf/thumb/newlib/targ-include -isystem /home/steve/armelfgcc/gnu-arm-installer/src/newlib-1.16.0/newlib/libc/include -B/home/steve/armelfgcc/gnu-arm-installer/build/newlib-1.16.0/arm-elf/thumb/libgloss/arm -L/home/steve/armelfgcc/gnu-arm-installer/build/newlib-1.16.0/arm-elf/thumb/libgloss/libnosys -L/home/steve/armelfgcc/gnu-arm-installer/src/newlib-1.16.0/libgloss/arm  -mthumb -DPACKAGE_NAME=\"newlib\" -DPACKAGE_TARNAME=\"newlib\" -DPACKAGE_VERSION=\"1.16.0\" -DPACKAGE_STRING=\"newlib\ 1.16.0\" -DPACKAGE_BUGREPORT=\"\" -I. -I/home/steve/armelfgcc/gnu-arm-installer/src/newlib-1.16.0/newlib/libc/argz -O2 -DARM_RDI_MONITOR -fno-builtin      -O2 -g -g -O2    -mthumb -c -o lib_a-dummy.o `test -f 'dummy.c' || echo '/home/steve/armelfgcc/gnu-arm-installer/src/newlib-1.16.0/newlib/libc/argz/'`dummy.c
/home/steve/armelfgcc/gnu-arm-installer/install/libexec/gcc/arm-elf/4.3.2/cc1: error while loading shared libraries: libmpfr.so.1: cannot open shared object file: No such file or directory
make[8]: *** [lib_a-dummy.o] Error 1
make[8]: Leaving directory `/home/steve/armelfgcc/gnu-arm-installer/build/newlib-

but /usr/local/lib has this file:

steve@steve-laptop:/usr/local/lib$ ls -al
total 4640
drwxr-xr-x  3 root root     4096 2008-11-11 19:31 .
drwxr-xr-x 13 root root     4096 2008-11-11 19:25 ..
-rw-r--r--  1 root root   798460 2008-11-11 19:25 libgmp.a
-rwxr-xr-x  1 root root      785 2008-11-11 19:25 libgmp.la
lrwxrwxrwx  1 root root       15 2008-11-11 19:25 libgmp.so -> libgmp.so.3.4.4
lrwxrwxrwx  1 root root       15 2008-11-11 19:25 libgmp.so.3 -> libgmp.so.3.4.4
-rwxr-xr-x  1 root root   312254 2008-11-11 19:25 libgmp.so.3.4.4
-rw-r--r--  1 root root  2486188 2008-11-11 19:31 libmpfr.a
-rwxr-xr-x  1 root root      798 2008-11-11 19:31 libmpfr.la
lrwxrwxrwx  1 root root       16 2008-11-11 19:31 libmpfr.so -> libmpfr.so.1.1.2
lrwxrwxrwx  1 root root       16 2008-11-11 19:31 libmpfr.so.1 -> libmpfr.so.1.1.2
-rwxr-xr-x  1 root root  1113986 2008-11-11 19:31 libmpfr.so.1.1.2
drwxrwsr-x  3 root staff    4096 2008-10-17 11:04 python2.5


Any idea what I need to do?

Thanks,
Steve.



Logged
waipot
Moderator
Freshy
*****
Posts: 10



View Profile
« Reply #14 on: November 12, 2008, 02:03:47 AM »

Hi Steve,

I think that the compiler can't find the library in /usr/local/lib path.
Please try to do something like this

Code:
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib

Good luck

Logged
A Microcontroller Discussion Board
   

 Logged
Pages: [1] 2 3
  Print  
 
Jump to:  

Related Topics
Subject Started by Replies Views Last post
GNU ARM toolchain for Cygwin, Linux and MacOS Software/Tools Doug 0 1555 Last post November 01, 2007, 08:05:08 PM
by Doug
Powered by MySQL Powered by PHP Powered by SMF 1.1.11 | SMF © 2006-2009, Simple Machines LLC | Sitemap Valid XHTML 1.0! Valid CSS!