ST-Link Vs Jlink

Post here first, or if you can't find a relevant section!
MartynC
Posts: 7
Joined: Thu Nov 16, 2017 1:14 pm

ST-Link Vs Jlink

Post by MartynC » Wed Nov 22, 2017 6:01 am

Hi

What are the differences between ST-Link and Jlink and can Jlink be used to program the STM32F103 boards?

User avatar
RogerClark
Posts: 7475
Joined: Mon Apr 27, 2015 10:36 am
Location: Melbourne, Australia
Contact:

Re: ST-Link Vs Jlink

Post by RogerClark » Wed Nov 22, 2017 6:37 am

J-Link provides both JTAG and SWD hardware interfaces (and possibly others), but ST-Link only does SWD and SWIM

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

MartynC
Posts: 7
Joined: Thu Nov 16, 2017 1:14 pm

Re: ST-Link Vs Jlink

Post by MartynC » Wed Nov 22, 2017 8:01 am

Thanks. I was starting to get a bit lost in all the half information that is available online.

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?

User avatar
Slammer
Posts: 255
Joined: Tue Mar 01, 2016 10:35 pm
Location: Athens, Greece

Re: ST-Link Vs Jlink

Post by Slammer » Wed Nov 22, 2017 8:28 am

and the Black Magic Probe.... (aka BMP)

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.

User avatar
RogerClark
Posts: 7475
Joined: Mon Apr 27, 2015 10:36 am
Location: Melbourne, Australia
Contact:

Re: ST-Link Vs Jlink

Post by RogerClark » Wed Nov 22, 2017 9:57 am

For the STM32F103, the MCU can be directly flashed via USB to Serial or some sort of SWD programmer

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

MartynC
Posts: 7
Joined: Thu Nov 16, 2017 1:14 pm

Re: ST-Link Vs Jlink

Post by MartynC » Wed Nov 22, 2017 2:09 pm

Many thanks

racemaniac
Posts: 621
Joined: Sat Nov 07, 2015 9:09 am

Re: ST-Link Vs Jlink

Post by racemaniac » Wed Nov 22, 2017 2:42 pm

maybe also interesting for this topic: the ST-Link has less capabilities, but is there anything you miss out on by not going for a J-Link?
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 :).

Ollie
Posts: 197
Joined: Thu Feb 25, 2016 7:27 pm

Re: ST-Link Vs Jlink

Post by Ollie » Wed Nov 22, 2017 6:17 pm

I do agree with racemaniac that the simple ST-Link does everything you need. In addition to the cost, you should select the least problematic platform. I don't know which one is the most robust. Over the past, I have had a lot of driver issues with ST-Link and the latest V2.1 is not working for my boards. In addition to the mentioned links, I am planning to switch to EBLink.

User avatar
Slammer
Posts: 255
Joined: Tue Mar 01, 2016 10:35 pm
Location: Athens, Greece

Re: ST-Link Vs Jlink

Post by Slammer » Wed Nov 22, 2017 8:07 pm

Personally, I found BMP more convenient than others. I like also the embedded usb to serial interface.
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.

User avatar
RogerClark
Posts: 7475
Joined: Mon Apr 27, 2015 10:36 am
Location: Melbourne, Australia
Contact:

Re: ST-Link Vs Jlink

Post by RogerClark » Wed Nov 22, 2017 8:27 pm

I have found that the JLink boards from China have a habit of erasing themselves, Fortunately someone posted an old binary on the web ages ago and it is possible to reflash them. Nevertheless it’s a pain when this happens

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.

Post Reply