Skip to main content
Associate
May 18, 2025
Solved

STM32Programmer_CLI 'Segmentation Fault' when using external loader file

  • May 18, 2025
  • 2 replies
  • 493 views

Hi
I am trying to flash new FW to STM32L496 on custom board.
When I try to flash the ELF file from the GUI Cube-Programmer on windows using STLINK all I have to do is select the .stldr file, .elf file, and the programming goes on smoothly.
On my custom board I put the STM chip into bootloader mode, but when I try to flash the new FW I get Segmentation Fault error.
It looks like the error occur only when I use the -el flag with a .stdlr file.

Any help would be appreciated.

WhatsApp Image 2025-05-18 at 11.40.41.jpeg

 

Best answer by Tesla DeLorean

It doesn't work via DFU mode.

You'd need your own USB DFU code on the MCU to support access to the external memory.

2 replies

Aziz BRIGUI
Technical Moderator
May 20, 2025

Hello @FufiFlupi,

Programming external memories via bootloader interfaces is not supported in STM32CubeProgrammer and by the STM32L4 series bootloader itself:

AzizBRIGUI_0-1747737717214.png

You can refer to STM32 microcontroller system memory boot mode application note for further details. Only debug interfaces (ST-Link & JLink) are supported in this use case. 

Aziz 

In order to give better visibility on the answered topics, please click on 'Accept as Solution' on the reply which solved your issue or answered your question.
Tesla DeLorean
Tesla DeLoreanBest answer
Guru
May 20, 2025

It doesn't work via DFU mode.

You'd need your own USB DFU code on the MCU to support access to the external memory.

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