cancel
Showing results for 
Search instead for 
Did you mean: 

invoke STM32Cube Programmer CLI using Windows PowerShell

BJian
Associate

Hi there,

I tried to invoke STM32Cube Programmer CLI using Windows PowerShell, the program download is successful, but there's many "device not open" warning:

PS C:\Program Files (x86)\STMicroelectronics\STM32Cube\STM32CubeProgrammer\bin> stm32_programmer_cli.exe -c port=swd -d
E:\STM32F302R8-Nucleo.elf
      -------------------------------------------------------------------
                       STM32CubeProgrammer v1.4.0
      -------------------------------------------------------------------
 
ST-LINK SN  : 066FFF545050807567213347
ST-LINK FW  : V2J33M25
Voltage     : 3.27V
SWD freq    : 4000 KHz
Connect mode: Normal
Reset mode  : Software reset
Device ID   : 0x439
Device name : STM32F301x4-x6-x8/STM32F302x4-x6-x8/F318xx
Flash size  : 64 KBytes
Device type : MCU
Device CPU  : Cortex-M4
 
 
 
Memory Programming ...
Opening and parsing file: STM32F302R8-Nucleo.elf
QIODevice::read (QFile, "E:\STM32F302R8-Nucleo.elf"): device not open
QFileDevice::seek: IODevice is not open
QIODevice::read (QFile, "E:\STM32F302R8-Nucleo.elf"): device not open
QIODevice::read (QFile, "E:\STM32F302R8-Nucleo.elf"): device not open
QFileDevice::seek: IODevice is not open
QIODevice::read (QFile, "E:\STM32F302R8-Nucleo.elf"): device not open
QIODevice::read (QFile, "E:\STM32F302R8-Nucleo.elf"): device not open
QFileDevice::seek: IODevice is not open
QIODevice::read (QFile, "E:\STM32F302R8-Nucleo.elf"): device not open
QIODevice::read (QFile, "E:\STM32F302R8-Nucleo.elf"): device not open
QFileDevice::seek: IODevice is not open
QIODevice::read (QFile, "E:\STM32F302R8-Nucleo.elf"): device not open
QIODevice::read (QFile, "E:\STM32F302R8-Nucleo.elf"): device not open
QFileDevice::seek: IODevice is not open
QIODevice::read (QFile, "E:\STM32F302R8-Nucleo.elf"): device not open
QIODevice::read (QFile, "E:\STM32F302R8-Nucleo.elf"): device not open
QFileDevice::seek: IODevice is not open
QIODevice::read (QFile, "E:\STM32F302R8-Nucleo.elf"): device not open
QIODevice::read (QFile, "E:\STM32F302R8-Nucleo.elf"): device not open
QFileDevice::seek: IODevice is not open
QIODevice::read (QFile, "E:\STM32F302R8-Nucleo.elf"): device not open
QIODevice::read (QFile, "E:\STM32F302R8-Nucleo.elf"): device not open
QFileDevice::seek: IODevice is not open
QIODevice::read (QFile, "E:\STM32F302R8-Nucleo.elf"): device not open
QIODevice::read (QFile, "E:\STM32F302R8-Nucleo.elf"): device not open
QFileDevice::seek: IODevice is not open
QIODevice::read (QFile, "E:\STM32F302R8-Nucleo.elf"): device not open
QIODevice::read (QFile, "E:\STM32F302R8-Nucleo.elf"): device not open
QFileDevice::seek: IODevice is not open
QIODevice::read (QFile, "E:\STM32F302R8-Nucleo.elf"): device not open
QIODevice::read (QFile, "E:\STM32F302R8-Nucleo.elf"): device not open
QFileDevice::seek: IODevice is not open
QIODevice::read (QFile, "E:\STM32F302R8-Nucleo.elf"): device not open
QIODevice::read (QFile, "E:\STM32F302R8-Nucleo.elf"): device not open
QFileDevice::seek: IODevice is not open
QIODevice::read (QFile, "E:\STM32F302R8-Nucleo.elf"): device not open
QIODevice::read (QFile, "E:\STM32F302R8-Nucleo.elf"): device not open
QFileDevice::seek: IODevice is not open
QIODevice::read (QFile, "E:\STM32F302R8-Nucleo.elf"): device not open
QIODevice::read (QFile, "E:\STM32F302R8-Nucleo.elf"): device not open
QFileDevice::seek: IODevice is not open
QIODevice::read (QFile, "E:\STM32F302R8-Nucleo.elf"): device not open
QIODevice::read (QFile, "E:\STM32F302R8-Nucleo.elf"): device not open
QFileDevice::seek: IODevice is not open
QIODevice::read (QFile, "E:\STM32F302R8-Nucleo.elf"): device not open
QIODevice::read (QFile, "E:\STM32F302R8-Nucleo.elf"): device not open
QFileDevice::seek: IODevice is not open
QIODevice::read (QFile, "E:\STM32F302R8-Nucleo.elf"): device not open
QIODevice::read (QFile, "E:\STM32F302R8-Nucleo.elf"): device not open
QFileDevice::seek: IODevice is not open
QIODevice::read (QFile, "E:\STM32F302R8-Nucleo.elf"): device not open
QIODevice::read (QFile, "E:\STM32F302R8-Nucleo.elf"): device not open
QFileDevice::seek: IODevice is not open
QIODevice::read (QFile, "E:\STM32F302R8-Nucleo.elf"): device not open
QIODevice::read (QFile, "E:\STM32F302R8-Nucleo.elf"): device not open
QFileDevice::seek: IODevice is not open
QIODevice::read (QFile, "E:\STM32F302R8-Nucleo.elf"): device not open
QIODevice::read (QFile, "E:\STM32F302R8-Nucleo.elf"): device not open
QFileDevice::seek: IODevice is not open
QIODevice::read (QFile, "E:\STM32F302R8-Nucleo.elf"): device not open
QIODevice::read (QFile, "E:\STM32F302R8-Nucleo.elf"): device not open
QFileDevice::seek: IODevice is not open
QIODevice::read (QFile, "E:\STM32F302R8-Nucleo.elf"): device not open
QIODevice::read (QFile, "E:\STM32F302R8-Nucleo.elf"): device not open
QFileDevice::seek: IODevice is not open
QIODevice::read (QFile, "E:\STM32F302R8-Nucleo.elf"): device not open
QIODevice::read (QFile, "E:\STM32F302R8-Nucleo.elf"): device not open
QFileDevice::seek: IODevice is not open
QIODevice::read (QFile, "E:\STM32F302R8-Nucleo.elf"): device not open
  File          : STM32F302R8-Nucleo.elf
  Size          : 3420 Bytes
  Address       : 0x08000000
 
 
Erasing memory corresponding to segment 0:
Erasing internal memory sectors [0 1]
Download in Progress:
圹圹圹圹圹圹圹圹圹圹圹圹圹圹圹圹圹圹圹圹圹圹圹圹圹 100%
 
File download complete
Time elapsed during download operation: 00:00:00.252

My command is:

stm32_programmer_cli.exe -c port=swd -d E:\STM32F302R8-Nucleo.elf

However, I don't see those warning by using STM32Cube Programmer GUI or invoke STM32Cube Programmer CLI from TrueStudio. So what's wrong with this PowerShell approach?

Thank you, have a nice day!

1 REPLY 1
Pascal Rosin
Associate II

I got the same "device not open" messages with STM32CubeProgrammer Version 1.3.0.

Seemed to be a thing with parsing the elf files. But the data got correct to the MCU as far as I could see.

After installing Version 2.0.0 of STM32CubeProgrammer, the problem is gone.