How to get Hex file in Arduino ?

Hex file is needed for simulation and when you use separate programmer to program your microcontroller. In this tutorial we will see how to get hex file in Arduino IDE?

Steps to Get Hex File in Arduino IDE

These steps are applicable to all Arduino versions to get hex file.

Step 1: Open your arduino Software.

Step 2: Open any example code or write your own code.

Step 3: Save your program.

Step 4: Click on File >> Preferences (Shortcut key: Ctrl+Comma)

get hex file in arduino

Arduino Preferences

Step 5: Enable verbose mode for compilation by ticking option as shown below

Show verbose output during: [ _/ ] Compailation

Enable Verbose
Enable Verbose

Step 6: Compile code you will see HEX file path as shown below for our example blink code

Hex file path
Hex file path

Step 7: Copy folder path and paste it in Run Start>>Run (Short cut Windows+R)

You can use windows explorer also.

Open Folder Location
Open Folder Location

Step 8: You will see your hex file in that temporary folder

Your hex file location
Your hex file location

Step 9: Copy and paste this file to other location. If you need it afterwords. Temporary folder path changes when you close your Arduino IDE. That’s it…

This way you can get hex file in arduino it is very useful for simulation in Proteus you can find tutorial to add arduino library in Proteus here.

 

 

Leave a Reply

Your email address will not be published. Required fields are marked *