"Black Magic Probe" - Page 1
Forum section: electronics / general

author: cdev
author_rank: Super Contributor
timestamp: November 23, 2017, 12:23:12 am
content: Would it be worthwhile turning an STLink 2 dongle into one? Is it better than an STLink?https://embdev.net/articles/STM_Discovery_as_Black_Magic_Probe

author: legacy
author_rank: Super Contributor
timestamp: November 23, 2017, 02:28:09 pm
content: No!

author: newbrain
author_rank: Super Contributor
timestamp: November 23, 2017, 03:20:17 pm
content: You can always try, and then go back to the original FW by flashing the old ST one floating on the net (and updating it).Quote from: legacy on November 23, 2017, 02:28:09 pmCare to qualify? I'm honestly curious.I find it sometimes handy...and very cheap if you use a BluePill or an ST-link clone. Just another tool.I use it for MSP432 launchpads, as I cannot stand TI's CCS and prefer working in VS with VisualGDB.The Launchpad CMSIS-DAP compatible debugger is obscenely slow, while BMpro works quite well.MSP432 is not among the supported MPUs, but "someone" has contributed apull requestto BM.

author: andersm
author_rank: Super Contributor
timestamp: November 23, 2017, 04:06:55 pm
content: IIRC the MCU in the Black Magic probe has more flash than the ST-Link, and the firmware won't fit in the smaller chip. You can either try one of the flashing tools that assume there's more working flash available, or rebuild the firmware with some features disabled (eg. Cortex-A support is a good candidate).

author: newbrain
author_rank: Super Contributor
timestamp: November 23, 2017, 06:07:03 pm
content: Quote from: andersm on November 23, 2017, 04:06:55 pmThe officialSTM32 ST-Link Utilitywill happily flash over the memory size reported by the target, I just used it for the Blue Pill.My cheap ST-Link clone is not even supposed to have USB, as it is anSTM32F101...so it's worth a shot!Removing support for unused targets is a good idea, and Cortex-A is the best candidate: one of the things I like in BM is the wide target support, but I only use it with Cortex-Ms.

author: thm_w
author_rank: Super Contributor
timestamp: November 24, 2017, 12:13:49 am
content: Is it better, depends on what you are doing.For STM32 stuff, no, JLINK firmware is the best IMO, stlink shortly behind.But if you want to program anything other than STM32, then black magic probe is necessary.Buy a blue pill and st-link clone so you can have one of each type. The blue pill uses STM32F103, and works with BMP.

author: abraxa
author_rank: Frequent Contributor
timestamp: November 24, 2017, 05:38:50 pm
content: Or just buy a real BMP and support the author(s) of the hard- and software for their work.

author: thm_w
author_rank: Super Contributor
timestamp: November 24, 2017, 10:10:20 pm
content: Quote from: abraxa on November 24, 2017, 05:38:50 pmIts not really worth it for $60, when you can get a jlink edu for the same, or jlink mini for $20. Unless you have a specific reason to use it or are working on a commercial product of course.I would rather use the donate link on their github instead:https://github.com/blacksphere/blackmagic

