install gnu toolchain for Cortex-M3

Hi There,

I'm trying to get a gnu toolchain for ARM Cortex-M3 established, so far unsuccesful. I got instructions from

formatting link
[on the bottom] - I setup cygwin and installed all the required things - so I thought... However, at step 3 building the compiler I get: cd /usr/src/binutils-2.22.51-1 && autogen Makefile.def /usr/bin/sh: autogen: command not found make: *** [/usr/src/binutils-2.22.51-1/Makefile.in] Error 127

this after configuring with these options: $ /usr/src/binutils-2.22.51-1/configure --target=arm-elf --prefix=/ cygdrive/c/mingw/bin/ --enable-interwork --enable-multilib

So I thought I should install autogen, okay, downloaded sources with cvs but the configure script here tells me it couldn't find a working version of libguile (which I have installed in cygwin) - okay, I downloaded the sources of libguile as well and wanted to build them myself but I don't know how...

has anyone built a gnu toolchain before and can help me how to get this accomplished in cygwin - if that's possible at all? Or should I better get a virtual Linux system up and running? Thanks for hints, tips or suggestions! roN

Reply to
cerr
Loading thread data ...

I'd recommend against building gcc under cygwin. It's certainly possible, but it can be a lot of work and the cause of much frustration if you are not experienced in such builds. And the final binary will be quite a bit slower than one built with mingw.

Building gcc is usually easier on Linux. But unless you have particular reason to want to build it, why not be lazy and use pre-built toolchains? You can get them for Windows or Linux from various sources

- either commercial (but with free or cheap versions) from CodeSourcery, Code Red, or various others, or non-commercial from or amongst others.

Of course, if you /want/ to build it yourself (it's fun, and you can get the latest versions, including development versions), then it's certainly possible. But try to find instructions for using mingw and msys - the resulting binaries will be much more efficient, and feel more "native" to windows.

Reply to
David Brown

Cygwin?/Windows? Ouch. This is situation where it pays to run Linux. Under Debian I can use the emdebian pre-compiled cross development tools

After setting up /etc/apt/sources.list, it becomes no more complicated than

apt-get update

apt-get install gcc-4.4-arm-linux apt-get install gdb-arm-linux-gnueabi

Reply to
igbo.embedded

That page is _old_.

Google "summon-arm-toolchain", and look until you find the GIT link. Then get the latest, read the comments, and see what you can see.

Certainly on a linux box it's just the bee's knees.

--
Tim Wescott
Control system and signal processing consulting
 Click to see the full signature
Reply to
Tim Wescott

Ok, linux is better then sex. [1]

Can someone please answer the question ???

don

[1] Linux is user friendly, its just particular about who its friends are.[2]

Linux is user friendly, Linux users are particular about who their friends are.

Reply to
hamilton

I think you are making your life unnecessarily hard. Use a native Windows GCC build like Yagarto.de, or the free "lite" version of the CodeSourcery tools (now Mentor Embedded).

Regards, Richard.

  • formatting link
    Designed for Microcontrollers. More than 7000 downloads per month.
Reply to
FreeRTOS info

You might be able to do that from Cygwin, or at least get all the source that way.

--
My liberal friends think I'm a conservative kook.
My conservative friends think I'm a liberal kook.
 Click to see the full signature
Reply to
Tim Wescott

Not sure if this answers the question, but doesn't cygwin have binaries for autogen and most of the gnu packages in the distribution ?. Just run install again and select from the list to update. Unless you really want to build from source for the experience, it just makes more work.

This doesn't guarantee success though. Spent quite a bit of time this year experimenting with cross cortex toolchain builds to run on linux / solaris and found loads of issues. Almost like a series of hurdles to overcome :-). To start, the build process does seem to assume quite a bit of the gnu infrastructure in place. For 4.6.1, for example, there are non gnu math libraries which must be installed first and be at the required rev level, otherwise gcc won't build at all. For solaris, they had to be built from source and include stuff like the -m32 gcc switch, otherwise you get 64 bit by default and elf format error messages half way through the gcc build. None of this is difficult, but can be very time consuming if you are starting from scratch.

Initially starting on a solaris 10 sparc host, eventually gave up, backtracked to linux to get a process together for a clean build, then applied that back to the solaris build. Of the linuxen tried, suse 11 was the most sorted in terms of in place packages and their rev levels and was able to get a clean build there with not too much effort. The binutils package seems to build anywhere without issues, but gcc and newlib are much more fussy.

I was fortunate enough to have quite a bit of free time available this year, but if you are in a hurry, a prebuilt toolchain might be a better plan...

Regards,

Chris

Regards,

Chris

so straightforward at all...

Reply to
ChrisQ

Checking notes: list of gnu and other packages installed to support toolchain builds:

autoconf, automake, binutils, bison, bzip2, flex, gcc, texinfo, gmp, libgcc, libiconv, m4, make, gmp, mpfr, perl, ppl

Not all these may be required, but make, flex, bison, texinfo, m4 definately are and the gmp, mpfr and ppl libraries are required for later gcc revsions. The catch being, of course, that later Cortex such as m0 are only supported by later gcc versions :-).

Another point is that gcc tarballs may incorrectly unpack with anything other than latest gnu tar, so you need to add that to the above list. No messages from tar, but gcc build fails with cryptic error messages...

Regards,

Chris

Reply to
ChrisQ

Last time I tried this I also was unable to get Guile to build under Windows. Decided life is too short and got the excellent CodeRed version, which was excellent.

If you really must build a Windows version you may have better luck with building it under Linux (gets a bit confusing, careful with definitions of the 3 platforms involved in this exercise)...

Hope that helps, Best Regards, Dave

Reply to
Dave Nadler

The GMP, MPFR and MPC libraries can be automatically built by the GCC build process, just unpack the sources into subfolders inside the GCC source tree. has the details.

-a

Reply to
Anders.Montonen

process,

That's true, but then you don't have the opportunity of doing the make tests for the libraries, which is the only way to ensure that the build is correct...

Regards,

Chris

Reply to
ChrisQ

Thank you all very much for the valuable information! I don't "just" wanna give up but will have to see how much time I get to invest for this these days. I think i'll probably need to spit out some eval-findings report in the first week of January... I'll dig a bit further and if that won't do it, i'll swtich to a pre built tool chain from Code Sourcery e.g. Again, Thanks very much for the assistance! It's much appreciated!

Thanks, Ron

Reply to
cerr

Typo above, excellent tool was CodeSourcery. I'm using CodeRed now on a different project, also great. Good luck, Best Regards, Dave

Reply to
Dave Nadler

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.