cancel
Showing results for 
Search instead for 
Did you mean: 

CubeProgrammer works, but Programmer_CLI fails

kamion1
Associate II

Hi,

I have a situation where I can successfully program the target using STM32CubeProgrammer, but it fails when I try to do the same with STM32_Programmer_CLI.exe with an error:

Error: failed to erase memory

Both are v2.13.0.

The command line I used:

STM32_Programmer_CLI.exe -c port=SWD -d "firmware.bin" 0x08000000 -vb 3

Attached are the verbose level 3 output from each. 

I am attempting to figure out why STM32CubeIDE fails to download code for debug. It also encounters the same failed to erase memory error. 

Appreciate any help anyone can give me. Thanks.

1 ACCEPTED SOLUTION

Accepted Solutions
kamion1
Associate II

I got it working. The only thing that I added was `freq=8000` to the command line:

 

STM32_Programmer_CLI.exe -c port=SWD freq=8000 -d "firmware.bin" 0x08000000 -vb 3

 

In the STM32CubeIDE debug configuration, I also had to change the Frequency from `Auto` to `8000` and it started working.

View solution in original post

3 REPLIES 3
Sara BEN HADJ YAHYA
ST Employee

Hello @kamion1 ,

Thanks for your feedback,

I wasn't able to replicate the issue on my end. I suggest upgrading to the latest version (v2.14.0).

Can you please try using v2.14.0 and inform me if the issue still persists?

Sara.

Hi @Sara BEN HADJ YAHYA ,

I have repeated the same steps with v2.14.0 and the result is the same.

Attached verbosity 3 logs.

 

kamion1
Associate II

I got it working. The only thing that I added was `freq=8000` to the command line:

 

STM32_Programmer_CLI.exe -c port=SWD freq=8000 -d "firmware.bin" 0x08000000 -vb 3

 

In the STM32CubeIDE debug configuration, I also had to change the Frequency from `Auto` to `8000` and it started working.