Alternative way to upload hex file

Hi dude,
This is my first post to this forum. I've just got my Arduino Mega board today. I really like both hardware and software designs of the board as one usb port handling programming, serial communication and even power supply. It's cost and space saving design if I use external powered usb hub.
But I have one question that how can I upload a .hex file to Arduino Mega board? Suppose, I have a hex file from AVR studio, I want to upload that hex to Arduino Mega board by using Arduino software. Is it possible to do that?

Thanks,
Regards,
Pak

Three ways I know of:

  1. Use the Arduino IDE to compile your sketch and then upload.

  2. Use AVRDUDE in command mode. This can have quite the learning curve but is does work. AVRDUDE is a standalone program that is included in the Arduino IDE installation and is used automatically by the IDE but you are free to locate it and use it manually in command mode, but as I said it can be a bitch to get all the command options and file paths done correctly.

  3. Use a GUI program that figures out all the command options and then calls AVRDUDE to upload the HEX file. There are many avalible if you search the web, but quality varies.

If you are using Windows here is a GUI AVRDUDE utility recently posted here:

http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl?num=1286854844/3#3

Lefty

Thank for a quick reply, Richard. I've googled about uploading a hex file that is not compiled by Arduino and finally found that it is not possible because of these following facts:

  1. avrdude.exe command line usage is not simple
  2. Arduino does compiling before uploading even though you've complied and verified.
  3. Arduino does not have feature for a custom hex file to upload or may be some other issues, no idea

thanks anyway,
Pak

Hi Retrolefty, I've tried ArdUp program from Simley, but it's exclusively for "Duemilanove" board, since

AVRDudeOut: avrdude -p m329P -c arduino -P COM4 -b 57600 -F -U flash:w:\Led_M1280.hex

. My board is Mega1280. May be, I hope he'll expand the program for other Arduino boards.

Thanks, Retrolefty, really appreciate
pak

found that it is not possible because of these following facts:

  1. avrdude.exe command line usage is not simple

Of course it's possible. "not simple" is not at all the same as "not possible." If you are more specific about your environment, we could get more specific about how to do it...

Easiest way: turn on "download.verbose" in your arduino preferences, so that you see the command that Arduino is using to envoke avrdude. Copy that command, paste and edit it with the hex file you want to use:

/Applications/arduino/arduino-0021/Arduino-0021.app/Contents/Resources/Java/hardware/tools/avr/bin/avrdude -C/Applications/arduino/arduino-0021/Arduino-0021.app/Contents/Resources/Java/hardware/tools/avr/etc/avrdude.conf -v -v -v -v -patmega168 -cstk500v1 -P/dev/cu.usbserial-A20e1eAN -b19200 -D -Uflash:w:[b]/tmp/MYFILES.HEX[/b]:i