Where does the Arduino IDE save the binaries on Mac OS X?
7 Answers
In the Arduino software: go to File -> Preferences and then select Show verbose output during -> compilation.
Finally, when you are compiling, the program will show you lots of data. At the last lines, you will find the path1 to the .hex
file.
1Every time the path changes!
-
It's true the that path changes every time. If you want to locate the files without having to read though the output, see my answer for 2 tools you can use to script whatever work you need to do with the files. – Bruno Bronosky Dec 27 '15 at 04:02
Arduino 1.6.5 has a new command: Under the Sketch
menu, select Export compiled Binary
, then Show Sketch Folder
. There it is.

- 2,335
- 24
- 36
Arduino IDE uses the mktemp command to create the temp directory on Mac and Linux. However, on Mac the default $TMPDIR env var is not /tmp/ as it is on Linux. On Mac it's under /var/folders and it is randomly generated on boot. That complicates things a little, but here are tricks you can add to your toolkit (as aliases, functions, shell scripts, etc.) to help you find what you need.
To find the hex files
find $TMPDIR -name \*.hex -exec ls -lrt {} \; #<-- you need that backslash before and space after the semicolon
To find build directories
ls -ldrt $TMPDIR/build*
NOTE: The ls
flags of r
and t
cause the listing to be "reverse" sorted by "time" respectively. This means that the newest will be on the bottom.

- 66,273
- 12
- 162
- 149
What UDalillu said. The trick also works on Windows. On XP it ended up in C:\Documents and Settings\Your_User_Name\Local Settings\Temp\buildxxxxx\ (the xxx number changes for each build, pick the most recent).

- 501
- 6
- 11
The arduino web page http://arduino.cc/en/Hacking/BuildProcess described
During a "Verify" the .hex file is written to /tmp (on Mac and Linux) or \Documents and Settings\\Local Settings\Temp (on Windows)
I am using fedora19 64bit, and when i check my /tmp the build directory created is /tmp/build8102....tmp/

- 297
- 3
- 7
-
1The page you reference is simply wrong. While both of the *nix versions of Arduino IDE use the mktemp command to create the temp directory, on Mac the default $TMPDIR env var is not /tmp/ it's under /var/folders and it is randomly generated on boot. So on a Mac, do `ls -ldrt $TMPDIR/build*` – Bruno Bronosky Oct 20 '14 at 14:22
-
It is very beautifully explained in the following blog Where to find Arduino Hex files or Output Binaries I hope this helps :)

- 415
- 5
- 15
-
1
-
Cool @taxilian I was just trying to help and moreover, I think that was a good article on a similar topic and would help someone visiting the question by it's header "Where are the hex files compiled by Arduino?" – Albert Dec 02 '18 at 10:00