Building ARM Toolchain

From Open-BLDC
Jump to: navigation, search

Originally this was a complete walkthrough the compilation and installation process of the ARM Toolchain. Now there is a script called Summon ARM Toolchain that does everything automatically. Apart from the standard development tools linux users should install the following extra packages: libgmp3-dev and libmpfr-dev

For Debian/Ubuntu:

> apt-get install libgmp3-dev libmpfr-dev

Or use build-dep to automatically grab everything needed to compile gcc:

> apt-get build-dep gcc-4.4

or on Maverick:

> apt-get build-dep gcc-4.5

For Cygwin on Windows you need the following packages:

  • automake
  • autoconf
  • make
  • git
  • wget
  • termcap
  • libmpc-devel
  • libmpfr-devel
  • libgmp-devel
  • libncurses-devel
  • libtool
  • patch

Also binutils 2.19.1 needs a patch as described here: The current version of summon-arm-toolchain uses a newer binutils version that doesn't require the patch.

Now you only have to:

> wget

And run the script:

> ./summon-arm-toolchain

This will download all necessary sources and build all the toolchain parts.

After that you should have a complete smooth ARM toolchain that should work with STM32 and LPC21.

This script should work on Linux and Mac OS X and is partly tested on CygWin on Windows 7 (additional patches welcome).

Have fun.