Where does the new IDE v2.xx put the hex file when it exports the binary? I see no hex file. I see dot bin files but no hex file. I need the hex file. Doing a verbose compile gives no hex file. What am I missing and where does it put it?
Thank you.
Try IDE >> FILE >> PROPERTIES to select verbose (all errors) output, then compile again. Read the output for the hex file location.
Which board are you compiling for?
If you use the 'Export Compiled Binary' option, the binary files should be placed in a sub-directory of the sketch directory. For AVR boards you should get .bin, .hex and .elf binaries. It may also depend on which board you are using and the compile script for that board. For example for a PIco you get a .uf2 binary among other things.
These files do also get created in a temporary directory during normal compiling and uploading. On a Windows system this should be something like:
\Users<username>\AppData\Local\Temp\arduino_build_132929
The number on the end will be random. A verbose should provide the name and path to the directory and files. On a Linux system this will be a temporary directory within /tmp:.
/tmp/arduino_build_374634
There is also a tool called bin2hex.exe utility that can convert a .bin file to a .hex file:
I also have this problem, but it is not solved by either of the above solutions. I am compiling on a MacBook Air M1 for an ESP Devikit using Arduino IDE version 2.3.2, but no hex file appears either in the binary output folder or the temporary macos folder. The suggested bin elf and map files are all there, but no hex.
Hi @devonnumpty. Please add a reply here on this forum topic to provide a detailed description of what you are intending to do with the hex file once you obtain it.
Hi ptillisch,
I want to use it to program esp32 devout modules in a production environment. I will likely be programming about 100 units so don't want to use the Arduino IDE, but instead a separate hex programmer.
Really, I don't necessarily need the hex file but need a solution to program the ESP Devkit units in bulk, which I am assuming will require the hex file.
You can use a python script to do the conversion from the .bin file
Not necessarily. You need the compiled binary file, and that file needs to be in a format that is supported by whatever tool you are using to program the units.
When you upload a sketch program to an ESP32 board using Arduino IDE, the free open source esptool tool is used to upload the binary file to the target:
That tool accepts a .bin
file as input, so that is why Arduino IDE generates a .bin
file. If you use esptool, then that .bin
file will work just fine for you and there is no need for you to worry about obtaining a .hex
file.
If you want to get a better understanding of the subject, try this:
- Open a sketch in Arduino IDE.
- Select File > Preferences... (or Arduino IDE > Settings... for macOS users) from the Arduino IDE menus.
The "Preferences" dialog will open. - Uncheck the box next to Show verbose output during:
☑
compile in the "Preferences" dialog. - Check the box next to Show verbose output during: ☐ upload.
- Click the "OK" button.
The "Preferences" dialog will close. - Select Sketch > Upload from the Arduino IDE menus.
- Wait for the upload to finish.
Now examine the contents of the black "Output" panel at the bottom of the Arduino IDE window. You will see the esptool
command Arduino IDE ran to upload the .bin
file generated by compiling the sketch program. You can copy that command and run it manually from the command line and it will work just as well as when Arduino IDE ran it for you.
That's really kind MaximoEsfuerzo. I will use this thanks both.
And thanks to you too ptillisch