Last active
March 17, 2019 08:48
-
-
Save ivand58/07135f7100e13a2a81e4cbd4ab0a00f5 to your computer and use it in GitHub Desktop.
BMP on blue pill
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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