Skip to content

Instantly share code, notes, and snippets.

@patrickgill
Last active January 8, 2021 16:55
Show Gist options
  • Save patrickgill/eeed7a1d7d4966ab239bba430eb17835 to your computer and use it in GitHub Desktop.
Save patrickgill/eeed7a1d7d4966ab239bba430eb17835 to your computer and use it in GitHub Desktop.
brew install gcc curl dfu-util gdb-multiarch git python python-pip
# install gcc-arm-none-eabi from
https://developer.arm.com/tools-and-software/open-source-software/developer-tools/gnu-toolchain/gnu-rm/downloads
mkdir -p /usr/local && cd /usr/local
tar xjf gcc-arm-none-eabi-8-2019-q3-update-mac.tar.bz2
PATH=$PATH:/usr/local/gcc-arm-none-eabi-8-2019-q3-update/bin
git clone https://github.com/jsnyder/stm32loader
pip install pyserial
git clone https://github.com/blacksphere/blackmagic
cd blackmagic
git submodule update --init --recursive
# make blackmagic binaries
make PROBE_HOST=swlink
# find USB UART device TTY
# looks like /dev/tty.usbserial-A50285BI
# flash firmware over DFU
sudo ../stm32loader/stm32loader.py -p /dev/tty.usbserial-A50285BI -e -w -v src/blackmagic_dfu.bin
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment