cancel
Showing results for 
Search instead for 
Did you mean: 

ST-LINK V2 Update error Unexpected flash size

Andreas_Engineer
Associate

Used this ST-Link V2 with W10 some years ago. Now on Linux I want to use it with openocd and got error:

ST-Link version does not support DAP direct transport

Most likely the cable adapter needs update.

But the STLinkUpgrade.jar reported  Unexpected flash size after opening the cable in update mode.

What can I do to use the cable?

26 REPLIES 26
AScha.3
Chief II

1, Which st-link v2 - the "usb-stick" ?

2. Version of st-link firmware on it ?

3. Use with ..IDE or CubeProgrammer (on Linux, i use it also) ?

4. Check with CubeProgrammer - connect - what it telling ?

If you feel a post has answered your question, please click "Accept as Solution".

There are low cost CMSIS-DAP dongles if you need such things.

There is also a tool to convert ST-LINK/V2-1 to Segger J-LINK OB

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
Andrew Neil
Evangelist III

@Andreas_Engineer wrote:

this ST-Link V2


What "ST-Link V2"? Did you mean to add a photo or link?

Beware that any so-called "ST-Link V2" looking like this:

AndrewNeil_0-1707748264048.jpeg

is not a genuine ST product - so you get what you pay for!

 

I am getting the same error on a genuine ST Link v2. My StLink looks like https://uk.farnell.com/stmicroelectronics/st-link-v2/icd-programmer-for-stm8-stm32/dp/1892523

stLink.jpg

tonyMakkiel
Associate II

I have been using CubeIde 1.10.0. But as part of project migration had to upgrade to 1.15.0. But the ide wont download the application image till I upgrade the firmware of StLink. Unfortunately, stuck with the STLink firmware upgrade!

again:

4. Check with CubeProgrammer - connect - what it telling ?

If you feel a post has answered your question, please click "Accept as Solution".

Please see below.

I tried to upgrade the firmware using CubeProgrammer too. Unfortunately it reports STLinkUpgrade.jar not found.
image.pngimage.png

1. voltage 0,6V -> VDD is not connected to st-link (refuses to work usually), connect this vdd .

2. Data read success. -- no error here.

3. What shows CubeProgrammer if you just connect to your target cpu ?

If you feel a post has answered your question, please click "Accept as Solution".

1. Why does it require the target VDD to be connected to update st-link firmware? Isn't it powered by the USB host bus? The target does not expose VDD. We only use SWDIO,SWDCLK and GND.
3. The log above is when I click connect. It shows no error. So I guess, I will be able to flash the target images. But not be able to debug from CubeIde without updating st-link firmware.

 

I am guessing the flash size check of st-link was added recently? Can you please let me know the last version of the IDE which does not have this check? I guess I will have to revert to that version till this is fixed.