Valid as of March 27th 2022
Install the latest openocd version (the official version produces a segmentation fault)
brew install openocd --head
and append set CPUTAPID 0
to /opt/homebrew/share/openocd/scripts/board/stm32f103c8_blue_pill.cfg
.
Run OpenOCD server
openocd -f interface/stlink.cfg -f board/stm32f103c8_blue_pill.cfg
Install the cross-compilation toolchan:
brew install gcc-arm-embedded
Install rustup (the homebrew version is from 2021)
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
and add cross-compilation target
rustup target add thumbv7m-none-eabi