-
Notifications
You must be signed in to change notification settings - Fork 6
STM32 Toolchain
STM32CubeIDE is available on most platforms here. (VS Code is preferable!).
Install Homebrew (if not already installed):
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
Install stlink
(ST command line tools) and (optionally) open-ocd
(open on-chip debugger) via Homebrew:
brew update
brew install stlink
brew install open-ocd
Install the arm-none-eabi
toolchain (embedded ARM compiler + tools), available here. By default it installs to /Applications/ARM/bin
, add this to your path in ~/.zshrc
or ~/.bashrc
:
export PATH="/Applications/ARM/bin:$PATH"
Download the installer for the STM32CubeMX MCU configuration editor, available here. Run the installer, which will probably immediately crash. To fix this run the following command to clear all file attributes -c
for every file in the app package recursively -r
(replacing <version>
with the latest version of the app):
sudo xattr -cr ~/Downloads/en.stm32cubemx-mac_v<version>/SetupSTM32CubeMX-<version>.app/
STM32CubeMX.app
, code generation will not work. Instead, launch the executable directly from the command line:
/Applications/STMicroelectronics/STM32CubeMX.app/Contents/MacOs/STM32CubeMX
To save time, add it as an alias or to your path:
alias cubemx="/Applications/STMicroelectronics/STM32CubeMX.app/Contents/MacOs/STM32CubeMX"
Install with your package manager:
make
arm-none-eabi-gcc
arm-none-eabi-binutils
Install also:
Optional:
openocd