Author Topic: Buying a general purpose programmer  (Read 9471 times)

0 Members and 1 Guest are viewing this topic.

Offline liteyearTopic starter

  • Regular Contributor
  • *
  • Posts: 99
  • Country: au
Buying a general purpose programmer
« on: October 09, 2023, 11:48:04 pm »
It's been a while since I've gone clean slate on a programmer. I'm pretty underwhelmed by what I can find. What would you suggest to meet these requirements:

  • [mandatory] Can flash and debug STM32.
  • [mandatory] Can flash and debug nRF.
  • [mandatory] Can flash and debug ATSAM.
  • [desirable] Can flash and debug ATMega.
  • [desirable] Can probably flash and and maybe debug almost anything else that appears on my desk.
  • [mandatory] Can connect to Tag-Connect, and various 6-pin and 10-pin ISP, JTAG and SMD headers.
  • [mandatory] Compatible with macOS.
  • [desirable] Compatible with Linux and Windows.
  • [mandatory] Compatible with OpenOCD or similar demonstration of third-party software compatibility.
  • [mandatory] Good support in STM32 Cube IDE and PlatformIO.
  • [desirable] Good support in Segger Embedded Studio or similar multi-platform IDE.
  • [mandatory] Is available for purchase in Australia without hundreds of dollars in shipping or month long lead time.

FWIW, I've already made a choice, but I'm interested to see other thought processes to help socialise some fruitful paths. If your answer is "don't do general purpose", or "DIY the adaptors", or "trawl Alibaba for bits and pieces and hope for the best", I'm happy to hear those arguments too.
 

Offline tellurium

  • Frequent Contributor
  • **
  • Posts: 345
  • Country: ua
Re: Buying a general purpose programmer
« Reply #1 on: October 10, 2023, 06:34:38 am »
I'd say the closest I can think of is BMP - https://black-magic.org/
Though it is ARM specific, AFAIK, so can't work with e.g. atmegas.
Mongoose - a full-stack embedded network library for STM32, NXP and other - https://mongoose.ws
TCP/IP stack + drivers + TLS1.3 + HTTP/WebSocket/MQTT + OTA in a single file
 

Offline slugrustle

  • Frequent Contributor
  • **
  • Posts: 329
  • Country: us
Re: Buying a general purpose programmer
« Reply #2 on: October 10, 2023, 03:00:15 pm »
That's quite the list of requirements...

I haven't really searched for this, but I happen to be aware of the ASIX FORTE, which is pretty general.  However, I'm not sure about the extent of IDE integration (they have their own software), and macOS support would depend on wineHQ, which doesn't work on macOS 10.15 and later due to needing some 32-bit components or something.

Are you looking for a pure programmer or for a programmer/debugger?  The IDE integration ask seems like a big extra set of requirements for a pure programmer.
 

Offline Doctorandus_P

  • Super Contributor
  • ***
  • Posts: 5404
  • Country: nl
Re: Buying a general purpose programmer
« Reply #3 on: October 10, 2023, 04:47:03 pm »
Those "universal programmers" were a big thing some 20+ years ago. These days it's mostly small USB dongles with some custom programmed uC in it. For STM32 I use ST-Link V2 clones from Ali (Official ST-Link V3 has become affordable lately) and for AVR's I use usbASP.

Both these dongle type gadgets are so cheap it's hardly worth fussing about. I have several of each just in case I put some high voltage on the programming pins or blow them up in some other way.

I do find the Black Magic Probe an intriguing project and I may invest some time into it, but for now the ST-Link V2 clones are "sufficient". STM32 Cube recognizes them, can even update it's firmware (even though the uC in them is not even from STM (can by any of several different clones).

Maybe it's worth looking into the "Segger" products. (Edit: Oops, had not seen you already mentioned Segger). I never looked into them because of their prices, but apparently those tools are worth their money for some. In theory a JTAG programmer should be able to handle anything with JTAG connectivity, but in practice the way to control such hardware from your PC uses vendor specific protocols. I don't know if they either don't care for compatibility, or if they deliberately make stuff incompatible in an attempt to thwart competitors. Probably the answer is as simple as that nobody bothered to set up a standard for that part.

In theory a Cypress CY768013A could become a nice "universal (serial) programmer". It's a uC without flash that get's it's firmware from an USB host via DFU when you plug in the cable. Sigrok / Pulseview uses them as a logic analyzer, but if anyone bothers to write the software for it, it could be almost anything. Sort of a BusPirate universal gadget.
« Last Edit: October 10, 2023, 04:58:10 pm by Doctorandus_P »
 

Offline westfw

  • Super Contributor
  • ***
  • Posts: 4676
  • Country: us
