Skip to main content
olivier
Associate
January 17, 2020
Question

STM32CubeProgrammer fails to program STM32L0s MCU when the size of the file to program is not a multiple of 8.

  • January 17, 2020
  • 6 replies
  • 2023 views

Hi,

I am experiencing a problem with STM32CubeProgrammer: it fails to program STM32L0s MCU when the size of the file to program is not a multiple of 8.

In the attached zip file, there are 2 .bin files containing 16 bytes of zeros (working.bin), and 20 bytes of zeros (failing.bin), respectively.

The first one can be programmed to the FLASH of an STM32L0 with STM32CubeProgrammer v2.3.0 without problem, but the second file fails with the following error :

10:32:42 : Memory Programming ...
10:32:42 : Opening and parsing file: failing.bin
10:32:42 : File : failing.bin
10:32:42 : Size : 20 Bytes
10:32:42 : Address : 0x08000000
10:32:42 : Erasing memory corresponding to segment 0:
10:32:43 : Erasing internal memory sector 0
10:32:43 : Download in Progress:
10:32:44 : Error: failed to download Segment[0]
10:32:44 : Error: failed to download the File
10:32:44 : Time elapsed during download operation: 00:00:01.648

Other possibly relevant information :

  • The problem occurs when STM32CubeProgrammer runs under Linux or Windows
  • The problem is the same when programming .elf or .hex files (I initially encountered the problem with a .hex file compiled/generated from a ST32CubeIDE project).
  • The problem does NOT occur with programming an STM32L4 MCU (I have not tried other STM32 families)
  • The problem occurs when using the GUI or the CLI of STM32CubeProgrammer

Thank you in advance for your help.

Olivier

This topic has been closed for replies.

6 replies

Tesla DeLorean
Guru
January 17, 2020

Seem to recall similar issues being reported years ago on the HEX/DFU side, I posted a tool to fix it.​

Tips, Buy me a coffee, or three.. PayPal VenmoUp vote any posts that you find helpful, it shows what's working..
Tesla DeLorean
Guru
January 17, 2020

https://community.st.com/s/question/0D50X00009XkeovSAB/dfu-fail-verify-8-byte-align-magic

I just tend to code around issues as we need immediate resolution, blaming third-parties for missing shipping deadlines doesn't fly with the people I work with.

Tips, Buy me a coffee, or three.. PayPal VenmoUp vote any posts that you find helpful, it shows what's working..
olivier
olivierAuthor
Associate
January 17, 2020

Hi @Community member​ 

Thanks for your reply.

I guess a workaround is easy for .bin and .hex files, but a bit more complicated with .elf

Anyway, I wish ST can fix the problem, as it is quite annoying.

Olivier

Tesla DeLorean
Guru
January 17, 2020

Believe me, I can work with ELF/AXF files too.

ST has recurrent problems/issues with these types of thing, it exceeds my patience.

Tips, Buy me a coffee, or three.. PayPal VenmoUp vote any posts that you find helpful, it shows what's working..
Tesla DeLorean
Guru
January 17, 2020

@Khouloud GARSI​  @Nawres GHARBI​  please can you flag this issue for review, thanks.

Tips, Buy me a coffee, or three.. PayPal VenmoUp vote any posts that you find helpful, it shows what's working..
Mike_ST
Technical Moderator
January 17, 2020

Thank you for providing sample files.

Ticket entered.

olivier
olivierAuthor
Associate
January 17, 2020

Thanks you all for your quick answers.

Hopefully ST will fix this soon, and I can work around it in the meantime.

olivier
olivierAuthor
Associate
August 4, 2020

FYI, this issue seems to have been fixed in STM32CubeProgrammer 2.5.0.