cancel
Showing results for 
Search instead for 
Did you mean: 

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

olivier
Associate III

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

8 REPLIES 8

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 Venmo
Up vote any posts that you find helpful, it shows what's working..
olivier
Associate III

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

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 Venmo
Up vote any posts that you find helpful, it shows what's working..

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

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

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 Venmo
Up vote any posts that you find helpful, it shows what's working..
Mike_ST
ST Employee

Thank you for providing sample files.

Ticket entered.

olivier
Associate III

Thanks you all for your quick answers.

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

olivier
Associate III

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