Re: Buying a general purpose programmer
« Reply #4 on: October 10, 2023, 11:39:07 pm »
Quote
I've gone clean slate on a programmer. I'm pretty underwhelmed by what I can find.
  • [mandatory] Can flash and debug STM32.   

"debug" make things harder.  Especially if you wany to interface to multiple vendor-provided IDEs.
Segger comes to mind for everything JTAG.  But I think ONLY JTAG.

Quote
These days it's mostly small USB dongles with some custom programmed uC in it.
Yeah, there is that.  And they tend to be very cheap compared with the old universal programmers (or even the less-universal programmers.)
You get get a whole set of dongles/eval boards that cover everything on your list for less than the price of a Microchip ICD2 (or a midrange Segger.)
In theory, a bunch of the vendor JTAG dongles (like the ST-Link) should be usable on other vendors' products (especially if you use something like OpenOCD), but I think it's rarely worth the effort to make it work when ~$50 will get you "something supported."

 

Offline SiliconWizard

  • Super Contributor
  • ***
  • Posts: 17876
  • Country: fr
Re: Buying a general purpose programmer
« Reply #5 on: October 10, 2023, 11:42:45 pm »
If you're using only ARM-based MCUs, a CMSIS-DAP adapter is usually a safe bet. These are supported by OpenOCD and can even be used with (some) other targets via OpenOCD.

 

Offline all_repair

  • Frequent Contributor
  • **
  • Posts: 744
Re: Buying a general purpose programmer
« Reply #6 on: October 11, 2023, 01:31:11 am »
You need debugging then it is the existing code that is doing the ordering.  Unless you are always starting afresh, else follow whatever the code was using.  The development system should be your tool, not your product, unless my assumption is wrong.  Hardware is relative cheap now and has been depreciating, while manhour rate has been inflating.
« Last Edit: October 11, 2023, 01:34:42 am by all_repair »
 

Offline darkspr1te

  • Frequent Contributor
  • **
  • Posts: 550
  • Country: zm
Re: Buying a general purpose programmer
« Reply #7 on: October 11, 2023, 05:48:15 am »
If you are looking for a good cheap all rounder then the two I always mention is the Bus Pirate and Bus Blaster,
The Buspirate is a uart/spi/jtag/swd/i2c/logic analyzer do it all adapter that sits on my desk in a permanent position for anything i work on , while it has many features it does lack solid debug features ,
For the better debug support i reach for my Bus Pirate, this is a reprogrammable dual ftdi+cpld front end setup and can emulate a lot of popular JTAG front ends including jtag over swd with custom firmware on github
The last item i have is a handy dandy stm32f103 bluepill , this either runs a custom st-link v2 firmware or the BlackMagicProbe firmware with the mods for serial debug and direct GDB support for common devices
all 3 cost less than any official adapter but have enabled me to program almost any device that i have had my hands on.
a must mention is that the bus pirate/bus blaster can be setup for various voltages too including 1.8v if you provide external power.


One up and coming device to mention is the Pi Pico, i have noted a big trend in adapter repo's popping up , everything from FDCAN to stlink protocol's are being added , both with the Programmable IO system and without (some fancy dual core code out there)
while often the pc side software is lacking that is changing with openocd support and other tools being added.


darkspr1te



 
The following users thanked this post: liteyear

Offline liteyearTopic starter

  • Regular Contributor
  • *
  • Posts: 99
  • Country: au
Re: Buying a general purpose programmer
« Reply #8 on: October 11, 2023, 10:00:38 am »
OP here. This is some fantastic commentary. Validates a lot of my assumptions and opens my eyes to a few new possibilities.

In particular I think you've nailed the fact that my preference for a universal device is an antiquated notion, when every dev environment has a tool of choice that's less than 1/10th the cost of a universal solution. That said, the BusPirate+BusBlaster+Bluepill is a really interesting setup I've been meaning to learn more about.

I too look forward to the day when PIO/CPLD/JTAG is a plaything of the open source crowd, and powerful flash/debug tools are the realm of the designer rather than a carrot every vendor keeps out of reach. I'm not convinced things will go that way, but it's encouraging to hear the adapter repo trend.

To answer a recurring question - yes, debug is a must, and yes I know that makes it harder. FWIW, my rational here is that if I only cared about flash, I'd use whatever comes on the dev board since these days vendors are bending over backwards to make sure anyone with a laptop and WiFi can flash. But getting a debug setup you know and trust is a bit more of a broad investment, and opens up doors to build standardised tooling around flash and test as well.

My preconceived decision was to throw money at the problem and go to the top of town: the Segger J-Link PRO. I'd previously shied away from J-Link because of a perception of being proprietary. But every actual experience I've had has been rewarding, and I think now they're solving an important problem in a fairly vendor-agnostic way. I've already gold plated my protocol analyser needs with a Saleae, so am kinda deep in the high-price-dedicated-device camp anyway.

