Unable to generate hex file using arduino 1.6.8

I am trying to generate hex file using arduino ide but what I am actually getting is ino.cpp(in the build folder) while for I need cpp.hex .I have selected compile in the preference window. Can anyone suggest where I have gone wrong

Do you have a special core installed ? For which Arduino board ? Try to create a hex file for an Arduino Uno. Look in the bottom of the screen where it is located. If that doesn't work, you might have mixed different Arduino versions or different Java versions. With Windows 7 and Windows 10, there is no need to install Java (it is even better if Java is not installed). For linux, I have a minimal Java installed. If you have installed Arduino on an other driver, or network drive, that might also give a whole lot of problems. Or if you have changed the Arduino system files, or don't have permission, or something like that.

Click Sketch>Export Compiled Binary Then Show sketch folder

Say, The sketch name is TEST

In the sketch folder, there will be a file named " TEST.cpp.standard " The " *.hex " extension may or may not be there

Try to open that file with " Notepad++ " It should show something like this ...


That is your compiled hex.