cancel
Showing results for 
Search instead for 
Did you mean: 

STM32CubeIDE updated stlink on a stm32H743-EVALv2 board to V3J4M2, but then is unable to program the board.

Brian Khuu
Associate III

Was able to program the board previously, but today after updating my STM32CubeIDE, it refused to run debug until I updated the stlink on my dev board.

But upon doing so, it gave these error. Essentially meaning I cannot program my dev board.

```

STMicroelectronics ST-LINK GDB server. Version 5.3.2

Copyright (c) 2019, STMicroelectronics. All rights reserved.

Starting server with the following options:

    Persistent Mode      : Disabled

    Logging Level       : 1

    Listen Port Number     : 61234

    Status Refresh Delay    : 15s

    Verbose Mode        : Disabled

    SWD Debug         : Enabled

Waiting for debugger connection...

Debugger connected

   -------------------------------------------------------------------

            STM32CubeProgrammer v2.2.0          

   -------------------------------------------------------------------

Log output file:  /tmp/STM32CubeProgrammer_TqQf5t.log

ST-LINK SN : 002F001F3137511233333639

ST-LINK FW : V3J4M2

Voltage   : 3.28V

SWD freq  : 24000 KHz

Connect mode: Under Reset

Reset mode : Hardware reset

Cannot identify the device

Error: unknown or unsupported device (DevID = 0x0000)

Memory Programming ...

Opening and parsing file: ST-LINK_GDB_server_QKNgwM.srec

 File     : ST-LINK_GDB_server_QKNgwM.srec

 Size     : 157296 Bytes

 Address    : 0x08000000 

Erasing memory corresponding to segment 0:

Download in Progress:

File download complete

Time elapsed during download operation: 00:00:00.199

Verifying ...

Error: Data mismatch found at address 0x08000004 (byte = 0x31 instead of 0x5D)

Error: Download verification failed

Encountered Error when opening /Applications/STM32CubeIDE.app/Contents/Eclipse/plugins/com.st.stm32cube.ide.mcu.externaltools.cubeprogrammer.macos64_1.1.0.201910081157/tools/bin/STM32_Programmer_CLI

Error in STM32CubeProgrammer

Debugger connection lost.

Shutting down...

```

I am running this IDE on a mac on MacOS catalina. Oh and btw I still cannot run latest STM32CubeProgrammer on mac, even after updating java to latest version.

29 REPLIES 29

And the stand-alone updater V3J5M2

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
Ayberk Özgür
Associate II

I have the same problem, I don't know if it relates to any update.

OpenOCD from within STM32CubeIDE works.

@Nawres GHARBI​  @Imen DAHMEN​  @Amel NASRI​  as this seems to be a recurrent issue can we get a review/feedback as to whether this problem has been identified or reproduced.

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

Sorry, I gave up.

I have other things to do (just taken delivery of a new laser-cutter :) and I'll come back to this some time next year. Perhaps there'll have been an update by then.

hansd56
Senior II

No problems here. Board Nucleo-H743ZI2 CubeIDE 1.1

STMicroelectronics ST-LINK GDB server. Version 5.3.2

Copyright (c) 2019, STMicroelectronics. All rights reserved.

Starting server with the following options:

       Persistent Mode           : Disabled

       Logging Level             : 1

       Listen Port Number        : 61234

       Status Refresh Delay      : 15s

       Verbose Mode              : Disabled

       SWD Debug                 : Enabled

       InitWhile                 : Enabled

Waiting for debugger connection...

Debugger connected

     -------------------------------------------------------------------

                      STM32CubeProgrammer v2.2.0                 

     -------------------------------------------------------------------

Log output file:  C:\Users\hansd\AppData\Local\Temp\STM32CubeProgrammer_a16280.log

ST-LINK SN : 002000463137510939383538

ST-LINK FW : V3J4M2

Voltage    : 3.30V

SWD freq   : 24000 KHz

Connect mode: Under Reset

Reset mode : Hardware reset

Device ID  : 0x450

Device name : STM32H7xx

Flash size : 2 MBytes

Device type : MCU

Device CPU : Cortex-M7

Memory Programming ...

Opening and parsing file: ST-LINK_GDB_server_a16280.srec

 File         : ST-LINK_GDB_server_a16280.srec

 Size         : 5500 Bytes

 Address      : 0x08000000

Erasing memory corresponding to segment 0:

Erasing internal memory sector 0

Download in Progress:

File download complete

Time elapsed during download operation: 00:00:01.052

Verifying ...

Download verified successfully

Just a reminder that the stand-alone update tool is V3J5 already (+1 month)

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

Maybe useful to mention that in my case, the problem seems to be intermittent and hard to track down; it could be tied to a specific binary or size of binary. Now that I developed more code, I'm not able to reproduce it anymore.

RBoer
Associate II

Same here, everything worked fine with STM32CubeIDE originally installed on mojave and a few weeks ago upgraded to 1.1.0 on macOS catalina. Was working fine even today, uploaded/debugged multiple times, up until the point where it forced me to update the firmware of the stlink-v2 and after that the problems started.

Error: Data mismatch found at address 0x08000188 (byte = 0x00 instead of 0xFF)

Error: Download verification failed

Downgraded the firmware to to V2J33S7 using an older st-link utility which I had installed in the vm, but then cubeIDE on OSX insists again on upgrading to V2J34S7

Downloaded stsw utility which can upgrade to an even newer version V2J35S7, but the above errors when debugging remain.

Accessing, clear, write/verify using stm3cubeprogrammer works fine within a vmware virtual machine.

Installed stm32cubeide 1.1.0 in the windows-VM and it also works, without any problems on stlink-v2 with fw V2J35S7...

stm32cubeIde on macOS seems to be unusable/broken now.

Disappointing, because I actually liked it (while it worked).

Note: Stm32cubeprogrammer also doesn't work under osx, there's other posts in the forum reporting on that, something with java - gave up on getting that to work.

Brian Khuu
Associate III

Just in case people are still having problems. I've bypassed the problem by using OpenOCD on my mac. To use OpenOCD, you could refer to my example repo below

https://github.com/mofosyne/stm32h7xx-cubemx-makefile-openocd-gdbgui-example

This may not work for those who need to use an IDE, but if you are in a bind. This may help.

To program `make swd`

To debug with gdbgui `make swd-gdbgui`

To see the commands I used for `make swd` check https://github.com/mofosyne/stm32h7xx-cubemx-makefile-openocd-gdbgui-example/blob/master/Makefile#L214

Feel free to poke me if you have any issues.

Brian Khuu
Associate III

Also take note that in Spaced Cowboy's thread, two individuals was able to switch their IDE to use OpenOCD, so you can use that option as well.

> Hey, I had the same issue and resolved it by setting Debug Configurations -> Debugger -> Debug probe = ST-LINK (OpenOCD)

> I can confirm: changing `ST-LINK (ST-LINK GBD server)` to -> `ST-LINK (OpenOCD)` does work!!!