author: amymcneil
author_rank: Contributor
timestamp: November 25, 2017, 04:33:46 pm
content: Personally, I've found the BMP to be well worth the $60 USD that it cost. It is much, much faster than the ST-Link programmers that I have, speaks natively to GDB using GDB's remote debugging serial protocol (no special utilities or additional device driver layers needed) and just works. I've used it for several STM32 projects now and wouldn't go back to using the ST-Link if you paid me.One thing about the BMP that I really appreciate is the size - it's about the size of a USB A connector on the end of a cable! I made a small transition board that matches the 10 pin 1.27mm center header on the end of the ribbon cable and transitions to a single row 4 pin 2.54mm center header to connect to the SWD connector on my STM32 target hardware.I've been so happy with the BMP that I've not explored converting my unused ST-Link to using the BMP code (from the comments here, not sure the code would fit) or converting any of my idle ST eval boards into another BMP. The rev 2.1 of the BMP hardware seems to be well thought out and have all the major points (voltage independent target interface driver, power isolation) covered. And the extra TTL level UART port is an additional bonus - don't need another USB cable and assorted accoutrements to connect a DUT serial port to my computer when debugging or testing.To date, I've only used the BMP with the STM32F series microcontrollers. I have an Arduino Due that I plan on playing with when I get a chance, I want to compare the Atmel ARM implementation to the ST version (though the ST parts seem to be the cheapest out there right now) and see how the BMP performs with something other than an STM32 part. And I have a Teensy 3.2 board that I've not even looked at yet to see if there are SWD connections available (there's no header labeled as such). Lots of ARM related microcontrollers to play with, so little time!Putting my praise in perspective - I have a small side business building custom hardware/software widgets, unrelated to my manufacturing engineer day job. It lets me scratch an itch and cover the costs to do so. The BMP falls into my favorite category of tools that are fast, easy to use and inexpensive.I plan on buying another BMP soon - I have a multiprocessor project I'm going to start working on soon, and want to be able to work on different targets at the same time. I don't expect to have many issues with running multiple sessions of GDB pointed at different BMP devices.Just one woman's opinions, anyway...

author: dgtl
author_rank: Regular Contributor
timestamp: November 28, 2017, 01:01:47 pm
content: I got myself a chinese st-link clone for testing the bmp out on my personal projects. Flashing it was relatively easy, just followed the guides found on net. On the positive side, it works well with both STM32 and LPC microcontrollers. On the negative side, getting it to work in eclipse is a little tricky. What finally worked out was setting up the gdb remote in .gdbinit and going past the whole gnu arm eclipse configuration dialogs. In addition to that, the semihosting debug output is unusable in eclipse due to the limitations of gnu arm eclipse plugin; no gdb monitor responses are displayed anywhere (there is a bug report on that for ages, still not resolved). So it would be nice to be able to redirect the semihosting debug output to the additional serial port instead of the main gdb communication feed to workaround that. Another disadvantage to proper st-link is that it does not come with an enclosure; having a desk full of bare pcbs is already risky, tools should be somewhat insulated.So all in all, the BMP is definitely worth its cost; just the ecosystem doesn't seem to be fully ready yet. I might be getting one official BMP for work soon.

author: cdev
author_rank: Super Contributor
timestamp: November 28, 2017, 05:36:56 pm
content: So, its worth buying the 2.1 hardware in its current implementation, to get everything working right. Its that useful?Where are the best places/fora to learn more, once you have one to play with? (for me it will likely be an STlink v2 clone or more likely, a BluePill board that Ive flashed with the BMP SW at first.)Quote from: amymcneil on November 25, 2017, 04:33:46 pm

author: Bud
author_rank: Super Contributor
timestamp: November 28, 2017, 06:21:45 pm
content: Quote from: dgtl on November 28, 2017, 01:01:47 pmSorry did not get it from your post: the described issues are because of the chinese POS you used or they are general BMP problems?

author: thm_w
author_rank: Super Contributor
timestamp: November 29, 2017, 12:46:36 am
content: Quote from: Bud on November 28, 2017, 06:21:45 pmTry reading again without the "everything chinese is crap" tinted glasses.Quote

author: mubes
author_rank: Regular Contributor
timestamp: December 02, 2017, 08:52:01 am
content: The BMP is nice and works well in my experience SemiHosting works well. swo also works via the orbuculum tools (which also work on JLink)...SWO gives you access to things like 'top' for your embedded target. 2.1 release hardware BMP is limited to about 200kbps swo, running it on another platform such as bluepill will give you 2.25mbps. Most current bluepill builds are at github.com/mubes/In my testing for simple string output swo is about 80 times faster than semihosting, although that depends on the speed of the SWO port, obviously.RegardsDave(Disclosure; the orbuculum stuff is mine, so I'm biased. I also did the BMP high speed swo mode support)