Skip to main content
Associate III
March 17, 2026
Solved

How to generate a *.bin file instead of a *.elf file

  • March 17, 2026
  • 4 replies
  • 251 views

hello ST Community,

Is it possible to generate a binary file that is a *.elf file from a project developed by STM32CubeIDE?
Using the correct settings for generating *.bin files.

The *.bin file would be used to create a bootloader via UART for one of the STM32 microcontrollers.

Thanks for your valuable support.

 

 

Best answer by Mahmoud Ben Romdhane

Hello  

Let me thank you for posting.

Right-click on your project, Go to Properties, C/C++ Build → Settings, Tool Settings → MCU Post build outputs.

And enable Convert to binary file (-O Binary), then build the project.

Thanks.

Mahmoud

 

4 replies

RobK1
Associate II
March 17, 2026

Project -> Properties

 
 

Schermafbeelding 2026-03-17 114658.png

Technical Moderator
March 17, 2026

Hello  

Let me thank you for posting.

Right-click on your project, Go to Properties, C/C++ Build → Settings, Tool Settings → MCU Post build outputs.

And enable Convert to binary file (-O Binary), then build the project.

Thanks.

Mahmoud

 

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.
Andrew Neil
Super User
March 30, 2026
A complex system that works is invariably found to have evolved from a simple system that worked.A complex system designed from scratch never works and cannot be patched up to make it work.
Andrew Neil
Super User
March 30, 2026

@Domy_ST wrote:

How to generate a *.bin file instead of a *.elf file


To be pedantic, the solution is not instead of  the .elf - the .bin file is created in addition to the .elf.

A complex system that works is invariably found to have evolved from a simple system that worked.A complex system designed from scratch never works and cannot be patched up to make it work.