Skip to main content
Associate
April 2, 2024
Question

Encountered Error when opening STM32_Programmer_CLI.exe

  • April 2, 2024
  • 12 replies
  • 11106 views

Hi! I'm trying to flash a STM32H723ZG with STM32CubeIDE 1.14.0 and ST-LINK V2

and use OSPI peripheral to communicate with the W25Q256 external flash as QSPI

and I have this error:

(I have tried all the suggestions given in the community to solve this problem, but I still haven't got any results.

The only way I could get the result was using STMcubeIDE version 0.4.

Do you have any suggestion to fix this problem in higher versions? Thank you)

 

ST-LINK FW : V2J44S7

Board : --

Voltage : 1.58V

JTAG freq : 9000 KHz

Connect mode: Under Reset

Reset mode : Hardware reset

Device ID : 0x483

Revision ID : Rev Z

Device name : STM32H72x/STM32H73x

Flash size : 1 MBytes

Device type : MCU

Device CPU : Cortex-M7

BL Version : 0x93

 

 

 

Memory Programming ...

Opening and parsing file: ST-LINK_GDB_server_a03076.srec

File : ST-LINK_GDB_server_a03076.srec

Size : 195.92 KB

Address : 0x08000000

 

 

Erasing memory corresponding to segment 0:

Erasing internal memory sector 0

Erasing memory corresponding to segment 1:

Erasing external memory sectors [0 1]

Download in Progress:

 

 

Error: failed to download Segment[0]

Error: failed to download the File

Encountered Error when opening C:\ST\STM32CubeIDE_1.14.0\STM32CubeIDE\plugins\com.st.stm32cube.ide.mcu.externaltools.cubeprogrammer.win32_2.1.100.202311100844\tools\bin\STM32_Programmer_CLI.exe

Error in STM32CubeProgrammer

Shutting down...

