Skip to content

1b. Installing the Toolchain on Mac

Andrew Ikenberry edited this page Apr 21, 2021 · 23 revisions

Steps

1. Download the DaisyToolchain

2. Install

3. Common Errors

Download the DaisyToolchain

  1. Go to the DaisyToolchain download page and download Source code (zip).
  2. Move the downloaded zip to a safe location, we recommend somewhere like the Documents or Developer folders.
  3. Right click on the zip, and click Open With > Archive Utility.

This will extract the toolchain.

Install

  1. Open the Daisy Toolchain folder
  2. Open the macOS folder inside
  3. Right click or control+click on install.command, then choose Open
  4. Click Open in the security window
  5. As the installer runs you'll occasionally need to enter your password

The installer will install the homebrew package manager if it is not installed,
and use it to install the following tools:

  • dfu-util
  • openocd
  • arm-none-eabi toolchain

The make tool is also necessary, but the operating system should prompt you to install it upon its invocation unless it is already installed.

Common Errors

xcrun: error: invalid active developer path (/Library/Developer/CommandLineTools), missing xcrun at: /Library/Developer/CommandLineTools/usr/bin/xcrun

If/when you get this error, you should be able to resolve it by running: xcode-select --install

This does not install Xcode, nor is Xcode necessary for any Daisy tools.

Manual Installation

It is possible to replicate the steps of the Toolchain install manually.

The install script runs the following:

# install brew if it is not already installed.
if ! command -v brew &> /dev/null
then
    echo "Installing Homebrew: Follow onscreen instructions"
    /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
fi

#upgrade homebrew
echo "Upgrading Homebrew"
brew update

echo "Installing packages with Homebrew"
brew install openocd dfu-util gcc-arm-embedded

# clear macOS quarantine for downloaded tool (necessary on Mojave and newer)
find /usr/local/Caskroom/gcc-arm-embedded -type f -perm +111 -print | xargs spctl --add --label "gcc-arm-embedded"
find /usr/local/Caskroom/gcc-arm-embedded | xargs xattr -d com.apple.quarantine