I am using ESP12E Wifi module, using library based on Arduino. Is there any way I can upload hex file of the project to esp8266 using Arduino or any tool? I need to send hex file instead of code to my client. Is there any way?

  • Hex file of what? A program built for the ESP8266, or a program built for a classic ATmega Arduino talking to it? Either way, while you may be able to obtain a hex file, you probably can't upload it with the IDE without various hacks, but would need to use avrdude (for an ATmega) or some other tool (for an esp8266) directly. Oct 12, 2016 at 19:21
  • Hex file of the code compiled in Arduino for esp8266
    – MICRO
    Oct 12, 2016 at 20:05
  • Hex file or binary file? Why can't you just use the Arduino IDE? Esptool (github.com/themadinventor/esptool) should do what you want though, but finding out the correct arguments might take some effort.
    – bluemind
    Oct 14, 2016 at 7:06

2 Answers 2


I see the main question you are asking is: "I need to send a hex file instead of code to my client. I want to keep my source code with me."

The mechanics of the final hardware solution aren't supplied but I will guess that your client is also using an Arduino or at least the same Atmel chip that you have in your Arduino, and will be using that chip to control the ESP8266.

When you build your sketch, there is a .hex file created that you can send to your client.

There are a few ways to keep the hex file around, and IDE 1.6.5 and up has a way to easily find this file:

Sketch > Export Compiled Binary The sketch will compile.

Sketch > Show Sketch Folder The .hex file will be in the sketch folder.

You can send this hex file to your customer.

If he is using an Arduino or ATMega-based solution to connect to the ESP8266, then the hex file can be loaded into his Arduino or to his Atmel chip. However, the Arduino IDE doesn't support import of hex files at this time.

Your client would have to load that hex file onto the Arduino with an ISP programmer of some sort. There are many ways to do this, and the best one for you will depend upon your circumstances and your client's skill set.

If the client is using an Arduino or has just embedded the same ATmel chip that is in your Arduino into his solution, you could also just program your Arduino, and then send him that chip.


Turn on Show verbose output during compilation in your Arduino IDE and press Verify. After compile you can examine the parameters sent to esptool.exe in the last line before Sketch uses.... You will see some .elf, .bin and .text files. These are the files you want to send.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.