Putting the PRO in the shopping cart was a eye-watering experience, but then the accessories and shipping! It's too much! So I found a local distributor with much more favourable terms, sold my soul one more time for a Tag-Connect cable, and then just raided DigiKey for a collection of 50 cent connectors that I'll fashion into some sort of universal-ish adaptor board. Hopefully that'll become my little contribution to the burgeoning corpus of freely-available debug tools.
« Last Edit: October 11, 2023, 10:08:42 pm by liteyear »
 

Offline Doctorandus_P

  • Super Contributor
  • ***
  • Posts: 5404
  • Country: nl
Re: Buying a general purpose programmer
« Reply #9 on: October 11, 2023, 01:01:29 pm »
Segger sure is in the money making business. At least, as long as there are enough people to actually buy their products. You can also get their "Embedded studio pro" for USD22480.

https://shop-us.segger.com/product/20-50-08-embedded-studio-pro-cortex-a-r/#included-debug-probe

I am very much on the opposite side. I am willing to spend some money for "decent" tools but have limited budget. As for now the ST-Link V2 clones I bought for about EUR3 each still do the job. I bought these several years ago, when the "official" ST-Link V2 was something like EUR120, and for me that is just to much for a uC in a box. If I was to start all over at this moment, I would very likely buy the official ST-Link V3 for around EUR20. That is still a reasonable price for a uC in a box (or in transparent shrink tube). I am never looking for "the cheapest tools", but for "reasonable quality for an affordable price". Those are often hard to find. Most is either extremely expensive, or very cheap and low quality.

For the same reason I also don't even think of starting with the overly expensive Tag connect things. It's just a ridiculous price for a connector. It's not even (all) about the money. I just refuse to give any money to companies that roam in the "20+ BOM cost" area. If I wanted a similar connector, I would roam Ali for "PCB pogo clamp", which gives connectors as shown below, those are available in different pin counts and are so cheap you can't make them yourself.

« Last Edit: October 11, 2023, 01:04:17 pm by Doctorandus_P »
 

Offline nctnico

  • Super Contributor
  • ***
  • Posts: 30440
  • Country: nl
    • NCT Developments
Re: Buying a general purpose programmer
« Reply #10 on: October 11, 2023, 02:47:37 pm »
I'm not so sure wanting OpenOCD compatibility is a good thing as OpenOCD can be flaky compared to the manufacturer's tools. Take the STM32 debugger for example; this works pretty good as it is dedicated to one single target. IMHO programmers are one area where having a one-size-fits-all solution might not be the best and/or most economic choice.
There are small lies, big lies and then there is what is on the screen of your oscilloscope.
 

Offline eutectique

  • Frequent Contributor
  • **
  • Posts: 638
  • Country: be
Re: Buying a general purpose programmer
« Reply #11 on: October 11, 2023, 02:47:55 pm »
Segger sure is in the money making business.

Pretty much like Green Hills or Lauterbach.
 

Offline liteyearTopic starter

  • Regular Contributor
  • *
  • Posts: 99
  • Country: au
Re: Buying a general purpose programmer
« Reply #12 on: October 11, 2023, 10:30:19 pm »
OpenOCD can be flaky compared to the manufacturer's tools

Totally. It's only to ensure there's a freedom/flexibility/last resort path, not as the preferred path.

You can also get their "Embedded studio pro" for USD22480.

The mind boggles. This is the page that got my goat. "Optional" adapters that cost more than most programmers, yet the $AUD2000 J-Link PRO is useless without them. I could sort of understand that if you just want something very specific to come in the box, you just pour good money after bad and add it to your cart. But what if I want to re-stock my drawer of adapters? I couldn't find cheap multi-purpose alternatives. Which brings me too...

Quote
I also don't even think of starting with the overly expensive Tag connect things. It's just a ridiculous price for a connector.

Tell me about it. Yet I still see it appearing on client's designs. Alas, I need a few of those in the drawer too. And again, I was shocked to find I couldn't dig up a cheap clone. The AliExpress versions look like a dog's breakfast for an already flimsy connector, for no less the price! Then I still need to source the clips for the underside. Feels like there's a cartel at work.

Quote
I would very likely buy the official ST-Link V3 for around EUR20.

FWIW, I totally get that. The V2 has been a shining light in a sea of darkness for a long time.
 

Offline zapta

  • Super Contributor
  • ***
  • Posts: 6620
  • Country: 00
Re: Buying a general purpose programmer
« Reply #13 on: November 03, 2023, 04:40:02 am »
>> FWIW, I've already made a choice.

I am curious what it is. I just get a dedicated programmer/debugger for each vendor. ST, ESP32, NRF (segger edu mini), RPI Pico, and so on. You can also get debuggers on some evaluation boards.

