hex file

Is there a way to get the hex file from the windows7 environment once the Arduino compilation process is over? I do see a temp file generated in the temp folder. But i have no idea what is the relationship between this temp file and the hex file that is put in the chip. Any suggestion is appreciated.

Yes, that's where the hex file is. If the shift key is held down when the compile (Verify) or upload button is clicked, that will trigger verbose output and the folder name will be visible as part of the messages.

Thank you very much for the info. I could find it and it worked fine.

You bet! :slight_smile:

Under Windows XP I pressed shift while uploading and I can see various files, including a .hex file, being created in the folder;
...Local Settings\Temp\build813627593015490753.tmp

How is the final folder name derived?
Will it always have the same name?
Is there some way to get the IDE to put the files, or copies of them, in another location?

radman:
Under Windows XP I pressed shift while uploading and I can see various files, including a .hex file, being created in the folder;
...Local Settings\Temp\build813627593015490753.tmp

How is the final folder name derived?
Will it always have the same name?

Yes, folder name = sketch name.

Is there some way to get the IDE to put the files, or copies of them, in another location?

Not presently. Older versions (pre version 12 maybe?) use to save the hex and .o files in the sketch folder but that
function was removed for some unknown reason. Many of us wish at least the hex file could be saved there.

It was "build813627593015490753.tmp" that I was wondering about.
I have compiled several sketches and they all get built in the same tmp folder, but I imagine this will be named differently on other machines?

Yes. The name will also be different each time you run the IDE. The name is randomly generated.

Have you any idea why they did that?
It would seem to be much more convenient to have a fixed directory.

No. I have no idea what (if any) problem was solved by moving the build directory to TEMP.

I agree. Putting the build targets in TEMP is extremely annoying.

Have you any idea why they did that?
It would seem to be much more convenient to have a fixed directory.

Fixed directory might be okay, if you only targeted one host platform. The Arduino IDE is based on Java and cross platform environments like Java try to respect each of the host operating systems they run on.

Windows (and each of its variants), OSX, and Linux all handle temporary directories slightly different. The Java environment asks the OS for a temporary directory which the Arduino IDE uses. The host operating system creates this random directory (in most cases), not the IDE.

Under windows XP with Microsoft powershell installed I think I have a reasonably easy way of getting both a .hex and an .asm file into the relevant Arduino project directory.

It works without you manually having to figure out the build directory.
I have tried it a few times with different sketches and opening and closing the IDE and it seems to work, but I would not say it is fully tested and I have not put in any effort on error trapping.

The script is in this post
http://arduino.cc/forum/index.php/topic,73638.0.html

Fungus has suggested;

The other way is to edit your preferences file and set the build path:
build.path=h:\temp\Arduino\build

This does look like it puts the build files in a directory with the specified name.
The files are still deleted after the IDE closes but life is a lot easier when the directory name is not random.