save and upload HEX file on mac

Status
Not open for further replies.

virtualdave

Well-known member
Question about HEX files.

I have an update to a sketch (via arduino) that I need to pass along to a client, however I don't want the client to have access to the sketch.

A little bit of sleuthing and I found buried deep inside the /private folder (I'm on a Mac, btw) the .hex file for the arduino sketch. It seems that via the Teensy app I can easily open this hex file and upload to the teensy (teensy 3.1 in case that matters). If I want my client to do the same, can I just send them this .hex file and the teensy app?

Also, how is it determined where the hex file gets stored when I compile on a mac? Right now the path is:
/private/var/folders/xx/m73qyzbj319cxpbjk9cl108m0000gp/T/build8890915754246587262.tmp/

Thanks in advance for any pointers!

Cheers,
David
 
If you're using Arduino, in File > Preferences is an option to turn on verbose info while compiling.

That info will show you the full pathname to the place where Arduino creates the .hex file. On a Mac, it may be in a hidden temporary directory not accessible from the Mac Finder. You might need to use a terminal window to type a command to copy the .hex file to a location you can access it using the Finder.
 
Perfect. Thanks, Paul.
Note you can also use Go>>Go to folder... (from the finder) to access the file via the finder vs. terminal.

Very happy there's a hex version of the sketch :)

Cheers,
David
 
If you also copy the .elf file (keep them together in the same directory), the Teensy Loader can check to make sure you're programming to the correct board.

Without the .elf, it can't tell if the .hex is meant for Teensy 3.1 or 3.0 or even 2.0. It'll just write the raw data. With the .elf present, you'll get an error if you attempt to write the .hex to the wrong type of board.
 
Status
Not open for further replies.
Back
Top