STM32CubeProgrammer Error: Failed to download the File
I'm using STM32CubeProgrammer CLI on Ubuntu 18.04 to program an STM32F413VHT6. Often times, the STM32CubeProgrammer fails with 'Error: Failed to download the File'.
If I attach the ST-Link to a Windows VM, I can successfully program the STM32F413VHT6 with the STVP software.
Here is a complete log of the CLI output:
STM32_Programmer_CLI -c port=SWD -d ******.hex -v -s
------------------------------------------------------------------- STM32CubeProgrammer v1.0.0 -------------------------------------------------------------------ST-LINK Firmware version : V2J29M18
SWD frequency = 4000 KHzConnection mode: NormalDevice ID: 0x463Device name: STM32F413/423
Device type: MCUDevice CPU : Cortex_M4Memory Programming ...Openeing and parsing file: ******.hex File : ******.hex Size : 284896 Bytes Address : 0x08004000Erasing memory corresponding to segment 0:Erasing internal memory sectors [1 6]Erasing memory corresponding to segment 1:Erasing internal memory sector 9Download in Progress:Error: Failed to download Segment[0]Error: Failed to download the FileTime elapsed during the download operation is: 00:00:42.754VERIFYING ...Read progress:[==================================================] 100%Error: Verification issue at address 0x08004000 (byte = 0xFF)
Error: Download verification failedRUNNING Program ...
Address: : 0x8000000Application is runningStart operation achieved successfully