How does one upload WinAVR built binary?

Hi everyone,

How does one upload WinAVR built binary? I mean the AVR does come with a boot loader so how would it all work? Even if there was an easy way to upload wouldn't the file have to be built with the boot loader location and size in mind so that it all fits and works together?

Thanks ~B

You can upload binaries built with WinAVR using AVRDUDE. First you have to convert the binary to HEX format:

avr-objcopy -O ihex myprogram.elf myprogram.hex

Then you can upload the program using AVRDUDE:

avrdude -p atmega328p -c stk500v1 -P \\\\.\\COM5 -b 57600 -D -U flash:w:myprogram.hex:i

Of course, replace COM5 with whatever COM port your Arduino is on.