Exit.

    12 replies

    Pavel A.
    Super User
    September 8, 2024

    The problem is that Microsoft, in their alternative wisdom, decided to change TL;DR  the way how Windows executables specify "well known" system DLLs (user32, kernel32 etc etc) and the "new order" executables no longer run on old OS without crutches. One still can build "old style" executables with Microsoft "WinXP compatible" toolchain or GNU tools.

    Associate II
    September 11, 2024

    This issue has nothing got to do with Microsoft. 

    The problem is with STM32_programmer_CLI.exe that is installed by STM32CubeIDE. 

    It needs api-ms-win-core-synch-l1-2-0.dll. and is searching for an entry point "CreateEventW" in THAT dll. 

    But that dll is empty. Hence the error. 

    I checked the dlls that is installed by vscode. 

    The funny thing is THIS entry point in the file api-ms-core-synch-l1-1.0.dll 

    STM32_programmer_CLI.exe searches for the entry point in the wrong dll. 

    The said entry point is in the dll api-ms-win-core-synch-l1-1-0.dll and not in api-ms-win-core-synch-l1-2.0.dll 

    That is the issue. STM engineers should look into this and correct the code that ships with the version of some of their earlier versions. They might have corrected this the version meant for windows 10 or 11. 

    BTW stopping of support of windows 7 is the business of Microsoft. Windows 7 is the most stable version. They will bring new versions having functionality that most users do not want, but shall force upgradations. That is business. There could be lakhs of computers still using windows 7 out there. I have seen some customers still using windows 95 happily. As a software designer, I have implemented my software to work on both widows 7 and windows 10. Why can't STM do that ? Upgrading windows means upgrading hardware too which is not easy, cost wise and time wise. 

    Pavel A.
    Super User
    September 11, 2024

    As I wrote these api-ms-win... DLLs are not real. They are facade of so called "API Sets". See here

     As a software designer, I have implemented my software to work on both widows 7 and windows 10. Why can't STM do that ?

    More testing and support work, one can guess. This is extra cost.

    Upgrading windows means upgrading hardware too which is not easy, cost wise and time wise. 

    True, but overall minimizing the support surface to one-two latest software and hardware versions yields more savings than expenses. All these remaining users with win7 and older do not have enough business power to keep these versions  supported.

    Visitor II
    May 18, 2025

    Hi dear dwJavad. I have the same problem now and it's really bothering me. If this problem has been solved for you, please help me too. Thank you, good luck always.

    I wrote a custom stldr file for w25q256 that works perfectly. But it has exactly the same problem as you in stm32qubeide.

    my versions are:

    stm32qubeide 1.18.1 

    st32qubeprogrammer is 2.19.0

     

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

    STM32CubeProgrammer v2.19.0

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

     

     

     

    Log output file: C:\Users\sm\AppData\Local\Temp\STM32CubeProgrammer_a00588.log

    ST-LINK SN : 54FF6F066578555522450967

    ST-LINK FW : V2J46S7

    Board : --

    Voltage : 3.21V

    SWD freq : 4000 KHz

    Connect mode: Under Reset

    Reset mode : Hardware reset

    Device ID : 0x483

    Revision ID : Rev Z

    Device name : STM32H72x/STM32H73x

    Flash size : 1 MBytes

    Device type : MCU

    Device CPU : Cortex-M7

    BL Version : 0x93

     

    Opening and parsing file: ST-LINK_GDB_server_a00588.srec

     

     

    Memory Programming ...

    File : ST-LINK_GDB_server_a00588.srec

    Size : 778.50 KB

    Address : 0x08000000

     

     

     

    Erasing memory corresponding to sector 0:

    Erasing internal memory sector 0

     

    Erasing memory corresponding to sector 0:

    Erasing external memory sectors [0 11]

    Download in Progress:

     

     

    Error: failed to download Sector[0]

    Error: failed to download the File

    Encountered Error when opening C:\Program Files\STMicroelectronics\STM32Cube\STM32CubeIDE_1.18.1\STM32CubeIDE\plugins\com.st.stm32cube.ide.mcu.externaltools.cubeprogrammer.win32_2.2.100.202412061334\tools\bin\STM32_Programmer_CLI.exe

    Error in STM32CubeProgrammer

    Shutting down...

    Exit.

     

    STM32CubeProgrammer v2.19.0

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

     

    Log output file: C:\Users\sm\AppData\Local\Temp\STM32CubeProgrammer_a00588.log

    ST-LINK SN : 54FF6F066578555522450967

    ST-LINK FW : V2J46S7

    Board : --

    Voltage : 3.21V

    SWD freq : 4000 KHz

    Connect mode: Under Reset

    Reset mode : Hardware reset

    Device ID : 0x483

    Revision ID : Rev Z

    Device name : STM32H72x/STM32H73x

    Flash size : 1 MBytes

    Device type : MCU

    Device CPU : Cortex-M7

    BL Version : 0x93

     

    Opening and parsing file: ST-LINK_GDB_server_a00588.srec

     

     

    Memory Programming ...

    File : ST-LINK_GDB_server_a00588.srec

    Size : 778.50 KB

    Address : 0x08000000

     

    Erasing memory corresponding to sector 0:

    Erasing internal memory sector 0

     

    Erasing memory corresponding to sector 0:

    Erasing external memory sectors [0 11]

    Download in Progress:

     

     

    Error: failed to download Sector[0]

    Error: failed to download the File

    Encountered Error when opening C:\Program Files\STMicroelectronics\STM32Cube\STM32CubeIDE_1.18.1\STM32CubeIDE\plugins\com.st.stm32cube.ide.mcu.externaltools.cubeprogrammer.win32_2.2.100.202412061334\tools\bin\STM32_Programmer_CLI.exe

    Error in STM32CubeProgrammer

    Shutting down...

    Exit.

    dwJavadAuthor
    Associate
    September 28, 2025

    Hi dear sm21.

    I had to change the MCU

    The only way I was able to program the previous microcontroller was by using the plugins from older versions of the IDE.

    However, debugging is not possible with this method.

    The IDE version I used is mentioned in the previous comments.