If you use WinAVR to compile, you can do this by including avr-objcopy:
C:\WinAVR-20100110\bin> avr-objcopy.exe -I ihex -O binary input_file.hex output.bin
If you are developing Linux, there is an avr-binutils package with the program avr-objcopy.
source
share