Go Down

Topic: .hex file path (Read 27914 times) previous topic - next topic

pito

Hi, I am using a programmer instead of IDE's avrdude. Is there a trick how to tell (0022 as well as 1.0.1) to IDE where to store the .hex files? The current random .hex files assignment is a nightmare..p.

april.steel

I was not aware that hex files are stored anywhere. Are they stored somewhere after compilation?

johnwasser

The .hex files are stored in a temporary directory until the upload finishes. 

There is an option you can add to preferences.txt to tell Arduino to NOT delete the files.  I think it's:

export.delete_target_folder=false

You then set build output to 'verbose' to get the name and location of the temporary directory.
Send Bitcoin tips to: 1G2qoGwMRXx8az71DVP1E81jShxtbSh5Hp

jerseyguy1996

I had to "make visible" all folders and files to find the .hex file when I did what you are doing.  For some reason on my Mac it was putting the files in a hidden folder.
Arduino Uno;
Mega328

pito

The .hex files are stored (winxp) in directories like this one:
C:\Documents and Settings\your_username\Local Settings\Temp\build3526495849735274299.tmp
Each new build after opening the IDE is put into a new .tmp directory with "random" number in the name of the directory. So after few days you have there ~15 build.. (and console.., untitled..) dirs, which are mostly empty.
Frankly, I do not understand why an option for placing the hex file is not provided  :smiley-roll:
p.

johnwasser


Frankly, I do not understand why an option for placing the hex file is not provided  :smiley-roll:


I'm guessing that 99.9% of Arduino users would never use that option because the Arduino IDE has no provision for uploading a pre-compiled .hex file.

It's not that hard to learn to do raw AVR programming using the compiler directly.  This gives you complete control of where you place your .hex file.
Send Bitcoin tips to: 1G2qoGwMRXx8az71DVP1E81jShxtbSh5Hp

creativen

easier way: http://www.thinkcreate.org/index.php/debug-arduino-with-proteus/  :smiley-mr-green:

pito

Yes, that is exactly what we need  :)
Thanks!

april.steel

#8
Aug 26, 2012, 11:40 pm Last Edit: Aug 26, 2012, 11:50 pm by april Reason: 1

easier way: http://www.thinkcreate.org/index.php/debug-arduino-with-proteus/  :smiley-mr-green:

I'm not getting anything on that site . Is it still up?
Hm must be a temp thing google cache has it on search

eried

I sometimes use the hex file, so I like to hold the shift key when I press the verify :) (I am not sure why they removed this from the Official 1.0.1)
http://arduino.cc/forum/index.php/topic,118440.0.html

So I can copy the path this way:
http://screencast.com/t/JsuttIxWqw

Another option is to edit your preferences file and add:
Code: [Select]
build.path=C:\folder

to dump your files there
My website: http://ried.cl

april.steel

Thats a good one but Windows only it seems

johnwasser


Thats a good one but Windows only it seems


Works for me on Mac:
Quote

build.path=/Users/john/Documents/Arduino/build
Send Bitcoin tips to: 1G2qoGwMRXx8az71DVP1E81jShxtbSh5Hp

april.steel

#12
Sep 15, 2012, 10:29 pm Last Edit: Sep 15, 2012, 10:59 pm by april Reason: 1
Yes John Thanks
Silly me
Lines 50 or so in /Arduino/lib/preferences.txt
# temporary build path, normally this goes into the default
# "temp" folder for that platform (as defined by java)
# but this can be used to set a specific file in case of problems
build.path=/build
Its also in /root/.arduino/preferences.txt

badonj

Hi,

I had been searching for were the compiled .hex file was being stored. On windows 10, if you click on your "C:\Users\**UserAccount**\AppData\Local\Temp" drive and look for a folder something like this "build6400650277782182288.tmp" Looks like a temp file, but it is a folder. In the folder it will have your file name .ino saved as a .hex. For example, if your .ino file is "Marlin_3DP12_398.ino", Then the .hex file will be "Marlin_3DP12_398.hex"

Additionally; every time you open and close your Marlin project, your .tmp folder will have a different build number. So if you open your Marlin project and compile and the .tmp folder is build6400650277782182288.tmp, then the next time you reopen the same Marlin sketch and compile, the build number will be different.


Hope this helps.



DrAzzy

Hi,

I had been searching for were the compiled .hex file was being stored. On windows 10, if you click on your "C:\Users\**UserAccount**\AppData\Local\Temp" drive and look for a folder something like this "build6400650277782182288.tmp" Looks like a temp file, but it is a folder. In the folder it will have your file name .ino saved as a .hex. For example, if your .ino file is "Marlin_3DP12_398.ino", Then the .hex file will be "Marlin_3DP12_398.hex"

Additionally; every time you open and close your Marlin project, your .tmp folder will have a different build number. So if you open your Marlin project and compile and the .tmp folder is build6400650277782182288.tmp, then the next time you reopen the same Marlin sketch and compile, the build number will be different.


Hope this helps.



These posts were from 2012.

With recent versions of the IDE you can export a .hex file, saved into the sketch folder, simply by doing Sketch -> Export compiled binary
ATtiny core for 841+1634+828 and x313/x4/x5/x61/x7/x8 series Board Manager:
http://drazzy.com/package_drazzy.com_index.json
ATtiny breakouts (some assembled), mosfets and awesome prototyping board in my store http://tindie.com/stores/DrAzzy

Go Up