How to Create .bin (binary) Files from Sketch on Arduino IDE

This guide shows how to generate a .bin (binary) file from your sketch on Arduino IDE.

Generate a .bin file in Arduino IDE

As an example, we’ll generate a .bin file from the Blink example. Follow the next steps to generate a .bin file from your sketch in Arduino IDE.

1) First,  go to Tools > Board and select the right board (for example, ESP32 DEVKIT DOIT Board).

select-board-Arduino-IDE

2) Save your sketch.

3) To generate a .bin file from your sketch, go to Sketch > Export compiled Binary

4) A new file on the folder sketch should be created. Go to Sketch > Show Sketch Folder.

5) You should have two files in your Sketch folder: the .ino and the .bin file.


Related content: ESP32 Over-the-air (OTA) Programming – Web Updater Arduino IDE

We hope you’ve found this guide useful.

Thanks for reading!


Learn how to program and build projects with the ESP32 and ESP8266 using MicroPython firmware DOWNLOAD »

Learn how to program and build projects with the ESP32 and ESP8266 using MicroPython firmware DOWNLOAD »


Enjoyed this project? Stay updated by subscribing our weekly newsletter!

9 thoughts on “How to Create .bin (binary) Files from Sketch on Arduino IDE”

  1. Thank you Sarah, for the instructions on making a .bin file.

    Now please tell me/us why we would do that?

    What advantage is there to having a .bin file?
    Possible it might load faster but so what, a few seconds more to load doesn’t seem like I want to do this.

    Thank you, I really appreciate your tutorials!

    Ralph

      • Another application is when one has few arduini to get the same program (ex : detect tft shield; detect I2C devices; according to the presnce of I2C devices, display the sensor -might be temperature in different rooms- ; if serial is avalaible, send it to the PC…) Having the same program is not that absurd on an Arduino Mega…. if it can handle gracefully the lack of sensors+screens, and cope with the existing ones…This makes software somewhat bigger, and compiling/linking can be felt too slow to be comfortable (remains “only” uploading : theoretically, detecting avrdudes option can make this last step almost automatic)

  2. Well, there is something people sometimes miss :
    can one generate an easy to read assembly file (to detect where pieces of code can be optimized, or, more likely, to get an idea of time spent servicing an IT or a time constrained part): this is rather easy with gcc (–save-temps ), of course with g++, whatever the cpu. But I feel the arduino IDE does hide this option, which may be useful when there are some time constraints (at least, to detect something cannot be done)

  3. I am using the ESP8266 implementation of the Homie Convention and this bin can be used by the built-in OTA for easy firmware upgrades over WiFi.
    Thank you Sara for sharing this!

Leave a Comment

Download our Free eBooks and Resources

Get instant access to our FREE eBooks, Resources, and Exclusive Electronics Projects by entering your email address below.