Skip to main content
mkrug
Associate III
December 7, 2021
Question

STM32Cube IDE v1.8 not be able to download to Discovery L5 board anymore

  • December 7, 2021
  • 8 replies
  • 4617 views

I upgraded to v1.8 and realized that my programs cannot be downloaded anymore to my discovery STM32L5 board. The error message says:

Erasing memory corresponding to segment 0:

Erasing internal memory sectors [0 9]

Download in Progress:

Error: Fail to write buffer in flash

Error: failed to erase memory

Upto that message all other status messages looks fine. I assume it is related to ST-LINK GDB server. Version 6.0.0 because in STM32Cube IDE this was version 5.x.x.

The STM32Programmer is still able to download to the board. If I connect the STM32Programmer right after an unsuccessful download of STM32CubeIDE I can see that parts of the memory get deleted but not programmed correct afterwards (see screenshot attached). The first 8 Bytes are correct. After that only erased memory cells are shown.

Would be great if this can be fixed soon.

Best Regards

Markus

This topic has been closed for replies.

8 replies

Technical Moderator
December 8, 2021

Hello @Community member​ ,

Try to upgrade the ST-Link firmware version, then please tell us if your issue persists.

Imen

In order to give better visibility on the answered topics, please click on 'Best answer' on the reply which solved your issue or answered your question. Thanks
mkrug
mkrugAuthor
Associate III
December 8, 2021

Hi Imen,

same as for Nikita. I'm using the firmware version V3J9M3. I actually tried V3J8M3 and had the same issue with STM32CubeIDE 1.8 but not with 1.7

Best Regards

Markus

Nikita91
Lead II
December 8, 2021

What is the latest ST-Link firmware version?

As the NUCLEO boards were new, STM32CubeIDE imposed to update the ST-Link firmware on first use.

STM32CubeProgrammer and STM32CubeIDE report the version V3J9M3

Now I'm afraid to connect my other boards to STM32CubeIDE because there is a risk of rendering them inoperative...

Markus GIRDLAND
ST Employee
December 9, 2021

Could you try to run ST-Link GDB server in 1.7.0 and in 1.8.0 and activate the gdb server log in your debug configurations and then send the logs to me?

Nikita91
Lead II
December 9, 2021
Hello,
Here are the GDB logs
Thank you
Markus GIRDLAND
ST Employee
December 13, 2021

I don't see any attached logs. You can either attach them to the forum reply or send them directly in a private message to me!

Nikita91
Lead II
January 14, 2022

@Markus GIRDLAND​  Any news about the fix of debug bugs of CubeIDE 1.8.0 ?

Markus GIRDLAND
ST Employee
January 20, 2022

I haven't been able to reproduce.

My initial thought is that it could be firewall and/or antivirus related.

Could you try to connect to remote GDB server? Perhaps first through the debug configuration (debugger tab) and if that doesn't work through a command interface?

You can see the command line used by clicking the "Show Command Line" button in the debugger tab.

YLin.6
Visitor II
January 19, 2022

got same prob.

truhann
Associate
February 3, 2022

Same problem on our side. 1.7.0 works, 1.8.0 not.

mattias norlander
ST Employee
March 8, 2022

Could you try to see if this is working in CubeIDE 1.9.0?

In 1.9.0 (released yesterday) we have:

  • Better auto-negotiation of SWD frequency. On some boards the communication is not stable and the user had to manually select a lower freq. CubeProg stand-alone could already managed auto-negotiation of the SWD freq. But now it is also supported in ST-LINK GDB server. Could explain why it worked in CubeProg but not GDB server... So either try 1.9.0 or manually lower the swd freq in 1.8.0 in debug config.
  • There is also a bit more verbose logging in the GDB server which could give us more hints
  • The launch and terminate sequence of debug has been improved. First dirty-fix came already in 1.8.0. In 1.9.0 we have up-streamed fixes to the CDT platform to get rid of an identified race condition which left ST-LINK in a bad state.

It would also be interesting to know if the CubeProg_CLI version bundled inside the CubeIDE 1.8.0 installation is able to flash program the L5. It is found here:

C:\ST\STM32CubeIDE_1.8.0\STM32CubeIDE\plugins\com.st.stm32cube.ide.mcu.externaltools.cubeprogrammer.win32_2.0.100.202110141430\tools\bin\

  • You can replace this bin folder with the same folder from the 1.7.0 installation as well, to try to see if that fixes the issue or not. That would help us rule out CubeProg or not...
    • Of course remember to make copy of the bin folder.

Please share your findings!

Nikita91
Lead II
March 8, 2022

Uninstall CubeIDE 1.6.1

Reboot

Install CubeIDE 1.9

Start and build a new project for NUCLEO-F446RE

Start a debug session: OK

Start again a debug session: ST-LINK_gdbserver.exe not found!!!!!!!!!!!!!

ST-LINK_gdbserver.exe disappeared from the folder .../tools/bin

Then:

Uninstall CubeIDE 1.9

Install again

Save the file ST-LINK_gdbserver.exe

Debug session OK

Debug session fail: ST-LINK_gdbserver.exe not found

Then try to restore ST-LINK_gdbserver.exe =>

Invalid permission. Even as administrator I cannot restore it in the folder.

I give up for today...

Nikita91
Lead II
March 9, 2022

The 1.9 problem was related to Avast antivirus who quarantined silently some files...

With quarantine exceptions, Cube 1.9 works for me.