Skip to content

Instantly share code, notes, and snippets.

@ivand58
Last active March 17, 2019 08:48
Show Gist options
  • Save ivand58/07135f7100e13a2a81e4cbd4ab0a00f5 to your computer and use it in GitHub Desktop.
Save ivand58/07135f7100e13a2a81e4cbd4ab0a00f5 to your computer and use it in GitHub Desktop.
BMP on blue pill
# get submodules by cmake
make
# go to the code
cd src
# if needed - reduce the supported targets
# - search for PROBE
vim target/cortexm.c
# fix the voltage:
vim platforms/stlink/platform.c
# build
make clean && make PROBE_HOST=stlink
# upload
sudo dfu-util -a 0 -s 0x08002000:leave:force -D blackmagic.bin
# test it
arm-none-eabi-gdb -b 115200 -ex 'target extended-remote /dev/ttyACM0' -ex 'set confirm off' -ex 'monitor swdp_scan' -ex 'attach 1' -ex 'set mem inaccessible-by-default off'
# notes:
# - the DFU code starts from 8000000 and the MBP from 8002000 (in case of manual uploading)
# - NOT CONFIRMED !!! the hw-version (int ver) is zero for blue pill
# - PA14 (SWCLK) ---
# - PA15 if ver>... reconnects the USB
# - PA8/9 LED_idle_run
# - PC14 is LED_UART
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment