cancel
Showing results for 
Search instead for 
Did you mean: 

ST-Link upgrade error on Nucleo F446RE

aro
Associate II

I run CubeIDE on Linux and when I want to Debug, it prompts for an ST-link upgrade. I click Yes and I get screenshot no. 1. The ST-LINK ID displayed there is correct, I get the same ID with "st-info --probe".

Then I click on Open in update mode, and I get the error in screenshot no. 2. Any ideas would be greatly appreciated.

9 REPLIES 9
Imen.D
ST Employee

Hello @aro and welcome to the Community 🙂

Have you checked if this behavior has occurred with other boards?

Does it work with STM32CubeProgrammer?

When your question is answered, please close this topic by clicking "Accept as Solution".
Thanks
Imen
AScha.3
Chief II

Try another usb cable, try on other usb plug ; and direct connection, no HUB on the line.

 

+

If ignore/dont update, can you debug the board ?

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

I guess it's ok now, but pretty strange.

I plugged the USB cable directly into the computer instead of the hub, but no luck. Tried another cable, still nothing.

My PC is dual  boot, so I booted into Windows and installed CubeIDE and the package. When running the debug configuration, it asked for the update just like in screenshot 1. Unlike in Linux, the firmware was updated successfully in Windows. After this I rebooted into Linux and was able to run the debug configuration without any issues.

I then tried in Linux my 32F746G Discovery board. Same issue like screenshot 2 for this device ID. I rebooted into Windows and did the same thing for the Disco board. It asked to update the firmware and it updated successfully. Then I rebooted in Linux and was able to run successfully the debug configuration for this device ID.

I am very curious; what exactly is happening during the update in the screenshots? What did Windows update that make the boards work in Linux? Thank you

Pavel A.
Evangelist III

What did Windows update that make the boards work in Linux? 

It has updated the firmware ))  So now CubeIDE on Linux sees the new version and does not want to update it anymore.

> It has updated the firmware )) 

Duh ... lol  Thanks. So, at this point my boards work in Linux thanks to Windows.

I'm happy they work, but I'm wondering why in Linux it suddenly can't see the board anymore as soon as I click on 'Open in update mode'...

Thats new "symptom" .... on my IDE 1.13.1 (on Linux) no problems .

What versions you have on Linux + Win ?

 

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

On Linux it's 1.12.0 and on Windows I think 1.14.1.

I just tried again on Linux. I opened CubeIDE, Help -> ST-LINK Upgrade. I clicked on 'Open in update mode' and same error. I restarted CubeIDE and followed the same steps again and this time it worked. Same thing with the other board.

At least now it works on Linux. Sometimes. I might not have to use Windows next time, if I try several times until it works.

Pavel A.
Evangelist III

 I'm wondering why in Linux it suddenly can't see the board anymore as soon as I click on 'Open in update mode'...

To understand this, think what means the "update mode". The updater tells the ST-Link firmware to simulate disconnect (likely, do software reset) and then expose a different USB interface to the host - which the updater expects to detect after a short delay. Something fails in this procedure. Windows is one, but Linuxes are many. Everyone can build their own kernel, USB drivers... because of this, Linuxes are so hard to support. As someone said - "Linux is free, but not cheap".

 

aro
Associate II

Very true. Depending on what you use Linux for, it can work 100%. For some things though it can work only, say, 95%, and you end up spending a ton of time on figuring out the remaining 5%. I did spend some time on it and it looks like I found a repeatable behavior.

When I run "lsusb" the board is listed there.

When I run "st-info --probe" to see the details of the board, it returns this

st-info --probe
Found 1 stlink programmers
  version:    V2J41S27
  serial:     0670FF505356867767065641
  flash:      1048576 (pagesize: 2048)
  sram:       327680
  chipid:     0x449
  dev-type:   STM32F74x_F75x

Ok, everything looks good, but this stage is exactly when I get the error in CubeIDE when running the ST-link updater.

What I do is unplug the board, plug it back in and I DO NOT run "st-info --probe". If I don't run that command, the updater is perfectly fine, time after time. If I do run the command and it returns all that fine information, the updater will simply not work.

I'm very curious why "st-info --probe" causes that behavior, but it's probably one of those rabbit holes in Linux where you spend a lot of time with very little return.