Where are the hex files compiled by Arduino?

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

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

7条回答
  •  粉色の甜心
    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.

提交回复
热议问题