Hardware Reference
In-Depth Information
processors today, but some commercial compilers still perform better at certain tasks.
What GCC offers that no commercial toolchains can, though, is the assurance that you
will always be able to rebuild your firmware using the same compiler version and de‐
pendencies. If commercial toolchains that require activation (and thus activation
servers) aren't kept up to date, they might not be able to guarantee that they'll run on
the current generation of operating systems or PCs.
If you're new to embedded development, it's easy to overlook this detail. Embedded
devices can have lifespans of 10 or 20 years or more, far beyond the lifespan of most
software packages. Commercial tools and development environments you use today
might not exist in 10 years, and the vendor might not be around in the future to activate
that long-retired product you invested heavily in years ago. GCC offers you the assur‐
ance that you'll never face this problem, since you can archive the full source of your
cross-compiler, including any library dependencies, along with your firmware code and
know you can rebuild it all at any point in the future.
Setting up a GNU toolchain on a non-Linux PC used to be a reasonably involved task,
but ARM has made now made it trivial by providing precompiled, regularly updated
versions of GCC for Windows, OS X, and Linux, including easy-to-use installers that
take care of many of the messy details.
The first step in setting up a development environment for ARM is to download the
latest prebuilt GNU toolchain . As shown in Figure 10-1 , you can download convenient
installers for OS X, Windows, and Linux, as well as the raw source code and a guide on
building the toolchain yourself on other platforms.
The latest version available on the website might vary, but you should generally choose
the most recent package. ARM provides quarterly updates, often incorporating im‐
provements into the compiler and associated libraries, yielding smaller or more efficient
compiled code.
Installing GNU Tools on OS X and Linux
If you're using OS X or Linux, you simply need to download the appropriate installer
and run it. Any other development tools ( make , various commands used in the makefile,
etc.) are likely already available on your development machine or are easy to add (using
Xcode on OS X and your package manager on Linux).
You can use the following command to confirm whether the GCC cross-compiler was
successfully installed:
arm-none-eabi-gcc --version
Search WWH ::




Custom Search