cancel
Showing results for 
Search instead for 
Did you mean: 

STM32CubeProgrammer Error: Failed to download the File

Jonathan Goldberg
Associate
Posted on July 13, 2018 at 22:16

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 KHz

Connection mode: Normal

Device ID: 0x463

Device name: STM32F413/423

Device type: MCU

Device CPU : Cortex_M4

Memory Programming ...

Openeing and parsing file: ******.hex

File : ******.hex

Size : 284896 Bytes

Address : 0x08004000

Erasing memory corresponding to segment 0:

Erasing internal memory sectors [1 6]

Erasing memory corresponding to segment 1:

Erasing internal memory sector 9

Download in Progress:

Error: Failed to download Segment[0]

Error: Failed to download the File

Time elapsed during the download operation is: 00:00:42.754

VERIFYING ...

Read progress:

[==================================================] 100%

Error: Verification issue at address 0x08004000 (byte = 0xFF)

Error: Download verification failed

RUNNING Program ...

Address: : 0x8000000

Application is running

Start operation achieved successfully
2 REPLIES 2

A new version has been posted, you might want to try that and report if it still gives you issues.

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
Khouloud GARSI
Lead II

Hi @Jonathan Goldberg​ ,

I couldn't reproduce your issue on window and linux (see attached file).

It could be related to write protection in the option bytes. Please verify that there's no write protection in the option bytes?

If you still have the issue even after the the option bytes check, please provide the hex file you're using?

Khouloud.