cancel
Showing results for 
Search instead for 
Did you mean: 

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

Domy_ST
Associate III

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.

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
Mahmoud Ben Romdhane
ST Employee

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.

View solution in original post

4 REPLIES 4
RobK1
Senior II

Project -> Properties

 
 

Schermafbeelding 2026-03-17 114658.png

Mahmoud Ben Romdhane
ST Employee

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

Follow-on thread: how to send the binary file to the microcontroller.

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

@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.