What are the differences between ST-Link and Jlink and can Jlink be used to program the STM32F103 boards?
At a hardware level both can be used to program the STM32
My LibMaple based Arduino Core has the option to upload via JLink for some boards eg. generic _stm32f103 aka Blue Pill
However it will only work if you have JLink’s own software installed, i.e JFlash and specifically the command line tool.
Also you must add the path to your JFlash binaries folder to the system path, because it was impractical to get it to work without doing this, because annoyingly Segger put each version of JFlash into a folder with a different name (based on its version).
i.e this is handy if you happen to want loads of different versions of JLink installed as they don’t overwrite when you upgrade, but its a problem for any third party software e.g. the Arduino IDE as there is no way to know the path to the Segger JFlash binaries
This means the boards can be programmed with:
USB to serial adapter,
ST-Link,
J-Link, and
Bootloader + onboard USB.
Are there any other options?
Is another type of SWD adaptor but…
– It is open-source/open hardware.
– Includes debugging functionality as gdb server ( replaces stlink+ocd )
– Includes an UART interface
– Supports non STM chips.
Actually you can transform to BMP any STM32F103 board with USB, for example it is very good idea to use an extra Blue Pill as BMP.
JLink, BlackMagic Probe and ST-Link are all SWD programmers. There other types of SWD progamers, but my Libmaple based repo only supports upload via those three.
The Maple bootloader (aka stm32duino bootloader) the only bootloader option that the libmaple and STM32 GENERIC repo’s support on the STM32F1
Note. The STM32F4 has a built in USB DFU bootloader, however it uses DFUSE which is a STM specific extension to DFU and requires completely different drivers (installed by Zadig) and a different version of DFU_util which supports the DFU extensions
I don’t know if any of the cores support this, but my LibMaple based core only supports bootloader on the F1
i’m currently using an ST-Link for debugging etc… and can’t imagine what another device could offer extra.
so i think part of the answer is: go for whichever one you can get cheaper, they’ll all fit your needs
.
For professional use, specially for debugging, I think that JLink is the way to go, as it is the industry standard and is officially supported (eg. Eclipse, ARM plugin, etc…).
For hobby use, and for downloading programs to MCU (as ISP), ST-Link is more than enough for the price.
Also there are some JLinks on eBay ( from China) which use a STM32. They do work, but are a very old version, which was only intended to be permanently embedded on a target board.
And Segger stopped supporting them in JFlash about 6 months ago.
I tried switching my st-link to a j-link. I really didn’t see any advantage.
* I should say I’m biased to the BMP software, I converted my stm32f100 value line ST-LInk V1 to be BMP and I’m extremely happy
STLink is only designed to program ST devices (but can program others if you use Open OCD) , hence it just has a simple windows GUI and command line exe
Note. STLink on some Nucleo boards also has USB to Serial, and I think some have USB Mass storage as well
I only use JLink occasionally because of JFlash, which makes it convenient to read and write binaries and modify the flash etc
[RogerClark – Wed Nov 22, 2017 9:12 pm] –
Note. STLink on some Nucleo boards also has USB to Serial, and I think some have USB Mass storage as well
Every NUCLEO supports the USB Mass Storage program load. This is seriously underrated by the crowd here. It allows you to flash the target MCU without any custom host side software. You just drag and drop the binary and it loads onto the target. This is a huge advantage. It allows you to use any device that can deal with USB Mass Storage, be it a raspberry pi, a tablet or os/x computer without having to worry about custom drivers.
Also underatted, is that the NUCLEO devices provide a Virtual COM device. So you don’t have to use native USB if you don’t want to, you can just connect to PA9/PA10 USART serial.
I did investigate whether it would be possible to make a USB mass storage bootloader but I think the overhead of the file system, made it quite large
Drive letter on Windows can also be a problem for automating the USB Mass storage, as the IDE does have a dropdown to select mass storage drive for upload.
I think there is a workaround for the drive letter on Windows, but using one of Windows on built in command line utils, I presume Linux etc has the same
BTW.
I’m not contesting that JLink is vastly over priced, even including that it comes with JLink etc, as they can’t now be spending very much to keep things updated, and the development costs must gave been recovered years ago.
[Rick Kimball – Wed Nov 22, 2017 9:10 pm] –
When you say it isn’t toy .. what makes it not a toy?
The price, I think…. I totally agree with you about the pricing policy of JLink.
I am also using BMP with Eclipse and gdb and it is OK.

