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 or Arduino) could be exported as a .hex
file.

- 20,169
- 10
- 43
- 92
-
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 Aug 13 '18 at 23:02
1 Answers
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
- 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\<username>\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)

- 5,831
- 7
- 30
- 60