I tried to ask this question before but I don't think I explained myself well so I will try again. I want to send a hex file to my Uno, either via the Arduino IDE or other serial program. The way the Arduino IDE works as much as I can determine, is it compiles the c code then sends it, the HEX file, to the Uno without any special AVRISP hardware via a USB port. Can I intervene between the complier and the uploader in the Ardunio IDE, and insert my hex file without having to run the complier, and without the use of AVRISP hardware. It seems the Avrdude requires AVRISP hardware so that will not help me. Also, the AVRdude manual doesn't show the ATMega328P chip on its list of parts it supports.
How does the Ardunio IDE load the hexcode without AVRISP hardware. Maybe I can emulate it?
Seems simple enough but I am unable to do this.
On mine, these were the last thing in White. You will need to run that with your hexfile.
This particular command is from File:Upload Using Programmmer (with Atmel AVR ISP MKii and a ATMega2560). I suspect the command will be different
for File:Upload and a different programmer and a different chip.
Once you have that command and file path, how do you run it manually? I don’t know, haven’t been able to do that myself yet.
I’m sure someone will provide that answer.
Is the command run by the IDE than presumably you can cut and paste that into a DOS window.
Trouble is the path changes I think because the IDE creates temporary folders (the highlighted part), probably at every invocation although I’ve never checked.
-patmega328p partnumber atmega328p
-carduino programmer is arduino
-PCOM20 the serial port your arduino is connected to
-b115200 baud rate - upload speed
-D diasables erasing
-Uflash:w Write to Flash memory
D:\hexfiles\Blink.hex path and file name to the hex file
:i optional, indicates an Intel hexfile
Thanks for the information. I got it to work with AVRDUDE, Hurray. I had to move the AVRDUDE config file to the same directory as the AVRDUDE.exe file first though. This will make it simple to update software at the end user.
I do have one other question, Is there some way to change the destination file of the compiled code hex file. Mine goes to a temp file in my docs and settings, etc, etc. It is a very long command line and I would like to redirect it to a different file. I have look here and there and I can't find a place to change the path.
As far as i know, there is no way to change the default path the Arduino IDE use:
http://arduino.cc/forum/index.php/topic,114503.0.html
Maybe there is a solution in the thread above, I haven't tried it (Debug Arduino with Proteus).
I did the same as StanK, copied the hex file to D:\hexfiles to avoid the long path.