These days I consider proper hardware debugger as a must for firmware development, as well as support by Platformio. For just programming I try to find also a way that doesn't require a programmer, such that users can upgrades the firmware with minimal investment.
 

Offline liteyearTopic starter

  • Regular Contributor
  • *
  • Posts: 99
  • Country: au
Re: Buying a general purpose programmer
« Reply #14 on: January 18, 2024, 12:40:31 pm »
I missed your reply sorry. I revealed all in this post.

Yeah, I've gone the dedicated programmer route for a long time. After nearly 20 years in the consultancy game I'm leaning into options to standardise/productise/optimise my practices (without compromising breadth), so attempting to build a set of tools/workflows around a single programmer is part of that. I'm not sure it'll be a net benefit, but discomfort is a good sign I'm trying to break the mould at least!

I like your notion of treating programming as feature of the product rather than an engineering back door.
 

Offline tellurium

  • Frequent Contributor
  • **
  • Posts: 345
  • Country: ua
Re: Buying a general purpose programmer
« Reply #15 on: January 18, 2024, 02:51:37 pm »
Segger sure is in the money making business.

Pretty much like Green Hills or Lauterbach.

Whilst I agree with you, gents, I'd like to point out that money making is what business is for.
Some companies charge a dear margin, like those mentioned.

Though there are cases when big money making businesses charge a quite generous price - like ST Micro for their Nucleo dev boards, and their
STLINK-V3.
Mongoose - a full-stack embedded network library for STM32, NXP and other - https://mongoose.ws
TCP/IP stack + drivers + TLS1.3 + HTTP/WebSocket/MQTT + OTA in a single file
 

Offline peter-h

  • Super Contributor
  • ***
  • Posts: 6185
  • Country: gb
  • Doing electronics since the 1960s...
Re: Buying a general purpose programmer
« Reply #16 on: January 19, 2024, 12:13:43 pm »
There was me thinking the OP wanted to program EPROMs :)

The big player was Data IO and they are long gone. I have a Chiplab at work which has been faithfully working, programming various PLDs like 22V10s and tens of thousands H8/332s (which programs as a Hitachi 27C256. If that packs up I will have a fun job replacing it. I think Dataman are still out there... yes they are. They started same year I started: 1978. Not many from those days are still in business.

CPU programming is normally done with vendor products like the STLINK V2 or V3. These are so cheap there is nothing to gain from using anything else.

There is a thread here about Segger. Like a lot of German stuff it is very expensive and probably remains in business because Germans buy German unless unavoidable :) Well, France is even more so... I bought a Segger programmer for my 32F417 project and it didn't so anything better than a STLINK V2 so I sold it. Their really pricey boxes have oddball features like reprogramming bits of FLASH on the fly so you have an unlimited number of hardware breakpoints.
Z80 Z180 Z280 Z8 S8 8031 8051 H8/300 H8/500 80x86 90S1200 32F417
 

Offline elektryk

  • Frequent Contributor
  • **
  • Posts: 284
  • Country: pl
Re: Buying a general purpose programmer
« Reply #17 on: January 19, 2024, 12:51:36 pm »
As mentioned previously ST-Link is a good way to go. If you want to debug ex Atmel's products Mplab Snap is quite good, much cheaper than Atmel ICE3 with its ridiculously small connectors.
 

Offline SiliconWizard

  • Super Contributor
  • ***
  • Posts: 17876
  • Country: fr
Re: Buying a general purpose programmer
« Reply #18 on: January 19, 2024, 10:31:33 pm »
Segger sure is in the money making business.

Pretty much like Green Hills or Lauterbach.

Whilst I agree with you, gents, I'd like to point out that money making is what business is for.
Some companies charge a dear margin, like those mentioned.

Though there are cases when big money making businesses charge a quite generous price - like ST Micro for their Nucleo dev boards, and their
STLINK-V3.

Yes, agreed. ST dev boards and programmers are quite cheap. Not sure they even break even with those, it's probably partly helped with marketing budgets.

When considering buying tools, you just need to figure out what your goal is and how much of your own time you're willing to invest. You can buy cheap SWD adapters these days, or make your own - then you'll often have to resort to using tools such as OpenOCD, which are fine, but have a learning curve. Going for "expensive" professional tools gets you there more quickly and with support. Again all depends on how you value your own time. Sure if you're a hobbyist, you often consider your own time virtually "free", but otherwise, it's definitely not, and often saving a few hundreds bucks on some tools will cost you thousands in equivalent engineering time to setup.

There are of course reasons for going for custom/open-source tools instead of buying commercial ones, for instance customizability and full control, but cost is rarely one in a professional context, as people don't work for free. Normally.
 
The following users thanked this post: tellurium


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf

 

- - -
-->