We don’t always JTAG, but when we do, we use a Black Magic Probe. It’s a completely open ARM-chip debugging powerhouse. If you program the small ARM chips and you don’t have a BMP, you need a BMP. Right now, one of the main producers of these little gems is running a Kickstarter where you can get your hands on a nicely made one and/or a 1Bitsy STM32F415-based development board.
Why is the BMP so great? First off, it’s got a JTAG and a UART serial port in one device. You can flash the target, run your code, use the serial port for printf
debugging like you know you want to, and then fall back on full-fledged JTAG-plus-GDB when you need to, all in one dongle. It’s just very convenient.
But the BMP’s killer feature is that it runs a GDB server on the probe. It opens up a virtual serial port that you can connect to directly through GDB on your host computer. No need to hassle around with OpenOCD configurations, or to open up a second window to run [texane]’s marvelous st-util. Just run GDB, target extended-remote /dev/ttyACM0
and you’re debugging. As the links above demonstrate, there are many hardware/software pairs that’ll get you up and debugging. But by combining the debug server with the JTAG hardware, the BMP is by far the slickest.
Full disclosure: we use a BMP that we built ourselves, which is to say that we compiled and flashed the firmware into a $4 STLink clone programmer that we had on hand. Breaking the required signals out required a bit of ugly, fiddly soldering, but we enjoy that sort of thing. If you don’t, the early-bird Kickstarter (with cables) looks like a good deal to us.
I’ll probably get kicked for saying this, but I kinda prefer my Segger J-Link.
+1 for your comment. I am sick of bothering unproven equipments…
+1 here too. I love my J-Link edu (v9.3). This seems to offer no actual improvements. The J-Link just works, it integrates directly into most IDEs, it works with a wide range of MCUs, it has a good set of utils, it’s mature, it’s well supported and all.
I have been meaning to get a new jtag programmer, my old one is so fiddly and so bodged up from accidents over the years, unfortunately cyber Monday drained me dry!
Looks good but 15$ shipping on a 19$ is hard to take. My biggest issue with kick starter.
Yeah it’s best just to wait for clones or resellers
IMO that’s not outrageous, it’s about the rate a private person would get on a small box walking into a post office. Large companies can get shipping deals, sometimes they’ll hide it in the markup. Sure if you had a buddy on site who could repack it into a padded envelope, maybe it would only be 3 or 4 bucks in stamps through letter mail/small packet, but you’d risk damage.
Even if you splurge and use the USPS Priority Mail flat rate box, something like this would be $6.80. $15 is steep.
True I guess, need to bug more people to use the flat rate boxes… I’ve had the odd thing to my US box that would have rattled inside the small one but individually priced was like $12.
That’s the USPS price for flat rate box to locations within the USA.
Try sending to anywhere else in the world. Just go to their price calculator page https://postcalc.usps.com/ and make sure you change the country (step 1 at the top, a drop-down select box) to anywhere other than USA. You’ll discover that flat rate priority box costs a LOT more than only $6.80 to send anywhere in the world outside the USA.
No one mentioned the destination for the package, so I was just responding with the our going rate. I see they’re charging $4 for domestic, which is perfectly reasonable. $10 to Canada, $15 will get you anywhere besides Australia and Singapore, which run $20.
Not it isn’t reasonable. I can send someone an Arduino shield in a 2x3x4″ ULine indestructo box over USPS w/ins for less than $5.50 domestic.
@ewertz That is why domestic shipments(USA) cost $4.
The $19 option is for the 1bitsy STM32 board. The Black Magic Probe is $50.
FWIW, that’s what international shipping costs from the USA. Last time I sent out small packages (3oz bubble pack) internationally it ranged from $13.50 to $15.00 for USPS first class which was the cheapest out of all the carriers. Large companies have shipping accounts that can reduce that significantly, but that’s not going to be the case for Kickstarter projects.
The $15 is for international shipments. US shipments are $4. Sadly that is what USPS international costs when your shipping volume is in the hundreds, not tens of thousands, or you are subsidized in some way. I wish we could provide lower cost international shipments. This is combined with the fact that we populate the JTAG connector that needs to be protected in transit. This means we can not ship using the ‘letter’ rate and have to use ‘thick envelope’ rate instead to assure the 1Bitsy arrives undamaged.
I find it hard to decide. I really want to make the step from tinkering with an arduino to programming a proper embedded device and would like the JTAG programmer AND 1Bitsey to allow that step. But I have a hard time convincing myself to spend $65…
First world problems I guess.
I have a simple solution for this. I don’t treat Kickstarter as a shop. I treat it more like a charity. If I see a project that would make the world a better place, I would support it — proportionally to how great I think it is. If I get one of the devices as a side effect, that’s great, but that’s just a bonus. The important part is that I helped to make something.
Check out this cool campaign, a new approach to UIs for embedded systems.
https://www.kickstarter.com/projects/481671730/app-enable-products-without-writing-wireless-or-ap
If you’re careful with your selection of “real” development boards, they’ll often have a USB debugger built in that can be exposed directly and used for ISP on home-spun boards (i.e. ignoring the device that the developer board was intended for). So much so, on some of the ARM boards that are for M0/M0+ development, you can find an M3/M4 device being used as the programmer, which is normally more valuable and more powerful.
At that kind of price range, might want to save up a bit more for Jlink EDU ($63.75). Tack it on your digikey parts order and save on the shipping charges.
http://www.digikey.com/product-search/en?keywords=jlink%20edu
oops was trying to reply n the other thread.
Yeah some of the development boards are in the $10-$15 ange and includes SWD debuggers. Some (ST and NXP/Freescale once can be reprogrammed with a restricted licensed JLink’s firmware for a major speed improvement.
JTAG as a catch all term is so out of date. It requires 2 more pins and are typically on older and/or much larger ARM parts. Most ARM cortex microcontrollers you deal with uses SWD.
Certainly have to be careful when people say “JTAG pins” as to what they mean; TDO, TDI, TMS, TCK are required, nTRST is optional and then some older ARM devices use ‘RTCK’ (anything Cortex doesn’t require that pin as the JTAG clock is treated as a real clock rather than synchronised to some internal one). And then there’s the occurrence of nSRST (not related to JTAG but intended to reset the ‘system’) which was either badly defined or implemented against the wrong bits of logic. :-/
SWD is also JTAG though, it’s just a method of reducing the number of pins the protocol needs. But using the name JTAG for debugging has always been wrong in the formal sense since this isn’t part of the standard. All debug methods built on top of JTAG are hacks, some are done well if a bit barking (ST20 for example) some are done very minimally. Early ARM and MIPS (EJTAG) were little more than methods of wiring the JTAG interface to the instruction bus.
Er, “SWD is also JTAG” O_o
Okay, they are both often used for similar features (in an ARM context) but are very different protocols.
While a lot of the 1149.1 (“JTAG”) standard does refer to lots of stuff about scan testing (the original purpose), the bulk is simply describing the protocol (how bits are shifted, the meaning of states, register interaction). Beyond a few specific Instruction Registers, it doesn’t really say what the data that goes over it actually represents.
SWD was at a complete ground-up design as a communication interface (not specific to scan testing or even debug although that is the main usage in ARM). It solved a number of failings with the JTAG definition at the implementation level rather than only the meaning of the payload data.
You are right Sheldon, I thought it was just a reduced pin front end for the JTAG state machines, and it’s actually much more capable than that. It’s a packeted protocol with it’s own direct access to the debug hardware.
Genuinely thanks for putting me right on that :)
I’m really glad some people do esteem and factor into their spending decisions whether a small independent shop or even individual is trying to do something good and generally add value for the maker/hacker community. Trying to manufacture and sell anything in low to moderate volume is risky and expensive.
If everyone thought and purchased as tekkieneet & others suggest, only loss-leader hardware and proprietary products without schematics would exist in the world. Even the cheap Chinese clone products they advocate buying wouldn’t exist, without the initial risk taken mostly by individuals to turn them into successful enough products that Chinese to start cloning.
Piotr is a great guy. I’ve personally met him on several occasions. He’s trying to do something good here. If you’re a poor student or otherwise on a very tight budget, of course you’re probably not going to back low volume production that’s relatively expensive. But if you can afford the cost, I hope you’ll disregard the naysayers and armchair engineers whose main contribution is only rhetoric. FWIW, I backed his project yesterday, even though it could be said it might compete with stuff I personally make. Good things happen in this community because of people like Piotr, and because of so many others who don’t always frame every decision as shopping for the lowest price, but rather who are willing to help back awesome projects that ultimately add benefit for everyone.
Paul, while I agree with this sentiment and totally feel that the $19 bitsy board is an excellent deal as well as all of your teensy boards, I still feel that the BMP is overpriced. I’d definitely consider it at $19 or even $25…but not $50.
Even the author of this article went down the path of downloading the BMP firmware onto a cheap $4 st-link instead of buying the $50 version.
@halherta: Honestly, though, I’d toss them the $50 for a well-made version, though, if I didn’t get actual satisfaction from sketchy soldering and hitting my head against various pinouts. The Kickstarter comes with cables too. Depending on who you are and how you value your free time, this is a bargain!
But that’s the beauty of open designs. If you’re priced out of the market, you can make your own for sweat equity. The important thing is that you have access to good tools, IMO. (And that the folks making them can afford to eat.)
Thank you Paul, I really appreciate your comment and you backing our Kickstarter. I also backed yours, with similar sentiment. I think your work is great, and adds value in our tech society. It is always a pleasure meeting you and talking about hardware. :D
I am also happy to see so many people support project like yours and mine. Gareth and I are trying to improve the state of open-source ARM programming and debugging. Some, if not all, understand that backing a Teensy project improves the state of the Arduino eco system, and supporting Black Magic Probe/1Bitsy supports the development of embedded debugger and programmer tools.
I like to look at it as a donation to an open-source project where you also get a physical reward for your donation. What we might have not communicated well enough is the fact that the revenue of our Kickstarter will go directly or indirectly back into the Black Magic Probe and 1Bitsy projects. It will allow Gareth and me to continue working on the software and develop new and exciting hardware. Also a super successful Kickstarter will likely only result in a few hundred boards being ordered, that is in the terms of manufacturing scale really small and will not allow us to compete with devices produced in tens of thousands.
If you compare the price of the Black Magic Probe with J-Link or other commercial black-box JTAG/SWD solutions it does compare quite favorably. (even if you are a student and can get an EDU version) The firmware being open-source does not mean we did not spend any time or money developing it. I am not sure why a closed source thing that you can not look into is considered higher value, and something that is open-source should be considered low cost or free. I think being open is adding value to a thing not detracting from it.
I am happy to see how many people do understand that, and I really appreciate the outpouring of support for our projects. :)
Thank you, Paul, Elliot, and esden for espousing meaningful dialog here in the Hackaday comments. Very much appreciated.
Get a tiva c launchpad which has a m-series arm as well as a jtag debugger. when you want a more flexible debugger get a busblaster.
I like the Blackmagic Probe and use it myself.
But I’m a bit sceptical about their pricing: the 1Bitsy is $19, the BMP 2.1 is $50.
These 2 Boards don’t differ much in complexity and BOM. The few level shifters on the BMP are cheap and the STM32F103 is much cheaper than the F415 on the 1Bity. So what is the big difference for?
One is a component, to be put into your project, and the other is a tool, to save you hours of time.
One has a massive investment of time embodied in the software, which is worth something, don’t you think?
The Oatmeal™ (http://theoatmeal.com/blog/apps) summed up the attitude.
I have the same feeling about music. It costs something like 10 pence to print a CD and it just feels better buying it for 5 quid than spending a slightly lesser amount on a completely digital download.
Sure, but the question is…how much is it worth to the buyer whose expected to fork out $50 for this thing. Especially with so many cheaper programming/debugging alternative solutions out there.
Besides I thought the software was open source…so technically the software designer wasn’t expecting to make money off the software/firmware ..at least not via a subscription/licensing style model.
The idea of a JTAG dongle running a GDB server is really neat. But I can purchase an official ST-Link or Nucleo Board (with an ST-LinkV/2 that can be detached from the rest of the board and used independently) for about $15.
Opening a second window that runs an openOCD or st-util GDB server costs me virtually nothing. Heck I can get a $5 PiZero attached to an official STLink or a $4 dollar clone to run the GDB server and it would still cost me less than $50. The piZero would also be capable of providing me with with a serial debugging port.
My point is that the BMP is way too expensive at $50 especially for hobbyist use and especially for those targeting the STM32s that have so many alternative low cost debugging/programming options. This might’ve been a good deal a decade ago….but not in 2016. If it costs $20 or less I’d consider it.
Besides…I haven’t been using a debugger for a long time now. I find printf debugging to be sufficient 95% of the time.
Or skip the STLink and use OpenOCD’s GPIO-JTAG driver directly on the Pi.
I haven’t looked into GPIO-JTAG, but has anyone done anything with it to help with pin discovery, a la the JTAGulator? It’s a totally different use than the BMP in the article here, but it might be interesting if it were easily scriptable for the reverse engineering crowd out there.
“Here are 20 pins, find the hidden JTAG interface” is not a job for humans in this day and age.
The Nucleo’s ST-Link/V2 controller can be flashed with the Blackmagic firmware, so charging $50 for less than $10 of hardware seems somewhat steep.
I’ve got enough handout 1Bitsy boards sitting around, might as well back the BMP…
congrats to the team for making their goal!
C’mon Hackaday! I have sent a tip to Hackaday to something similar almost 4 years ago. I didn’t even receive a “discarded” response.
http://searchingforbit.blogspot.com/2013/02/free-cortex-debugger.html
It’s a link to the post about my hack for making legit and free Cortex debugger from evaluation board instead of ordering “empty” HW from vendor. I since have used iTAG debugger for all my projects (some documented on given blog).
I guess free doesn’t cut it anymore – it has to be open and kickstarted.
I’d rather see a 3D printed case stretch goal than for a beefier dev board. Bare board tools are a pain in the neck and an accident waiting to happen.
I loved your first sentence, Elliot! Masterful writing. ????
Keep it up!
I love the Black Magic Probe! I’ve used it for JTAG. I’ve used it for SWD. I’ve used it for a variety of targets. We used it heavily during development of HackRF One and GreatFET. Open source hardware for the win!
Thank you very much Michael. I am happy to hear that this hardware has been essential for so many of your projects. Which is awesome because the HackRF is such an amazing piece of hardware. :)
I’m bumping this old thread to point out that the fine people over at stm32arduino discovered you can simply flash an off-the-shelf <$2 blue pill board with the stlink build of BMP. As for jlink I can't be smug about dropping $800 on hardware that's selling for $6 on eBay, nor am I interested in spending a lot of time "fighting the Germans" in technological warfare just to keep one of those $6 clones functional — counter-measures against counter-counter-measures; that ended in 1945.