- Edited
Here are the steps to fix this:
First uninstall
gcc-arm-embedded
frombrew
brew uninstall gcc-arm-embedded
Install the toolchain by pulling it from ARM. Run these commands:
cd ~ wget "https://developer.arm.com/-/media/Files/downloads/gnu-rm/9-2019q4/gcc-arm-none-eabi-9-2019-q4-major-mac.tar.bz2" tar xvfj gcc-arm-none-eabi-9-2019-q4-major-mac.tar.bz2 rm gcc-arm-none-eabi-9-2019-q4-major-mac.tar.bz2
Note for Catalina users you will get an error when running these utilities for the first time. You must allow them to be executed in your Security preferences.
Finally you'll need export a few important environment variables for things to work. For
bash
here's the entry for.bash_profile
that I have:# Zephyr related export ZEPHYR_TOOLCHAIN_VARIANT=gnuarmemb export GNUARMEMB_TOOLCHAIN_PATH="~/gcc-arm-none-eabi-9-2019-q4-major"
Note: this should also work for
.zshrc
for those folks who are using newer versions of Mac OS (or just plain preferzsh
)For folks using
fish
you're going to use:set -Ux ZEPHYR_TOOLCHAIN_VARIANT gnuarmemb set -Ux GNUARMEMB_TOOLCHAIN_PATH "~/gcc-arm-none-eabi-9-2019-q4-major"
Close and reopen all terminals and Visual Studio Code.
Try compiling again!