2023-08-02 01:43 AM - edited 2023-08-02 02:11 AM
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.
Solved! Go to Solution.
2023-08-07 04:27 AM - edited 2023-08-07 04:28 AM
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.
2023-08-02 02:52 AM
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.
2023-08-02 03:30 AM
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.
2023-08-07 04:27 AM - edited 2023-08-07 04:28 AM
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.