Create a gist now

Instantly share code, notes, and snippets.

How I installed GCC ARM on my Mac 10.9 Mac Book Pro
# Download the file manually from here https://launchpad.net/gcc-arm-embedded
# Note: `curl` command doesn't work
# I downloaded this one: "gcc-arm-none-eabi-4_7-2013q3-20130916-mac.tar.bz2"
# double click it to unzip it
# Make a place to install it to
mkdir /usr/local/gcc_arm
# Move the unzipped stuff there.
mv ~/Downloads/gcc-arm-none-eabi-4_7-2013q3 /usr/local/gcc_arm/
# Check out all the purdy binaries, you'll need to build firmware.
ls /usr/local/gcc_arm/gcc-arm-none-eabi-4_7-2013q3/bin/
# arm-none-eabi-addr2line arm-none-eabi-gcc-4.7.4 arm-none-eabi-ld.bfd
# ...
# arm-none-eabi-gcc ...
# Peep your current PATH
echo $PATH
# /usr/local/heroku/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:<BLA BLA BLA>
# Change your PATH by appending the "bin" folder of the folder
# NOTE: You should also add this line to ~/.bashrc or ~/.bash_profile (in your home directory)
# so you don't have to remember to do this every time you want to compile firmware.
export PATH="$PATH:/usr/local/gcc_arm/gcc-arm-none-eabi-4_7-2013q3/bin/"
# Check to ensure the gcc-arm firmware compiler is available (so `make clean dependents all` will work.)
arm-none-eabi-gcc --version
# arm-none-eabi-gcc (GNU Tools for ARM Embedded Processors) 4.7.4 20130913 (release) [ARM/embedded-4_7-branch revision 202601]
@blakejakopovic

Avoid using The Unarchiver.app mac app to extract the tar.bz2 archive. It messes up the symlinks, and things wont work. Instead, use the Archive Utility.app built into OS X (by right clicking the archive and selecting from open with). (Tested using OS X 10.9.3, The Unarchiver 3.9.1)

@ericboehs

I went a bit crazy with the script. Uploaded the bzip2 to S3 for speed (launchpad was very slow), made it idempotent, and made it installable via a one liner:

bash <(curl -fsSL https://gist.github.com/ericboehs/0cea8c5778aff405c445/raw/install_gcc_arm.sh)

Next step, homebrew formula.

@ericboehs

All that work and there's already a homebrew formula. Should have googled harder:

brew tap PX4/homebrew-px4
brew update
brew install gcc-arm-none-eabi
@machadolab

Well, thanks for the efforts and pointing out there is already a formula! Saved me some time. :)

@shoaibuddin

@ericboehs Awesome! Save so much time...

@peterschwarz

Unfortunately, the homebrew formula doesn't seem to correctly setup the includes necessary to build the core-firmware.

@AndoniV
AndoniV commented Jul 28, 2014

Thanks!

@metcalf
metcalf commented Aug 12, 2014

The latest firmware requires GCC 4.8:

brew install gcc-arm-none-eabi-48

(this fixes the "stdatomic.h: No such file or directory" error.)

@ericboehs

The latest firmware requires GCC 4.8

This took me far too long to find the solution. So for some Google juice, this solves these errors:

../CC3000_Host_Driver/evnt_handler.c:61:23: fatal error: stdatomic.h: No such file or directory

...

obj/startup/startup_stm32f10x_md.o: In function `LoopFillZerobss':
core-firmware/build/../startup/startup_stm32f10x_md.S:98: undefined reference to `SystemInit'

...

obj/src/wifi_credentials_reader.o: In function `WiFiCredentialsReader::print(char const*)':
core-firmware/build/../src/wifi_credentials_reader.cpp:106: undefined reference to `Delay'

You'll also want to uninstall the older version first:

brew uninstall gcc-arm-none-eabi
brew install gcc-arm-none-eabi-48

And throw in a make clean all for good luck. And make sure you have the latest, unmodified versions of the 3 git repos.

@technobly

I tried the homebrew route on a fresh machine... worked perfectly! Thanks all!

Step 1 - Install Homebrew
http://brew.sh/

Step 2 - Install GCC Arm Toolchain

brew tap PX4/homebrew-px4
brew update
brew install gcc-arm-none-eabi-48

Step 3 - Profit!

@noob1211
noob1211 commented Jun 9, 2015

48 no longer works try 49

@m-mcgowan
brew install gcc-arm-none-eabi-48

no longer works- formula not found. but

brew install gcc-arm-none-eabi

Installs 4_8-2014q3-20140805

@adeeshag

brew install gcc-arm-none-eabi-49 works now. 48 doesn't work anymore

@jeremyheiler
brew cask install gcc-arm-embedded
@Anderson69s

Hi, how are you?

Is it still working on OSX 10.11?

@denzelwamburu

@Anderson69s Yeah, it is.

@simonwo
simonwo commented Feb 26, 2017

@jeremyhelier This is what I needed, thanks!

@tehong
tehong commented Mar 16, 2017 edited

@jeremyhelier Thanks. You're solution is the simplest.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment