Firmware upgrade issue of ST-Link V2

Post here first, or if you can't find a relevant section!
Post Reply
mebab
Posts: 91
Joined: Mon Aug 24, 2020 12:42 pm
Answers: 2

Firmware upgrade issue of ST-Link V2

Post by mebab »

My St-Link failed for an unknown reason while programming my Stm32 based board. I had to get another one. The new one holds an old firmware version (V2.J17.S4). I tried a lot to upgrade it to a newer version with no luck. I even tried older versions of the ST-Link utility that didn't work for me. The message is: Upgrade error, Please try again.

I couldn't find a solution after a long search and trying several versions of the firmware. Meanwhile, when I use STM32CubeProgrammer, I receive the same error message.
Does anybody know how to fix this issue and upgrade the proposed ST-Link?

Many thanks in advance
by mebab » Sat Nov 27, 2021 3:10 pm
Yes. Seems that there are many non-original versions in the market! My ST-Link dongle couldn't be upgraded as expected too.
I use Arduino IDE to program my STM32 board. However, it cannot upload the sketch to STM32 just because the firmware on the ST-Link is old.

Working around the matter, luckily I could design an unusual solution that could solve my problem and programed my STM32 afterward.

Steps to go:
If you are able to upgrade the firmware, just do that. You don't need to follow the next steps. Otherwise:

1. Make a binary file from your sketch in Arduino IDE (Sketch --> Export compiled Binary). This will create a .bin file in the same folder as your sketch is.
2. In STM32 ST-Link utility: open that ".bin" file.
3. Since the target board cannot be connected via ST-Link yet, we need to disconnect and then connect the target STM32 board via the problematic ST-Link.
4. Immediately press Program verify. If this doesn't work, close ST-Link utility and again open it and repeat the mentioned process.
5. In the new window, press Start.

In this stage, the binary program starts to be uploaded on the target board (your STM32). After it is done, you are done. ;)

Bests,
Mehrdad
Go to full post
User avatar
fpiSTM
Posts: 1227
Joined: Wed Dec 11, 2019 7:11 pm
Answers: 60
Location: Le Mans
Contact:

Re: Firmware upgrade issue of ST-Link V2

Post by fpiSTM »

Is it a legacy STLink?
mebab
Posts: 91
Joined: Mon Aug 24, 2020 12:42 pm
Answers: 2

Re: Firmware upgrade issue of ST-Link V2

Post by mebab »

It is ST-Link V2 Programmer Mini
Something similar to the picture in the following like:
https://www.majju.pk/product/st-link-v2 ... emulator/
User avatar
fpiSTM
Posts: 1227
Joined: Wed Dec 11, 2019 7:11 pm
Answers: 60
Location: Le Mans
Contact:

Re: Firmware upgrade issue of ST-Link V2

Post by fpiSTM »

mebab
Posts: 91
Joined: Mon Aug 24, 2020 12:42 pm
Answers: 2

Re: Firmware upgrade issue of ST-Link V2

Post by mebab »

Thanks anyway!
In fact, I already applied all those suggestions but didn't work for me.
Ozymandias
Posts: 1
Joined: Sat Nov 27, 2021 12:58 pm

Re: Firmware upgrade issue of ST-Link V2

Post by Ozymandias »

ST are now checking if the ST-Link V2 is using a valid ST chip and refusing to update the firmware if non genuine.

Both of my Chinese clones fail to upgrade to the latest firmware. Opening one of them shows it has a CKS32F103.

Looking on the web some of the clones seem to work but it seems to be a bit of pot luck if the clone has been made using a genuine chip.
mebab
Posts: 91
Joined: Mon Aug 24, 2020 12:42 pm
Answers: 2

Re: Firmware upgrade issue of ST-Link V2

Post by mebab »

Yes. Seems that there are many non-original versions in the market! My ST-Link dongle couldn't be upgraded as expected too.
I use Arduino IDE to program my STM32 board. However, it cannot upload the sketch to STM32 just because the firmware on the ST-Link is old.

Working around the matter, luckily I could design an unusual solution that could solve my problem and programed my STM32 afterward.

Steps to go:
If you are able to upgrade the firmware, just do that. You don't need to follow the next steps. Otherwise:

1. Make a binary file from your sketch in Arduino IDE (Sketch --> Export compiled Binary). This will create a .bin file in the same folder as your sketch is.
2. In STM32 ST-Link utility: open that ".bin" file.
3. Since the target board cannot be connected via ST-Link yet, we need to disconnect and then connect the target STM32 board via the problematic ST-Link.
4. Immediately press Program verify. If this doesn't work, close ST-Link utility and again open it and repeat the mentioned process.
5. In the new window, press Start.

In this stage, the binary program starts to be uploaded on the target board (your STM32). After it is done, you are done. ;)

Bests,
Mehrdad
Post Reply

Return to “General discussion”