<h2>Current versions of Arduino IDE</h2>

<p>Use the menu option in the Arduino IDE:</p>

<p><strong>Sketch</strong> ► <strong>Export Compiled Binary</strong></p>

<p>See <a href="https://forum.arduino.cc/index.php?topic=131655.msg2445740#msg2445740" rel="nofollow noreferrer">post #6</a> from the thread <a href="https://forum.arduino.cc/index.php?topic=131655.0" rel="nofollow noreferrer">How to get hex file from arduino files ?</a>:</p>

<blockquote>
  <p>Well, since it was bumped it's worth mentioning there is a new way to
  do this added in Arduino IDE 1.6.5:</p>
  
  <ul>
  <li>Sketch > Export Compiled Binary</li>
  <li>If you are doing this with an example then you will be prompted to save the sketch in another location.</li>
  <li>Wait until the sketch has finished compiling.</li>
  <li>Sketch > Show Sketch Folder</li>
  <li>The .hex file will be in the sketch folder</li>
  </ul>
</blockquote>

<p>Here is a screenshot for OS X:</p>

<blockquote>
  <p><a href="https://i.sstatic.net/GhdPn.png" rel="nofollow noreferrer" title="Export compiled Binary menu option"><img src="https://i.sstatic.net/GhdPn.png" alt="Export compiled Binary menu option" title="Export compiled Binary menu option"></a></p>
</blockquote>

<p>There is no need to fully compile, a simple verify will suffice. From <a href="https://forum.arduino.cc/index.php?topic=131655.msg3118445#msg3118445" rel="nofollow noreferrer">post #10</a>:</p>

<blockquote>
  <p>Reopen Arduino, and open a sketch of your choice (use the Examples->Digital->Blink if you have no other sketches). Hit the Verify button to compile the sketch. Now, navigate to the build.path folder. You should see a bunch of files including one with a .hex extension.</p>
</blockquote>

<hr>

<h2>Older versions of Arduino IDE</h2>

<p>If using an older version of the Arduino IDE, from <a href="https://forum.arduino.cc/index.php?topic=131655.msg3399334#msg3399334" rel="nofollow noreferrer">post #12</a>:</p>

<blockquote>
  <p>Try this if using an older version of Arduino </p>
  
  <p><a href="http://arduinoisfun.blogspot.in/2016/01/taking-out-hex-file-from-arduino.html" rel="nofollow noreferrer">Taking out HEX file from Arduino in 3 simple steps</a></p>
</blockquote>

<ol>
<li>Open Arduino IDE</li>
<li><strong>File</strong> ► <strong>Preferences</strong> menu</li>
</ol>

<blockquote>
  <p><a href="https://i.sstatic.net/SUgn2.png" rel="nofollow noreferrer" title="Arduino IDE Preferences menu"><img src="https://i.sstatic.net/SUgn2.png" alt="Arduino IDE Preferences menu" title="Arduino IDE Preferences menu"></a></p>
  
  <p><a href="https://i.sstatic.net/Zd2te.jpg" rel="nofollow noreferrer" title="Arduino IDE Preferences dialog"><img src="https://i.sstatic.net/Zd2te.jpg" alt="Arduino IDE Preferences dialog" title="Arduino IDE Preferences dialog"></a></p>
</blockquote>

<ol start="3">
<li>Find "Show verbose output during " and check the "compilation" box</li>
<li>Locate the <code>preferences.txt</code> file and open it</li>
<li><p>Add the following line (this is the path to the directory where the hexfile will be stored): </p>

<pre><code>build.path=C:\Users\&lt;username&gt;\Desktop\hexfile
</code></pre></li>
<li><p>Change the following line</p>

<pre><code>export.delete_target_folder=true
</code></pre>

<p>to </p>

<pre><code>export.delete_target_folder=false
</code></pre></li>
<li><p>Quit the Arduino IDE and restart it.</p></li>
<li>Now when you compile, the directory specified in <code>build.path</code> will contain the <code>.hex</code> file (along with other files which can be ignored)</li>
</ol>

CC BY-SA 4.0
2018-08-13T20:21:10.840Z
2018-10-01T19:56:40.880Z
2018-10-01T19:56:40.880Z
Greenonline
<p>Because <code>.hex</code> files can be installed without any need of an Arduino (serving as an ISP) to flash the firmware on Creality machines I was wondering, if firmware compiled via some other means (for example the <a href="https://www.repetier.com/firmware/v100/" rel="nofollow noreferrer">Repetier firmware</a> or <a href="https://www.arduino.cc/en/Main/Software#toc2" rel="nofollow noreferrer">Arduino</a>) could be exported as a <code>.hex</code> file.</p>

CC BY-SA 4.0
2018-08-13T23:02:17.060Z
You might want to mention that this is for the Ender-3 specific controller board, as there is no bootloader, as per [TH3D Unified Firmware Package](https://www.th3dstudio.com/knowledge-base/th3d-unified-firmware/).
Greenonline
<firmware><repetier><arduino>
Export firmware as a .hex
Trish
# Export firmware as a .hex

(Asked by: username_0 on 2018-08-13)

Because `.hex` files can be installed without any need of an Arduino (serving as an ISP) to flash the firmware on Creality machines I was wondering, if firmware compiled via some other means (for example the [Repetier firmware](https://www.repetier.com/firmware/v100/) or [Arduino](https://www.arduino.cc/en/Main/Software#toc2)) could be exported as a `.hex` file.

**Tags:** firmware, repetier, arduino
> **Comments:**
> **username_1**: You might want to mention that this is for the Ender-3 specific controller board, as there is no bootloader, as per [TH3D Unified Firmware Package](https://www.th3dstudio.com/knowledge-base/th3d-unified-firmware/).  

---

## 1 answers

### Answer by username_1 on 2018-08-13. Score: 4 | Accepted answer

Current versions of Arduino IDE
Use the menu option in the Arduino IDE:
Sketch ► Export Compiled Binary
See post #6 from the thread How to get hex file from arduino files ?:

Well, since it was bumped it's worth mentioning there is a new way to
  do this added in Arduino IDE 1.6.5:

Sketch > Export Compiled Binary
If you are doing this with an example then you will be prompted to save the sketch in another location.
Wait until the sketch has finished compiling.
Sketch > Show Sketch Folder
The .hex file will be in the sketch folder


Here is a screenshot for OS X:



There is no need to fully compile, a simple verify will suffice. From post #10:

Reopen Arduino, and open a sketch of your choice (use the Examples->Digital->Blink if you have no other sketches). Hit the Verify button to compile the sketch. Now, navigate to the build.path folder. You should see a bunch of files including one with a .hex extension.


Older versions of Arduino IDE
If using an older version of the Arduino IDE, from post #12:

Try this if using an older version of Arduino 
Taking out HEX file from Arduino in 3 simple steps


Open Arduino IDE
File ► Preferences menu






Find "Show verbose output during " and check the "compilation" box
Locate the preferences.txt file and open it
Add the following line (this is the path to the directory where the hexfile will be stored): 
build.path=C:\Users\\Desktop\hexfile

Change the following line
export.delete_target_folder=true

to 
export.delete_target_folder=false

Quit the Arduino IDE and restart it.
Now when you compile, the directory specified in build.path will contain the .hex file (along with other files which can be ignored)


---

