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.
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.
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.
On the sketch folder, you should have both the sketch file (.ino extension) and the binary file (.bin extension), like shown on figure 4.