cancel
Showing results for 
Search instead for 
Did you mean: 

Bug in CLI v2.21.0 using -w commands

blast3r
Visitor

Hi all,

I've searched for similar post but solutions provided did not work for my case.

For compatibility reasons I needed to upgrade from ST-Link to Cube programmer CLI but I've encountered roadblocks while using the -w commands with the Cube CLI.

If I write directly with the CubeProgrammer UI, no issue at all, but if i try using CLI below error pops-up:

 

C:\Program Files\STMicroelectronics\STM32Cube\STM32CubeProgrammer\bin>STM32_Programmer_CLI.exe -c port=SWD mode=UR -w8 0x08080000 0x02 -v -hardRst
-------------------------------------------------------------------
STM32CubeProgrammer v2.21.0
-------------------------------------------------------------------

ST-LINK SN : 54FF6C066685495431141687
ST-LINK FW : V2J46S7
Board : --
Voltage : 2.71V
SWD freq : 4000 KHz
Connect mode: Under Reset
Reset mode : Hardware reset
Device ID : 0x482
Revision ID : Rev X
Device name : STM32U575/STM32U585
Flash size : 1 MBytes
Device type : MCU
Device CPU : Cortex-M33
BL Version : 0x92
Debug in Low Power mode enabled


Downloading 8-bit data...

██████████████████████████████████████████████████Error:
Downloading 8-bit data failed...
If it's a Flash memory, it may be not erased or protected

Some details about:

  • If I try to write the same data that is already stored, it works (maybe cause it verifies and succeed for this reason - eventhought the "Downloading 8-bit data done successfully" string appears)
  • already tried -w32 an -w64 option with no success but same behaviour as per previous point

 

Thanks all for your help and support with this.

 

Regards

G

 

1 REPLY 1
Kouthair
ST Employee

Hello Blast3r and welcome to the community!


According to UM2237, downloading using -w<8,16,32> requires the flash memory to be erased since it doesn't erase it in order to write.

STM32CubeProgrammer GUI does it for you automatically when you edit.

In order to give better visibility on the answered topics, please click on 'Accept as Solution' on the reply which solved your issue or answered your question.