Skip to content

Instantly share code, notes, and snippets.

@joegoggins
Last active December 12, 2022 06:59
Show Gist options
  • Star 67 You must be signed in to star a gist
  • Fork 8 You must be signed in to fork a gist
  • Save joegoggins/7763637 to your computer and use it in GitHub Desktop.
Save joegoggins/7763637 to your computer and use it in GitHub Desktop.
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]
@tabchas
Copy link

tabchas commented Jan 11, 2019

brew cask install caskroom/cask/gcc-arm-embedded does not work anymore for me. It says:

Cask 'gcc-arm-embedded' is unavailable: '/usr/local/Homebrew/Library/Taps/homebrew/homebrew-cask/Casks/gcc-arm-embedded.rb' does not exist.

@markruys
Copy link

It has been removed: Delete gcc-arm-embedded.rb #56802. Alternatieve:

$ brew tap PX4/px4
...
$ brew search px4
==> Formulae
px4/px4/fastcdr                    px4/px4/gcc-arm-none-eabi          px4/px4/gcc-arm-none-eabi-49       px4/px4/gcc-arm-none-eabi-63       px4/px4/kconfig-frontends
px4/px4/fastrtps                   px4/px4/gcc-arm-none-eabi-47       px4/px4/gcc-arm-none-eabi-54       px4/px4/gcc-arm-none-eabi-74       px4/px4/px4-dev
px4/px4/fastrtps15                 px4/px4/gcc-arm-none-eabi-48       px4/px4/gcc-arm-none-eabi-62       px4/px4/genromfs                   px4/px4/px4-sim

@gsixx8
Copy link

gsixx8 commented May 21, 2019

Hello @Markrus. I am wanting to make a custom version of the inav firmware based on the latest MATEKF405SERVOS6 build. This link is where I found out that what I want done to the firmware (set up motor pads for servo signal) can actually be done: iNavFlight/inav#3140

I am on a Mac and have begun following the steps listed in this link: https://github.com/iNavFlight/inav/blob/master/docs/development/Building%20in%20Mac%20OS%20X.md

I am at the place where I should install the GCC. This is where I don't understand how to proceed. I have not done any coding in forever and I'm unsure how to enter the commands correctly. I have created a folder in my User folder called "Development". The latest GCC tarball is there and I unpacked it into the same folder by double clicking it. I now have a folder entitled "gcc-arm-none-eabi-8-2018-q4-major" inside the "Development" folder along with the original tarball. My User folder is called "gerelmcintosh". The path to the GCC tarball and GCC folder is gerelmcintosh/Development. How would l word the command in the Nano program running in my Terminal to get the GCC "installed"?

@tecknut
Copy link

tecknut commented Oct 22, 2019

Thanks @markruys, I ran brew install px4/px4/gcc-arm-none-eabi which worked just fine for me.

@beadon1
Copy link

beadon1 commented Jan 26, 2020

There are a number of solutions in this thread, but the official download from brew and ARM with :
brew cask install gcc-arm-embedded

is by far the simplest and easiest.

@curtisembedded
Copy link

The correct command to install gcc-arm-embedded is: brew install homebrew/cask/gcc-arm-embedded

The install works great. However when it is done the compile is unusable due to MacOS security. Is there a way to bypass the new security in Catalina?

@vizzon
Copy link

vizzon commented Apr 2, 2020

@curtisembedded open Security & Privacy, in the general tab allow gcc-arm-none-eabi to run

@creativeJoe007
Copy link

brew cask install gcc-arm-embedded

This works even in 2020. Nice one.

@yokeshrana
Copy link

brew cask install gcc-arm-embedded
Works Fine in MacBook Pro 2020

@arturojain
Copy link

brew install --cask gcc-arm-embedded

Had to use this one since I got the error Calling brew cask install is disabled!

@timmyjose
Copy link

Is this 32-bit only?

@subvertallchris
Copy link

+1 to brew cask install gcc-arm-embedded. Thank you!

@CIPop
Copy link

CIPop commented Aug 4, 2021

Works as expected on Mac M1 (cask installed from a Rosetta brew - i.e. arch was i386 to ensure placing in /usr/local/bin and not in /opt/homebrew/bin).

@tabiuma
Copy link

tabiuma commented Feb 9, 2022

brew cask no more works after 2022.
Instead, use brew install gcc-arm-embedded --cask to install.
Thanks @jeremyheiler anyway.

@CrazyAndy
Copy link

thank you

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