Author Topic: "Black Magic Probe"  (Read 1450 times)

0 Members and 1 Guest are viewing this topic.

Offline cdev

  • Super Contributor
  • ***
  • Posts: 2776
  • Country: 00
  • Friend
"Black Magic Probe"
« on: November 23, 2017, 11:23:12 AM »
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
« Last Edit: November 23, 2017, 11:31:24 AM by cdev »
"What the large print giveth, the small print taketh away."
 
The following users thanked this post: Bruce Abbott

Offline legacy

  • Super Contributor
  • ***
  • Posts: 2624
Re: "Black Magic Probe"
« Reply #1 on: November 24, 2017, 01:28:09 AM »
No!  |O
 

Online newbrain

  • Frequent Contributor
  • **
  • Posts: 385
  • Country: se
Re: "Black Magic Probe"
« Reply #2 on: November 24, 2017, 02:20:17 AM »
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).

No!  |O
Care 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 a pull request to BM.
 
The following users thanked this post: cdev

Offline andersm

  • Frequent Contributor
  • **
  • Posts: 826
  • Country: fi
Re: "Black Magic Probe"
« Reply #3 on: November 24, 2017, 03:06:55 AM »
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).
 
The following users thanked this post: cdev

Online newbrain

  • Frequent Contributor
  • **
  • Posts: 385
  • Country: se
Re: "Black Magic Probe"
« Reply #4 on: November 24, 2017, 05:07:03 AM »
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).
The official STM32 ST-Link Utility will 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 an STM32F101...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.
 
The following users thanked this post: cdev

Offline thm_w

  • Frequent Contributor
  • **
  • Posts: 467
  • Country: ca
Re: "Black Magic Probe"
« Reply #5 on: November 24, 2017, 11:13:49 AM »
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.
 
The following users thanked this post: cdev

Offline abraxa

  • Regular Contributor
  • *
  • Posts: 182
  • Country: de
  • Sigrok associate
Re: "Black Magic Probe"
« Reply #6 on: November 25, 2017, 04:38:50 AM »
Or just buy a real BMP and support the author(s) of the hard- and software for their work.
 
The following users thanked this post: cdev

Offline thm_w

  • Frequent Contributor
  • **
  • Posts: 467
  • Country: ca
Re: "Black Magic Probe"
« Reply #7 on: November 25, 2017, 09:10:20 AM »
Or just buy a real BMP and support the author(s) of the hard- and software for their work.

Its 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
 
The following users thanked this post: cdev, newbrain

Offline amymcneil

  • Newbie
  • Posts: 4
  • Country: us
  • AB1WH
Re: "Black Magic Probe"
« Reply #8 on: November 26, 2017, 03:33:46 AM »
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...
Some mornings it's just not worth gnawing through the straps....
 
The following users thanked this post: cdev

Offline dgtl

  • Regular Contributor
  • *
  • Posts: 113
  • Country: ee
Re: "Black Magic Probe"
« Reply #9 on: November 29, 2017, 12:01:47 AM »
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.
 
The following users thanked this post: cdev

Offline cdev

  • Super Contributor
  • ***
  • Posts: 2776
  • Country: 00
  • Friend
Re: "Black Magic Probe"
« Reply #10 on: November 29, 2017, 04:36:56 AM »
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.)


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...
"What the large print giveth, the small print taketh away."
 

Offline Bud

  • Super Contributor
  • ***
  • Posts: 1974
  • Country: ca
Re: "Black Magic Probe"
« Reply #11 on: November 29, 2017, 05:21:45 AM »
I got myself a chinese st-link clone for testing the bmp out...... I might be getting one official BMP for work soon.
Sorry did not get it from your post: the described issues are because of the chinese POS you used or they are general BMP problems?
 

Offline thm_w

  • Frequent Contributor
  • **
  • Posts: 467
  • Country: ca
Re: "Black Magic Probe"
« Reply #12 on: November 29, 2017, 11:46:36 AM »
Sorry did not get it from your post: the described issues are because of the chinese POS you used or they are general BMP problems?

Try reading again without the "everything chinese is crap" tinted glasses.

Quote
In addition to that, the semihosting debug output is unusable in eclipse due to the limitations of gnu arm eclipse plugin
 

Offline mubes

  • Regular Contributor
  • *
  • Posts: 171
  • Country: gb
  • Do Not Boil
Re: "Black Magic Probe"
« Reply #13 on: December 02, 2017, 07:52:01 PM »
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.

Regards

Dave
(Disclosure; the orbuculum stuff is mine, so I'm biased. I also did the BMP high speed swo mode support)

 
The following users thanked this post: thm_w, newbrain


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf