8

Is there a way for me to create an installer that runs a shell script to upload a firmware update to an arduino that doesn't involve using the IDE? I have a thing that I make that sometimes needs a firmware update, and sometimes the people who would apply the firmware update wouldn't be able to apply the update from the IDE. I'm guessing it's something to do with avrdude, but try as I might to learn how, I just haven't had any luck on my own.

I can handle the "create an installer that runs a shell script" part.

Steve Cooley
  • 1,485
  • 1
  • 11
  • 16

4 Answers4

7

If you turn on verbose output in the preferences of the IDE, you can see the full command line that the IDE uses to run avrdude.

The verbose output will also let you see what temporary directory is being used for the hex file, so you can grab it.

baldengineer
  • 2,021
  • 10
  • 13
  • It provides the step necessary to get the full answer. Once you see the command line that the IDE uses and you have the hex file, you don't need the IDE anymore. I'm not sure I understand your comment about ICSP since avrdude doesn't require a ICSP based programmer. – baldengineer Apr 10 '13 at 15:10
  • This semi-answers the question. I believe the questioner was interested in how to upload this hex file to the board (without Arduino IDE and presumably without an ICSP). – boardbite Apr 10 '13 at 14:32
  • 1
    I just noted that the IDE verbose output does indeed provide the full information necessary; my comment now rescinded! And my mention of ICSP isn't related to avrdude, but rather to the fact that it's a common way of programming chips. – boardbite Apr 10 '13 at 23:12
5

I believe this could be accomplished from the commandline as below (and thus could easily be turned into a script). This is not a fully tested answer, and I will update it as progress happens, either via my testing or others' verification.

First get avrdude (minimum files: avrdude.conf, avrdude.exe, and libusb0.dll).

Then from the commandline, run something to the effect of:

avrdude -U flash:w:[put-hex-file-path-here]:i -C avrdude.conf -v -p atmega328 -b 115200 -c stk500v2 -P [put-device-path-here]

boardbite
  • 4,892
  • 11
  • 47
  • 73
3

You may be looking for the inotool utitlity.

3

You can use AX Loader, an open source software available on Sourceforge.

clabacchio
  • 13,481
  • 4
  • 40
  • 80
user24931
  • 31
  • 1