ESP32 Arduino: Exporting binary file of compiled sketch

In this tutorial we will learn how to generate and export a binary file for a compiled ESP32 Arduino sketch. To do it, we simply need to use the Arduino IDE.

Introduction

In this tutorial we will learn how to generate and export a binary file for a compiled ESP32 Arduino sketch. To do it, we simply need to use the Arduino IDE.

Naturally, before we proceed, we need to have support for the ESP32 Arduino core on the Arduino IDE. The installation instructions can be seen here.

Generating the binary

Generating the compiled binary for an Arduino sketch is really simple, since we can do everything from the Arduino IDE.

The first thing we need to do is choosing the correct board we are targeting. To do it, simply click the Tools menu of the Arduino IDE and then select your board in the Board option, as shown in figure 1. In my case I’m targeting the FireBeetle board from DFRobot.

Selecting the ESP32 target board in the Tools menu of the Arduino IDE.
Figure 1 – Selecting the ESP32 target board in the Tools menu of the Arduino IDE.

After selecting the board, click the Sketch menu and select the Export compiled Binary option, as illustrated in figure 2. After clicking that option, the compilation and exporting procedure should start.

Alternatively, you can use the Ctrl + Alt + S shortcut to trigger the procedure.

Exporting the Arduino Sketch compiled binary.
Figure 2 – Exporting the Arduino Sketch compiled binary.

After the procedure finishes, the compiled binary should be available on the sketch folder. You can easily navigate to the sketch folder by clicking again on the Sketch menu and selecting the Show Sketch Folder option, like shown in figure 3.

If you prefer a shortcut, you can use Ctrl + K.

Navigating to the Sketch folder from the Arduino IDE.
Figure 3 – Navigating to the Sketch folder from the Arduino IDE.

On the sketch folder, you should have both the sketch file (.ino extension) and the binary file (.bin extension), like shown on figure 4.

Content of the sketch folder, with both the .ino and .bin files.

Figure 4 – Content of the sketch folder, with both the .ino and .bin files.

Leave a Reply