ArdUp – An Arduino Hex File Uploader

ArdUp Manual

Joe Pardue October 11, 2010

You can get the ArdUp application at: ArdUpInstall.zip

Figure 1: ArdUp

ArdUp allows the user to upload files to the Arduino Duemilanove board without having to use either the Arduino IDE or raw avrdude. Folks moving from the Arduino IDE and writing code in AVRStudio/WinAVR will find this tool useful since it lets them avoid direct use of avrdude in the command window. It is written in C# .NET and helps make it easier to locate the COM port and the .hex file to upload using avrdude. One minor problem with the Arduino IDE that this helps avoid is that avrdude is run in the verbose mode so that the output can provide more information about potential problems.

And note that similar to the Arduino IDE, the novice user doesn’t actually have to know what avrdude is in order to use this application.

Never-Ever ArdUp users

Figure 2: Never-Ever Dialog

When you press the “New to ArdUp? Click Here.” Button at the top of ArdUp, you are presented with Figure 2: Never-Ever Dialog that lists the following sentences shown in bold. The details follow each sentence.

  1. You must have AVRStudio and WinAVR installed. You can get AVRStudio from: http://www.atmel.com/dyn/products/tools_card.asp?tool_id=2725 and WinAVR from: http://sourceforge.net/projects/winavr/files/ If you haven’t already installed these and learned how to use AVRStudio to create a .hex file then you should consult the New Quick Start Guide.pdf available from the Downloads menu of www.smileymicros.com. That document is for the AVR Butterfly but the sections on AVRStudio and WinAVR are relevant to what we are doing here. You will also want to read Smiley’s Workshop 10: Moving Beyond the Arduino that you can see on my blog at: http://smileymicros.com/blog/?p=42 . This document shows how to upload using avrdude directly and you can just ignore that part since we will be using ArdUp for uploading.
  2. You must have created a .hex file in a directory with NO SPACES IN THE PATH. ArdUp uses avrdude to upload the .hex file you created in AVRStudio. It has problems with spaces in the path to the file. For instance: C:\my hex file\ myhexfile.hex will not work, but C:\myhexfile\myhexfile.hex will work.
  3. You must have your Arduino hooked up to USB port. Make sure your Arduino is connected to your PC via a USB port.
  4. If you don’t know what this means… Well, if you are reading this then you probably figured this one out on your own.

Finding the Arduino COM port

When you click the SCAN button ArdUp it will show the PortSettings Dialog. In the upper text box click on the COM port being used by the Arduino and make sure that the selection appears in the ‘Selected Port = ’ line. In Figure 3 you see that COM4 was selected as verified by the ‘Selected Port = COM4′ line.

Figure 3: Port Settings

If you see more than one COM port and aren’t sure which belongs to your Arduino, unplug it and restart ArdUp to see which COM port is missing – that is your COM port so plug your Arduino back in and then start ArdUp again and select that port.

If for some reason no COM port shows up in the Port Settings dialog then you should try unplugging the USB cable to both the PC and the Arduino.

Find the .hex file

After the COM port is identified you will be presented with a Windows Explorer browser as shown in Figure 4: Browse to your .hex file. REMEMBER: there can be no spaces in the path.

Figure 4: Browse to your .hex file

UPLOAD

If you have found a COM port and loaded a .hex file you will see that the UPLOAD button is active as shown in Figure 5.

Figure 5: ArdUp ready to upload a file

When you click on the UPLOAD button ArdUp calls avrdude in the verbose mode and the output from avrdude is printed in the lower text box shown in Figure 6.

Figure 6: avrdude output

If you succeeded in uploading the code you will see something like the text in Figure 6 which states that ‘flash verified’.

If you don’t get the ‘verified’ message then something went wrong. The possibilities are manifold. I suggest that you copy the entire avrdude output and go to www.avrfreaks.net and start a new thread in the general forum. Title the thread something like: ‘ButterUp avrdude problem’ and then past the output using the code button and then add some sensible text explaining your situation. If you are a novice then PLEASE PLEASE PRETTY PLEASE read:

How To Ask Questions The Smart Way

http://www.catb.org/~esr/faqs/smart-questions.html

Newbie? Start Here!

http://www.avrfreaks.net/index.php?name=PNphpBB2&file=viewtopic&t=70673

HELP

Clicking the HELP button opens this pdf file. And as much as I’d like to answer all questions I simply don’t have the time. I suggest that after reading the above newbie links that you start a thread on www.avrfreaks.net. I think it benefits the community to keep all questions public so that if someone else has the same question they might find it by searching the www.avrfreaks.net forum. This also benefits you since there are people available 24/7 who might answer your question well before I even see it.

Test Code

Just to help the process along, I’ve included blink.hex along with  the ArdUp files in the ArdUp.zip package that you can download from: TODO . Loading this program will cause the Arduino to blink the onboard LED attached to pin 13 once per second.

One Common Error

I’m not sure what is going on, but occasionally I see the following output from avrdude:

Started avrdude.  Please stand by..
avrdude.exe: stk500_getsync(): not in sync: resp=0×63
avrdude.exe: stk500_disable(): protocol error, expect=0×14, resp=0×63

avrdude.exe done.  Thank you.

When I start over and rerun the SCAN button it seems to work just fine. If you want the source code so that you can try to fix it, post a thread on www.avrfreaks.net and I’ll send you a copy.

Go to www.smileymicros.com and buy something.

This entry was posted in arduino. Bookmark the permalink.

One Response to ArdUp – An Arduino Hex File Uploader

  1. Pingback: Arduino on a breadboard: BreadboArduino | smileymicros.com