Where are the hex files compiled by Arduino?

后端 未结 7 654
一生所求
一生所求 2020-12-29 20:52

Where does the Arduino IDE save the binaries on Mac OS X?

相关标签:
7条回答
  • 2020-12-29 21:26

    Arduino 1.6.5 has a new command: Under the Sketch menu, select Export compiled Binary, then Show Sketch Folder. There it is.

    0 讨论(0)
  • 2020-12-29 21:31

    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/

    0 讨论(0)
  • 2020-12-29 21:32

    It is very beautifully explained in the following blog Where to find Arduino Hex files or Output Binaries I hope this helps :)

    0 讨论(0)
  • 2020-12-29 21:34

    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).

    0 讨论(0)
  • 2020-12-29 21:38

    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!

    0 讨论(0)
  • 2020-12-29 21:41

    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.

    0 讨论(0)
提交回复
热议问题