Difference between revisions of "Black Magic Probe"
Jump to navigation
Jump to search
(Created page with "Category:STM32Category:STM32 HardwareCategory:Black Magic Probe{{metadesc|Black Magic Probe}} == Miscellaneous Links == * [https://1bitsquared.com/products/blac...") |
|||
(12 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
[[Category:STM32]][[Category:STM32 Hardware]][[Category:Black Magic Probe]]{{metadesc|Black Magic Probe}} | [[Category:STM32]][[Category:STM32 Hardware]][[Category:Black Magic Probe]]{{metadesc|Black Magic Probe}} | ||
+ | [[File:Black Magic Probe V2.1.webp|300px|thumb]] | ||
+ | Usually when flashing and debugging software on [[STM32]] one would use a [[ST-Link]] device (either original or a cheap Chinese clone). For some completely incomprehensible reason, [[ST]] are not making the source code for the [[ST-Link]] readily available. Not only do they not provide source code, but it would appear they are actively trying to prevent clones from working. | ||
+ | |||
+ | Fortunately there are open source solutions available, the most prominent of these being the [[Black Magic Probe]] from [https://1bitsquared.com/ 1BitSquared]. | ||
+ | == Platforms == | ||
+ | |||
+ | The Black Magic Probe firmware can be build for many different platforms with different pinout. The following sections list the pinout. | ||
+ | |||
+ | === [[Blue Pill]] === | ||
+ | |||
+ | ==== Build ==== | ||
+ | |||
+ | <pre> | ||
+ | $ make PLATFORM=bluepill | ||
+ | </pre> | ||
+ | |||
+ | ==== Pinout ==== | ||
+ | |||
+ | {| | ||
+ | |} | ||
+ | |||
+ | === [[ST-Link]] Clone === | ||
+ | |||
+ | ==== Build ==== | ||
+ | |||
+ | <pre> | ||
+ | make PROBE_HOST=stlink ST_BOOTLOADER=0 ENABLE_DEBUG=1 | ||
+ | </pre> | ||
+ | |||
+ | === [[Black Pill]] === | ||
+ | |||
+ | ==== Build ==== | ||
+ | |||
+ | <pre> | ||
+ | $ make PROBE_HOST=f4discovery BLACKPILL=1 ENABLE_RTT=1 | ||
+ | </pre> | ||
+ | |||
+ | ==== Pinout ==== | ||
+ | |||
+ | {| class=wikitable | ||
+ | |- | ||
+ | ! Function | ||
+ | ! Pin | ||
+ | |- | ||
+ | | TDI | ||
+ | | PA1 | ||
+ | |- | ||
+ | | TMS/SWDIO | ||
+ | | PA13 | ||
+ | |- | ||
+ | | TCK/SWCLK | ||
+ | | PA14 | ||
+ | |- | ||
+ | | TDO/SWO | ||
+ | | PB3 | ||
+ | |- | ||
+ | | TRST | ||
+ | | PB5 | ||
+ | |- | ||
+ | | SRST | ||
+ | | PB7 | ||
+ | |- | ||
+ | | TX | ||
+ | | PB6 | ||
+ | |- | ||
+ | | RX | ||
+ | | PB7 | ||
+ | |} | ||
+ | |||
+ | == Upgrading Firmware == | ||
+ | |||
+ | With the blackmagic bootloader, firmware can be upgraded: | ||
+ | |||
+ | <pre> | ||
+ | dfu-util -d 1d50:6018,:6017 -s 0x08002000:leave -D blackmagic.bin | ||
+ | </pre> | ||
== Miscellaneous Links == | == Miscellaneous Links == | ||
* [https://1bitsquared.com/products/black-magic-probe Black Magic Probe V2.1 Home] | * [https://1bitsquared.com/products/black-magic-probe Black Magic Probe V2.1 Home] | ||
+ | * [https://github.com/blackmagic-debug/blackmagic/wiki Black Magic Probe Wiki] | ||
+ | * [https://ciesie.com/post/black_magic_probe_stlink/ Black Magic Probe on ST-Link] | ||
+ | * [https://sites.google.com/site/hubmartin/arm/black-magic-probe-vs-code Using Black Magic Probe in VSCode] | ||
+ | * [https://www.compuphase.com/electronics/BlackMagicProbe.pdf Book about Black Magic Probe] |
Latest revision as of 17:09, 19 October 2022
Usually when flashing and debugging software on STM32 one would use a ST-Link device (either original or a cheap Chinese clone). For some completely incomprehensible reason, ST are not making the source code for the ST-Link readily available. Not only do they not provide source code, but it would appear they are actively trying to prevent clones from working.
Fortunately there are open source solutions available, the most prominent of these being the Black Magic Probe from 1BitSquared.
Platforms
The Black Magic Probe firmware can be build for many different platforms with different pinout. The following sections list the pinout.
Blue Pill
Build
$ make PLATFORM=bluepill
Pinout
ST-Link Clone
Build
make PROBE_HOST=stlink ST_BOOTLOADER=0 ENABLE_DEBUG=1
Black Pill
Build
$ make PROBE_HOST=f4discovery BLACKPILL=1 ENABLE_RTT=1
Pinout
Function | Pin |
---|---|
TDI | PA1 |
TMS/SWDIO | PA13 |
TCK/SWCLK | PA14 |
TDO/SWO | PB3 |
TRST | PB5 |
SRST | PB7 |
TX | PB6 |
RX | PB7 |
Upgrading Firmware
With the blackmagic bootloader, firmware can be upgraded:
dfu-util -d 1d50:6018,:6017 -s 0x08002000:leave -D blackmagic.bin