8
\$\begingroup\$

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.

\$\endgroup\$
1
  • \$\begingroup\$ Is the interest in a USB upload of the sketch/firmware? (as opposed to using an ICSP) \$\endgroup\$
    – boardbite
    Apr 10, 2013 at 14:34

4 Answers 4

5
\$\begingroup\$

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]

\$\endgroup\$
7
\$\begingroup\$

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.

\$\endgroup\$
3
  • \$\begingroup\$ 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). \$\endgroup\$
    – boardbite
    Apr 10, 2013 at 14:32
  • \$\begingroup\$ 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. \$\endgroup\$ Apr 10, 2013 at 15:10
  • 1
    \$\begingroup\$ 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. \$\endgroup\$
    – boardbite
    Apr 10, 2013 at 23:12
3
\$\begingroup\$

You may be looking for the inotool utitlity.

\$\endgroup\$
2
  • \$\begingroup\$ Windows alternatives? Command-line-based perhaps? \$\endgroup\$
    – boardbite
    Apr 10, 2013 at 14:36
  • \$\begingroup\$ The page does not say anything about hex files. \$\endgroup\$
    – Elmue
    Feb 26, 2016 at 0:45
3
\$\begingroup\$

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

\$\endgroup\$
2
  • \$\begingroup\$ Any 32-bit Windows version of the same? \$\endgroup\$
    – boardbite
    Jun 9, 2013 at 1:50
  • \$\begingroup\$ This link is dead. I can only find XLoader at xloader.russemotto.com but there is no source code available. \$\endgroup\$
    – Elmue
    Feb 26, 2016 at 0:45

Not the answer you're looking for? Browse other questions tagged or ask your own question.