Setup Guide for Development Environment on macOS (Apple Silicon + Intel) for GCC

Table of Contents

Install Basic Tools and Dependencies

First, install Homebrew if it’s not already installed.

/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"

Then install essential tools:

brew update
brew install git wget make zip unzip python

Install CMake

Download CMake 4.1.2 for macOS.

curl -LO https://github.com/Kitware/CMake/releases/download/v4.1.2/cmake-4.1.2-macos-universal.tar.gz

Extract the archive:

tar -xzf cmake-4.1.2-macos-universal.tar.gz

Move CMake to a system directory:

sudo mv cmake-4.1.2-macos-universal /opt/cmake-4.1

Add CMake to PATH:

echo 'export PATH="/opt/cmake-4.1/CMake.app/Contents/bin:$PATH"' >> ~/.zshrc
source ~/.zshrc

Verify installation:

cmake --version

Install Ninja Build System

Ninja is a small build system with a focus on speed, which CMake can utilize to manage builds.

Download Ninja v1.13.1 for macOS:

curl -LO https://github.com/ninja-build/ninja/releases/download/v1.13.1/ninja-mac.zip

Unzip the archive:

unzip ninja-mac.zip

Create the target directory and copy the binary:

sudo mkdir -p /opt/ninja/
sudo cp ninja /opt/ninja/

Make the binary executable:

sudo chmod a+x /opt/ninja/*

Add to PATH:

echo 'export PATH=$PATH:/opt/ninja' >> ~/.zshrc
source ~/.zshrc

Verify installation:

ninja --version

Install Python

Python 3.13.x or newer is required to run configuration tools (menuconfig, kconfig) and to execute scripts used during SDK build and setup.

Choose one of the options below:

Option A: System Python (if already 3.13.x+)

python3 --version

Install OpenOCD

brew install openocd
openocd --version

Install the Arm GNU GCC Compiler

Check your architecture:

uname -m

Download Arm GNU Toolchain 13.2.rel1 for macOS:

# Apple Silicon (arm64)
curl -Lo gcc-arm-none-eabi.tar.xz https://developer.arm.com/-/media/Files/downloads/gnu/13.2.rel1/binrel/arm-gnu-toolchain-13.2.rel1-darwin-arm64-arm-none-eabi.tar.xz

# Intel (x86_64)
curl -Lo gcc-arm-none-eabi.tar.xz https://developer.arm.com/-/media/Files/downloads/gnu/13.2.rel1/binrel/arm-gnu-toolchain-13.2.rel1-darwin-x86_64-arm-none-eabi.tar.xz

Create a target directory for installation:

sudo mkdir -p /opt/gcc-arm-none-eabi

Extract the archive into the target directory:

sudo tar -xf gcc-arm-none-eabi.tar.xz --strip-components=1 -C /opt/gcc-arm-none-eabi

Environment variables for the Arm GNU Toolchain:

echo 'export PATH=$PATH:/opt/gcc-arm-none-eabi/bin' >> ~/.zshrc
echo 'export GCC_TOOLCHAIN_13_2_1=/opt/gcc-arm-none-eabi/bin' >> ~/.zshrc
source ~/.zshrc