generating hex file

Using Arduino 1.6.8, no hex file is generated.

I have searched the TEMP folder of which everyone speaks and examined the files therein.

None are hex files.

Any help appreciated.

Thanks

Recent versions of the IDE have a new facility to generate .hex files on demand - just go to tools -> export compiled binary and it will be created in the sketch folder.

Thanks for the reply but this does not seemingly generate a hex file.

I found "export compiled binary" under the "Sketch" menu.

wnovin:
Thanks for the reply but this does not seemingly generate a hex file.

I found "export compiled binary" under the "Sketch" menu.

Hm, it does for me. Is the compile succeeding? enable verbose compile and post the output when you export it.

It does appear to compile error free. I am new to this environment so I might be missing something.

The last line reads,

Sketch uses 13,292 bytes (5%) of program storage space. Maximum is 262,144 bytes.

Do Sketch > Show sketch folder. You'll see the hex files have been saved to the sketch folder.

Thank you for all these suggestions.

But I still do not see a hex file generated.

I am working with v1.69 on Win10. The export function places two hex files directly into the sketch folder of the sketch which is currently loaded.

Copies are also placed in the following folder:
C:\Documents and Settings\your_username\Local Settings\Temp\build3526495849735274299.tmp\

Remark1: the big number after "build" will be different in your system.
Remark2: the hex files in the temp folder will be deleted immediately after closing the IDE, so leave the IDE open while looking for that folder and the hex files

So, if you either have no export function in your IDE version and can't produce a hex file in your current sketch folder, than look at the temp folder; this worked in previous IDE's without having the built-in export function.

Sketch uses 13,292 bytes (5%) of program storage space. Maximum is 262,144 bytes.

So... You're using an Arduino Zero or similar? You might have mentioned that!
Arduino zero uses a different upload tool, protocol, and file format - it generates a .bin file rather than a .hex file.

Hello,
I found a way to convert a bin file into hex.
I used STLINK utility for it.
First I opened my project.bin file, then used SaveAs option. While saving the file if you click on file type options, you will have *.hex type, click on it and here we go.
I know it might be obvious to some, but there are many like me, who came to it a hard way.

1 Like