Ardunio ESP8266 board creating hex file

1.9k views Asked by At

I am using Arduino IDE 1.6.9 and board manager as "Node MCU 0.9 (ESP-12 Module). When I compile the program using the verify button. It creates a .bin file and my expectation is a .hex file.

I went through earlier posts and all suggested me to look for a .hex file using these options:

  1. Look for the hex file path in the black screen
  2. Look for the hex file under C:\Users\simbu\AppData\Local\Temp\buildXXXX.tmp folder
  3. Sketch => Export compiled Library

Unfortunately all the above options are creating a .bin file for my program. I am expecting a file with the .hex extension. Are .bin and .hex files the same?

I have three questions here.

  1. If .bin and .hex are different files, how can I generate a .hex file ?
  2. Can I use the .bin file (Size 228Kb) to upload into my AtMega MicroController using AVRDude commands?
  3. Can I use ESP8266 as a programmer interface to upload the program/bin file into ATMega MicroController?
1

There are 1 answers

0
per1234 On BEST ANSWER

If .bin and .hex are different files, how can i generate .hex file ?

Can i use the .bin file (Size 228Kb) to upload into my AtMega MicroController using AVRDude commands?

You compiled for ESP8266 so of course you can't use that file with an ATmega microcontroller. You need to compile for the board you're going to upload to. When you do that you will indeed get the .hex file you are expecting.

Can I use ESP8266 as a programmer interface to upload the program/bin file into ATMega MicroController ?

Yes, you can use the ESP8266 as an ISP (in-system programming) programmer for AVR microcontrollers:

  1. Connect the ESP8266 to your computer.
  2. Select the appropriate ESP8266 board from the Tools > Board menu.
  3. File > Examples > ESP8266AVRISP > Arduino_Wifi_AVRISP
  4. Upload the sketch to your ESP8266. You can now use it as an ISP programmer. For more information see https://github.com/esp8266/Arduino/blob/master/libraries/ESP8266AVRISP/README.rst