cancel
Showing results for 
Search instead for 
Did you mean: 

Fail to execute MI command -- error message from debugger back end -- error erasing flash with vFlashErase packet

Jorge Jacome
Associate II

Hi everyone

I start using CubeIde v1.3.1 with a Nucleo board recently , the first project --toogle LED

It was everything OK,was able to download ,debug and run the program into the Nucleo until

I think I did an update of the ST-Link; and since then I am having a headache of what went wrong, with the message reported on the question title.

Using St-link utility v4.5 or CubeProgrammer v2.4 I am able to connect to the Nucleo and see some values on the corresponding addresses which I believe values are corresponding to the last

time was on line with the board.

St-link firmware version V2J36M26.

In the same situation with F103C8T6 blue pill board

Any clues to overcome with this problem, would be appreciated.

Jorge

19 REPLIES 19

Not to distract from the original topic of the post, but I have not seen a listing for a CubeProg 2.5.0 so I am not sure if that is out. However, the CLI tools from 2.4.0 do work with the V3J7M2 FW. It's the GUI that is not so happy with that version of FW and wants V3J5M2 instead which is a couple revs back; before CubeIDE 1.3.0.

Looking within STM32CubeIDE install .\STM32_Programmer_CLI.exe --version

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

                      STM32CubeProgrammer v2.5.0-RC1

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

STM32CubeProgrammer version: 2.5.0-RC1

or doing some debug part of console

0693W000003C5G0QAK.jpg

JMors.1
Associate III

Perhaps this needs its own thread, but it is interesting they would include a Release Candidate (RC) with the IDE let alone an RC1. That means it is not released. Since I did an upgrade from 1.3.0 to 1.4.1, there are both the 2.4.0 and 2.5.0-RC1 plugins installed. Maybe I'll open another topic for this.

Both installed is regular way of working if Eclipse from what I know. Obviously Eclipse always consider the one related to main application bundle not both.

I.e. if 1.4.1 installed only 2.5.0 will be used.

Keeping both is Eclipse way of working allowing you to revert 1.4.1 update back to 1.3.x.

Having RC is not hurting me as far as such RC is final release candidate.

PEnright
Associate II

I am sorry, but I am a little lost in this thread, am I doing something wrong or is there an issue with 1.4.1?

I am running the upload through the IDE by right clicking on the project and picking "debug as".

I did see the talk about CubeProg. I found a program "C:\Program Files\STMicroelectronics\STM32Cube\STM32CubeProgrammer\bin\STM32CubeProgrammer.exe" The file properties "Product Version" is 2.4.0. If I double click on it a splash screen flashes and goes away. Should i be able to run it that way or does it have to launch via the IDE? Any suggestions on how to troubleshoot (divide and conquer)?

Again the "C:\Program Files (x86)\STMicroelectronics\STM32 ST-LINK Utility\ST-LINK Utility\STM32 ST-LINK Utility.exe" works. Product version is 4.5.0.0.

As I was typing this I notice one is 64bit and the other is 32. I am running 64bit windows 7. Is this my issue?

Yeah, sorry, it got off on a different direction.

Are you seeing the "Failed to execute MI command" errors?

If so, check the "External Loader" setting in your Debug Configuration under Debugger.

If it is not set, set it to the appropriate Loader for your board.

No biggie, I tend to do that also. Still got an error, but this time I had the log checked also.

Screen shot of my config page ...

Copy and paste of the details. This makes me think I am misunderstanding the issue. As I said, if I zero out the memory with STLink utility, then program with the IDE, even with the error if I press restart the test blink works or at least the led blinks. :)

 
STMicroelectronics ST-LINK GDB server. Version 5.6.0
Copyright (c) 2020, STMicroelectronics. All rights reserved.
 
Starting server with the following options:
        Persistent Mode            : Disabled
        LogFile Name               : C:\Users\paulenright\STM32CubeIDE\workspace_1.3.0\testblink\Debug\st-link_gdbserver_log.txt
        Logging Level              : 31
        Listen Port Number         : 61234
        Status Refresh Delay       : 15s
        Verbose Mode               : Enabled
        SWD Debug                  : Enabled
 
Target connection mode: Attach
Hardware watchpoint supported by the target 
COM frequency = 4000 kHz
ST-LINK Firmware version : V2J37S7
Device ID: 0x410
PC: 0x900001
ST-LINK device status: RUN_MODE
ST-LINK detects target voltage = 3.25 V
ST-LINK device status: RUN_MODE
ST-LINK device initialization OK
Waiting for debugger connection...
Waiting for connection on port 61234...
Accepted connection on port 61234...
Debugger connected
Try halt...
ST-LINK device status: HALT_MODE
 ------ Switching to STM32CubeProgrammer ----- 
      -------------------------------------------------------------------
                       STM32CubeProgrammer v2.5.0-RC1                  
      -------------------------------------------------------------------
 
 
 
Log output file:   C:\Users\PAULEN~1\AppData\Local\Temp\STM32CubeProgrammer_a14680.log
ST-LINK SN  : 54FF70066782544811281767
ST-LINK FW  : V2J37S7
Board       : --
Voltage     : 3.54V
SWD freq    : 4000 KHz
Connect mode: Under Reset
Reset mode  : Hardware reset
Device ID   : 0x410
Revision ID : Rev X
Device name : STM32F101/F102/F103 Medium-density
Flash size  : 128 KBytes
Device type : MCU
Device CPU  : Cortex-M3
 
 
 
Memory Programming ...
Opening and parsing file: ST-LINK_GDB_server_a14680.srec
  File          : ST-LINK_GDB_server_a14680.srec
  Size          : 5624 Bytes
  Address       : 0x08000000 
 
 
Erasing memory corresponding to segment 0:
Erasing internal memory sectors [0 5]
Download in Progress:
�������������������������������������������������� 0%
�������������������������������������������������� 100%
 
File download complete
Time elapsed during download operation: 00:00:00.442
 
 
 
Verifying ...
 
 
Read progress:
�������������������������������������������������� 50%
 
 
Error: Failed to read memory at address 0x08000000 during verification
 
 
Error: Download verification failed
 
 
Encountered Error when opening C:\ST\STM32CubeIDE_1.3.0\STM32CubeIDE\plugins\com.st.stm32cube.ide.mcu.externaltools.cubeprogrammer.win32_1.4.0.202007081208\tools\bin\STM32_Programmer_CLI.exe
 ------ Switching context ----- 
Error in STM32CubeProgrammer
Debugger connection lost.
Shutting down...
 

I was going to post the log but it made the post too long, so I am trying to attach it.

@PEnright​ 

C:\Program Files\STMicroelectronics\STM32Cube\STM32CubeProgrammer\bin\STM32CubeProgrammer.exe is STM32CubeProgrammer standalone product having its own UI.

If STM32CubeIDE usage relying on "debug as" CubeProgrammer may be (depends on selected probe) used too but possibly not same binary (depends on which product releases you're relying on). Fact is STM32CubeIDE is embedding its own Cubeprogrammer.

STM32CubeProgrammer is one product, STM32CubeIDE another.

Cartu38 OpenDev
Lead II

Have a try based on OpenOCD usage too ... CubeProgrammer usage is skipped here.

0693W000003C5vXQAS.jpg

Hello Sir,

i am facing the same error with using touchgfx v.4.22.1 and cubeide v1.13.2.
can u please provide me the solution for same..

where i am going wrong