This documentation describes the steps needed to configure a local development toolchain on various system platforms (Linux, macOS, etc).
The build-related tools are acquired through the following packages:
$ sudo pacman -S base-devel arm-none-eabi-binutils arm-none-eabi-gcc arm-none-eabi-gdb arm-none-eabi-newlib stlink python openocd
srecord must be installed through the AUR
(Arch User Repository). Either use an AUR helper like paru or yay or
built it manually.
$ paru -S srecord
$ yay -S srecord
The packages needed for Debian are as follow:
sudo apt install -y \
autoconf \
automake \
gcc-arm-none-eabi \
gdb-multiarch \
git \
libcapstone4 \
libftdi1-2 \
libgpiod2 \
libhidapi-hidraw0 \
libtool \
libusb-1.0-0 \
libusb-1.0-0-dev \
make \
openocd \
pkg-config \
srecord \
stlink-tools \
tcl \
xxdThese instructions assume the use of the Homebrew package manager.
-
Install Python and pip (if they aren't already installed).
There are several ways to do this. To ensure you're using the latest (or a specific) Python version, consider using a Python version manager. The following instructions describe how to use pyenv.
brew install pyenv
Now, install latest python (replace
<version>, e.g.3.13.3):pyenv install <version> pyenv global <version>
-
Using Homebrew, add the required "taps" (package repositories).
brew tap RetroReversing/gdb-multiarch brew install --cask gcc-arm-embedded
-
Now, use Homebrew to install the required system tools and dependencies.
brew install \ arm-none-eabi-newlib \ gdb-multiarch \ make \ openocd \ srecord \ stlink -
Add
arm-none-eabito your PATH.export PATH="/Applications/ArmGNUToolchain/14.2.rel1/arm-none-eabi/bin:$PATH"
If you want to persist this change in future terminal sessions, add it to whichever
.rcfile you are using. Since macOS uses zsh by default, here's how it's done:echo 'export PATH="/Applications/ArmGNUToolchain/14.2.rel1/arm-none-eabi/bin:$PATH"' >> ~/.zshrc source ~/.zshrc
Your toolchain is now configured.